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

Download error 400 #12

Open
ganiatgithub opened this issue Jun 13, 2019 · 2 comments
Open

Download error 400 #12

ganiatgithub opened this issue Jun 13, 2019 · 2 comments
Labels

Comments

@ganiatgithub
Copy link

Hey, thank you for the cool script.

However, I cannot work this out. I'm trying do download the genomic sequence from:
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/762/265/GCF_000762265.1_ASM76226v1
Pretty sure the fna files are available, and the accession is GCF_000762265.1
But it doesn't work when I run:
ncbi-acc-download -m nucleotide -F fasta GCF_000762265.1

Message:

Failed to download file with id GCF_000762265.1 from NCBI
Traceback (most recent call last):
File "/miniconda3/bin/ncbi-acc-download", line 10, in
sys.exit(main())
File "/miniconda3/lib/python3.7/site-packages/ncbi_acc_download/main.py", line 54, in main
download_to_file(dl_id, config, filename, append)
File "/miniconda3/lib/python3.7/site-packages/ncbi_acc_download/core.py", line 110, in download_to_file
r = get_stream(url, params)
File "/miniconda3/lib/python3.7/site-packages/ncbi_acc_download/download.py", line 90, in get_stream
raise DownloadError("Download failed with return code: {}".format(r.status_code))
ncbi_acc_download.errors.DownloadError: Download failed with return code: 400

Any tips?

@kblin
Copy link
Owner

kblin commented Jun 13, 2019

Hi there,

ncbi-acc-download is downloading sequences via the NCBI Entrez interface, and for some reason you can't use this with NCBI assembly IDs. If you have assembly IDs, you might want to use ncbi-genome-download instead. You can use the --assembly-accessions option to specify the assembly ID.

@kblin kblin added the question label Jun 13, 2019
@ganiatgithub
Copy link
Author

It works, thank you very much, saved me loads of time!

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

No branches or pull requests

2 participants