Suppose I have a big list of assembly IDs:
['GCA_000005845.2', 'GCA_000006925.2', 'GCA_000007405.1', 'GCA_000007445.1', ...]
And I need to count a number of mobile elements in each chromosome in all assemblies. How could I do this using BioPython? It seems that I need to download all genbank files and count mobile elements by parsing each one of them. Unfortunately, I can't find a function to download a full genbank file given an assembly ID.
I tried to do this since the direct search for "GCA_000005845.2" in assembly db doesn't work:
Entrez.email = "" # Always tell NCBI who you are handle = Entrez.esearch(db="assembly", term="GCA_000005845.2") record = Entrez.read(handle) handle1=Entrez.esummary(db="assembly",id=record['IdList'], report="full") print(Entrez.read(handle1))
But I don't know what to do next as the result does not contain GenBank ID (U00096.3). So is there a way to do this with BioPython or maybe someone knows another simple way?