genebank biopython get /chromosome="22" or /map="22q13.33"
Hey i can't get withbiopython SeqIO from genpept lines of source section /chromosome= and /map=
for example: https://www.ncbi.nlm.nih.gov/protein/NP_113642.1
I've been sitting on this problem for two days, please help!
• 1,003 views
•
link
1 answer
it is located in the qualifiers field of the feature
from Bio import SeqIO
recs = SeqIO.parse("input.gb", format="genbank")
# Go over each record
for rec in recs:
# Go over each feature
for feat in rec.features:
chr = feat.qualifiers.get("chromosome")
if chr:
print (chr)
prints:
['22']
• 0 views
•
link
Log in to answer this question.