[Biopython-dev] Error in SeqFeature.CompoundLocation parsing NCBI efetch format
Peter Cock
p.j.a.cock at googlemail.com
Thu Dec 5 18:03:41 UTC 2013
On Thu, Dec 5, 2013 at 5:12 PM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
>
> A short term hack would be to strip out the bond term
> (with a warning) and parse the remainder as a simple
> join or single residue accordingly.
>
> Would that work for you - do you need the bond bit?
Proposed branch with that change:
https://github.com/peterjc/biopython/tree/gp_bond
Sample output, using the same example GenPept file:
>>> from Bio import SeqIO
>>> r = SeqIO.read("1MRR_A.gp", "genbank")
Bio/GenBank/__init__.py:1011: BiopythonParserWarning: Dropping bond
qualifier in feature location
warnings.warn("Dropping bond qualifier in feature location",
BiopythonParserWarning)
>>> for f in r.features: print f.type, f.location
...
source [0:375]
Region [27:340]
SecStr [34:46]
Site order{[36:37], [43:44], [108:110], [112:113], [115:117],
[119:120], [122:123], [136:138], [140:141]}
Site order{[47:48], [83:84], [114:115], [117:118], [121:122],
[235:237], [240:241]}
SecStr [56:65]
SecStr [66:87]
Site order{[83:84], [114:115], [117:118], [203:204], [237:238], [240:241]}
Het join{[83:84], [114:115], [117:118], [237:238]}
SecStr [101:129]
Het join{[114:115], [203:204], [237:238], [240:241]}
Site [121:122]
SecStr [132:140]
SecStr [142:151]
SecStr [152:169]
SecStr [171:177]
SecStr [179:185]
SecStr [185:216]
Het join{[193:194], [271:272]}
Het [195:196]
Het join{[195:196], [195:196]}
Het join{[209:210], [213:214], [213:214]}
SecStr [224:253]
SecStr [259:269]
Bond bond{[267:268], [271:272]}
SecStr [269:285]
Het join{[283:284], [304:305], [308:309], [304:305]}
SecStr [300:319]
Useful?
Peter
More information about the Biopython-dev
mailing list