[Biopython-dev] [Bug 2507] Adding __getitem__ to SeqRecord for element access and slicing

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Tue Sep 23 11:00:21 EDT 2008


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





------- Comment #10 from biopython-bugzilla at maubp.freeserve.co.uk  2008-09-23 11:00 EST -------
(In reply to comment #2)
> Does this means that SeqRecord would deprecate the .seq attribute? If the .seq
> attribute is not removed slicing could be used in it like: my_seq[1:100] and
> my_seq.seq[1:100].
> 

If you had a SeqRecord, record, then yes with this patch you could do:

record[1:100] - gives another SeqRecord with annotation
record.seq[1:100] - gives a Seq object with no annotation
record[1:100].seq - should give an equivalent Seq object with no annotation

Peter


-- 
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