I tried to use these python codes to retrieve a .fasta file from gene database, but the output were the parameters of the report
from Bio import Entrez Entrez.email = "[email protected]" handle = Entrez.efetch(db = "gene",id = "682",rettype="fasta", retmode="xml") print(Entrez.read(handle))
i also read the documentation on this site about efetch() and seems like this function can only retrieve certain kinds of data for each database. So i can't take fasta file from gene database !?
I don't want to use the NCBI web UI. What's wrong with my code? Is there a way i can guarantee to retreive a .fasta file through python from NCBI ? Am i misundertanding something severly ?
Sorry for bad English. thank you.