ncbi-acc-download icon indicating copy to clipboard operation
ncbi-acc-download copied to clipboard

Download error 400

Open ganiatgithub opened this issue 5 years ago • 2 comments

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?

ganiatgithub avatar Jun 13 '19 10:06 ganiatgithub

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 avatar Jun 13 '19 11:06 kblin

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

ganiatgithub avatar Jun 16 '19 00:06 ganiatgithub