This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to using GenBank assembly accession to parse out the FASTA file

I have 100 randomly selected genomes from a dataset. Then, I want to use the GenBank assembly accession GCA_001600695.1 to parse out the fasta file for his gene. Below is my code, but did not work. Anyone have a suggestion about what command in biopython I can use?

from Bio import Entrez
handle = Entrez.efetch(db="nucleotide", id="GCA_000021505.1", rettype="fasta", retmode="text")
print(handle.read())
assembly
File "<ipython-input-16-df2a9646a7ee>", line 3
    print(handle.read())`
                        ^
SyntaxError: invalid syntax

That was probably a leftover back-tick from formatting here on the website. Can you try again please?

0 answers

No answers yet.

Log in to answer this question.