genebank biopython get /chromosome="22" or /map="22q13.33"
1
0
Entering edit mode
6 weeks ago
Xylanaser ▴ 80

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!

ncbi protein genebank python genpept • 138 views
ADD COMMENT
0
Entering edit mode
6 weeks ago

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']
ADD COMMENT

Login before adding your answer.

Traffic: 1443 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6