[Biopython-dev] [Bug 2818] New: Add start and end properties to SeqFeature object
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Tue Apr 21 08:13:04 EDT 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2818
Summary: Add start and end properties to SeqFeature object
Product: Biopython
Version: Not Applicable
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Main Distribution
AssignedTo: biopython-dev at biopython.org
ReportedBy: biopython-bugzilla at maubp.freeserve.co.uk
An enhancment proposed on the mailing list would add start and end properties
to the SeqFeature returning plain integers (non-fuzzy approximations to the
start and end locations) suitable for slicing most parent sequences. Dealing
with a join location would still be tricky.
Example usage:
>>> from Bio import SeqIO
>>> record = SeqIO.read(open("NC_005816.gb"),"gb")
>>> feature = record.features[2]
>>> print feature
type: gene
location: [86:1109]
ref: None:None
strand: 1
qualifiers:
Key: db_xref, Value: ['GeneID:2767718']
Key: locus_tag, Value: ['YP_pPCP01']
>>> record[feature.start:feature.end]
SeqRecord(seq=Seq('ATGGTCACTTTTGAGACAGTTATGGAAATTAAAATCCTGCACAAGCAGGGAATG...TGA',
IUPACAmbiguousDNA()), id='NC_005816.1', name='NC_005816', description='Yersinia
pestis biovar Microtus str. 91001 plasmid pPCP1, complete sequence.',
dbxrefs=[])
>>> record.seq[feature.start:feature.end]
Seq('ATGGTCACTTTTGAGACAGTTATGGAAATTAAAATCCTGCACAAGCAGGGAATG...TGA',
IUPACAmbiguousDNA())
Patch to follow.
--
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