Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to call external services." error #987

Open
ThibauldMichel opened this issue Nov 12, 2024 · 3 comments
Open

"Failed to call external services." error #987

ThibauldMichel opened this issue Nov 12, 2024 · 3 comments

Comments

@ThibauldMichel
Copy link

I am running the following command on a linux OS (Ubuntu 24.04.1 LTS) in order to download files from the SRA repository with ncbi-entrez-direct (19.2.20230331+dfsg-3ubuntu0.24.04.2).

project='PRJNA1005976[All Fields] AND rbcL[All Fields]'

output="/usr/projet_directory"

mkdir "$output"
cd "$output"
esearch -db sra -query "$project"  | efetch -format runinfo > runinfo.csv
cat runinfo.csv | tail -n +2 | cut -d "," -f 1 > SRR.numbers
cat SRR.numbers | parallel fastq-dump --split-files --origfmt --gzip {}

The output show either a successful download, or a "Failed to call external services." message.
It seems it is stochastic: the files successfully downloaded change each time the script is run.

Furthermore, the script can fail as well if run alone (without the use of the SRR.numbers list and of the parallel command).
I have tried to run the script with a delay, thinking the NCBI website could have a time restriction between two calls. It seems it is not the case as the following command is not working.

cat SRR.numbers | parallel --delay 3 "fastq-dump --split-files --origfmt --gzip {}"

Would have experienced with random issue before?

@klymenko
Copy link
Contributor

Run prefetch for each run before running fastq-dump.

@ThibauldMichel
Copy link
Author

Thank you very much for the quick fix!
I have tried it previously, but the code might has been incorrect as it did not work.
Here is how it worked for me:

project='PRJNA1005976[All Fields] AND rbcL[All Fields]'

output="/usr/projet_directory"

mkdir "$output"
cd "$output"
esearch -db sra -query "$project"  | efetch -format runinfo > runinfo.csv
cat runinfo.csv | tail -n +2 | cut -d "," -f 1 > SRR.numbers
cat SRR.numbers | parallel "prefetch {} && fastq-dump --split-files --origfmt --gzip {}"

@klymenko
Copy link
Contributor

We cannot help you with use of parallel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants