[Biopython-dev] [Bug 2622] Parsing between position locations like 5933^5934 in GenBank/EMBL files

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Tue Oct 21 07:30:50 EDT 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2622





------- Comment #1 from biopython-bugzilla at maubp.freeserve.co.uk  2008-10-21 07:30 EST -------
Sample script showing the problem,

from Bio import SeqIO

#filename = "NC_005027.gbk"
filename = "NC_005816.gbk"

print "=" * 50
for line in open(filename) :
    if "^" in line :
        print line.rstrip()

print "=" * 50
record = SeqIO.read(open(filename), "genbank")
print record.id
for feature in record.features :
    if "^" in str(feature.location) :
        print feature



And its output:

==================================================
     variation       5933^5934
     variation       5933^5934
     variation       8529^8530
==================================================
NC_005816.1
type: variation
location: [(5932^11866):(5932^11866)]
ref: None:None
strand: 1
qualifiers: 
        Key: note, Value: ['compared to AL109969']
        Key: replace, Value: ['a']

type: variation
location: [(5932^11866):(5932^11866)]
ref: None:None
strand: 1
qualifiers: 
        Key: note, Value: ['compared to AF053945']
        Key: replace, Value: ['aa']

type: variation
location: [(8528^17058):(8528^17058)]
ref: None:None
strand: 1
qualifiers: 
        Key: note, Value: ['compared to AL109969']
        Key: replace, Value: ['tt']


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list