This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Download NCBI genome sequences from Python

I have data that looks like:

1. Cronobacter phage Dev2
Characterization of lytic Cronobacter turicensis phage Dev2 isolated from wastewater treatment
Kingdom: Viruses
Chromosome: 1
Genome ID: 36224

2. Pseudomonas phage vB_Pae-TbilisiM32
Modified complete genome sequence of Pseudomonas phage vB_Pae-TbilisiM32
Kingdom: Viruses
Chromosome: 1
Genome ID: 13968

How can I fetch the genome sequences from these in Python? I know how to do it for specific kegg genes using bioservices but how do I get full genomes?

genomics genome python sequences ncbi

2 answers

Biopython has this functionality.

http://biopython.org/DIST/docs/tutorial/Tutorial.html

See section '9.6 EFetch: Downloading full records from Entrez'

Do you have the corresponding accessions? Or can you get them?

If yes, I have a Python script which uses the accessions and downloads the sequences.

Looking forward to your response. :)

Log in to answer this question.