[Biopython-dev] [Bug 2809] New: Adding startswith and endswith methods to the Seq object

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Apr 10 14:13:58 UTC 2009


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

           Summary: Adding startswith and endswith methods to the Seq 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
OtherBugsDependingO 2351
             nThis:


As part of making the Seq object more like the Python string (Bug 2351), we
need alphabet aware startswith and endswith methods.  Patch to follow.

There are many possible use cases for this.  One example which prompted me to
work on this was taking SeqRecord objects from sequencing reads (a FASTQ file
read in with Bio.SeqIO) where some include a PCR primer associated
prefix/suffix which I want to strip off (by slicing the SeqRecord).  To do this
I need to know if a given SeqRecord's sequence starts with (or ends with) a
given primer sequence (or tuple of primer sequences).

Current work around, str(record.seq).startswith(prefix)

Patch to follow, which will allow record.seq.startswith(prefix) directly.


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