kblin / ncbi-genome-download

Scripts to download genomes from the NCBI FTP servers
Apache License 2.0
951 stars 175 forks source link

Problem with downloading using an accession list #71

Closed Anto007 closed 4 years ago

Anto007 commented 6 years ago

I'm using the 0.2.7 version of your nice tool. However, the comma-separated accession list option does not seem to work. I'm getting the error message: "ERROR: No downloads matched your filter. Please check your options."

The command I used is this: ncbi-genome-download -F fasta -A Klebs_list.txt bacteria

I'm also attaching here the Klebs_list.txt in case you want to take a look Klebs_list.txt

kblin commented 6 years ago

Hi,

If you want to load the accession list from a file, that file should contain one accession per line, like so:

GCF_000215745.1
GCF_000957705.1
...

If you want to put multiple accessions on the command line, then you need to use commas: ncbi-genome-download -A GCF_000215745.1,GCF_000957705.1 bacteria

I'm sorry if that's not clear from the README. ncbi-genome-download is getting more and more complex and I'm still struggling on how to best create the documentation.

Anto007 commented 6 years ago

Many thanks for the clarification

MassiMolari commented 4 years ago

I'm trying to download some assembly from metgagenomes using both taxid and GenBank assembly accession, here the commands:

ncbi-genome-download --dry-run --section genbank --taxid 652676 bacteria --metadata metadata.txt

and

ncbi-genome-download --dry-run --section genbank --assembly-accessions GCA_900118175.1,GCA_900117435.1,GCA_900118305.1,GCA_900118345.1,GCA_900118315.1 bacteria --metadata metadata.txt

But I'm getting the error message: "ERROR: No downloads matched your filter. Please check your options."

Could you please let me know what it is wrong? Thanks!

kblin commented 4 years ago

Hi, basically the reason is that you're trying to look for these accessions in the "bacteria" section of GenBank, but they're in the "metagenome" section. Having said that, that's a new section that ncbi-genome-download doesn't support yet, I'll make sure to add it right away.

Anto007 commented 4 years ago

Hi Kai,

Since you mention that you're going to add support for downloading metagenomes: I was wondering if there's any way that you can also add a flag that would facilitate automated download of all relevant metagenomes for a given biome, for e.g., if I wanted to download all 'insect gut metagenomes' on GenBank or all 'marine sediment metagenomes'? At the moment, there appears to be no tool available that can achieve this in a convenient manner and so it will be super-cool if ncbi-genome-download has this functionality too!

Thanks!

MassiMolari commented 4 years ago

Hi Kai, thanks for explanation. Then I'm looking forward for the upgrade!!! :-)

kblin commented 4 years ago

Assuming your microbiomes are labeled the right way in the assembly summary, you will be able to. NCBI puts the description into the organism name, so ncbi-acc-download --section genbank --genus "insect gut" metagenomes will download all assemblies in genbank labeled "insect gut microbiome".

Anto007 commented 4 years ago

Awesome, I too am looking forward to the new version of your ncbi-genome-download. Keep up the great work!

Anto007 commented 4 years ago

Wait a minute, surely you mean the upcoming version of ncbi-genome-download when you say "ncbi-acc-download --section genbank --genus "insect gut" metagenomes"? Right?

kblin commented 4 years ago

The current one, as of now. :wink:

kblin commented 4 years ago

and yes, ncbi-genome-download, not ncbi-acc-download. Sorry.

MassiMolari commented 4 years ago

I saw the changes, thats great! Thanks! I tried to re-install it via conda, but still I have the "old" version without the upgrade... How can I solve this?

kblin commented 4 years ago

bioconda has a bot that updates packages, but apparently it was having issues today and didn't pick up the release. might take another day or two to get a manual package update in

MassiMolari commented 4 years ago

Hi Kai, I see, thank you for explanation. Then I will try in next days.