I have the following Python code in which I am trying to get the sequence of a TMV replicase gene:
# Lookup ID search = Entrez.esearch(db='gene', term='Tobacco mosaic virus[Orgn] replicase', idtype="acc") read = Entrez.read(search) idlist = read["IdList"] # Get sequence search = Entrez.efetch(db='gene', id=idlist, retmode='text', rettype='gb') read = SeqIO.read(search, "genbank") sequence = read.seq
idtype="acc" doesn't give me an accession number. Instead, I get 1494081, the ID for the gene in the
When I then try and fetch it in the gene database it throws
ValueError: No records found in handle.
I've also tried fetching with the nucleotide database but without the accession number the ID leads to the wrong thing.