Hi there seniors,
I am currently new to command lines and I'm currently using this command line to download the genome of bacteria one by one, I wanted to ask if there is a faster way like since i have a list of GCF accession id to download the genome for analysis. I'm using this command:
./datasets download genome accession 'GCF_*' --include gff3,gbff,rna,cds,protein,genome,seq-report
Thanks in advance
Cheers,
Aldre
1 answer
datasets download genome accession --inputfile accessions.txt --include gff3,gbff,rna,cds,protein,genome,seq-report
Or you simply specify mutliple accessions on the commandline:
datasets download genome accession GCF_000001405.40 GCA_003774525.2 GCA_000001635
Edit: Sorry, I overlooked the --inputfile option.
This is necessary unless all accessions are from a common taxon or bioproject. In the first case you can simply do:
datasets download genome taxon 'Actinobacteria' --include gff3,gbff,rna,cds,protein,genome,seq-report
Collecting 87,619 genome records [>-----------------------------------------------] 5% 4000/87619
possibly you want to choose a taxon at a lower level.
Please refer to the documentation for further options https://www.ncbi.nlm.nih.gov/datasets/docs/v2/how-tos/genomes/download-genome/
Log in to answer this question.
you should use the
wild cardsto download all the given above GCF files. Moverover, you can use the commands ofcurl,wgetandslow5curlto download the data from database.by means of that, how should I write my scripting?
say I have
btw sorry if I wasn't that clear with the replies, I just started learning command lines
Not in this situation, it is much easier to use the NCBI datasets tool.
hi there, thanks for the reply, is it possible to disclose an example of ./datasets script for that? thank you very much. i m currently trying various method as well...
here https://stackoverflow.com/a/1521498 is an example how to use read and for loop, you just need to put in your command.
You can use
file_name_w_accessionshould contain one accession per line. Use any additional options as needed.