I need to download all the completely assembled cyanobacterial genome's GenBank file(.gbff) from NCBI(RefSeq or INSDC ftp data).

For this I think, the steps are:

1. Need to find the completely assembled genomes.
2. find the GenBank file URL based on the taxonomic name.

Is their any way to do this by using any python module or any other idea??

• Biopython has tools that could help you for steps 2 and 3, but I'm not sure how to get the information of your step 1.
– bli
Sep 5 '18 at 7:23
• can you please tell the tool name for step 2. Sep 5 '18 at 7:25
– llrs
Sep 5 '18 at 7:31

Outline of solution:

Edit:
For Cyanobacteria, you would do ./download-refseq-genomes.pl 1117

As an alternative, you can use the NCBI Datasets CLI, in a two step process to generate a dehydrated dataset for later hydration:

# Download metadata for all Cyanobacteria
# And pull out accession for 'Complete' genomes
./datasets assembly-descriptors taxon Cyanobacteria --limit ALL \
| jq -r '.assemblies[].assembly | "\(.assembly_accession) \(.assembly_level)"' \
| grep Complete \
| cut -f 1 -d ' ' > accs.txt

--dehydrated \
--exclude-protein \
--exclude-rna \
--exclude-seq \
--exclude-gff3 \
--include-gbff


You may be interested in some of the other files that are excluded.

Once you have the dehydrated dataset, you can rehydrate it when you are ready to analyze the data with:

unzip 1117_complete.zip -d 1117_complete
./datasets rehydrate -f 1117_complete