[Biopython-dev] [Bug 1902] New: Change notation for FeatureLocation string representation

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Nov 9 12:41:04 EST 2005


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

           Summary: Change notation for FeatureLocation string
                    representation
           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


This follows from a discussion on the development mailing list between Marc
Colosimo, Michiel de Hoon and myself on how GenBank locations are represented
in BioPython.

In particular Michiel suggested changing the representation to avoid looking
too like the GenBank syntax, and use something more like the Python splicing
snytax:-

http://www.biopython.org/pipermail/biopython-dev/2005-November/002176.html

Changes
-------
Change the __str__ function from:

"(%s..%s)" % (self._start, self._end)

To:

"[%s:%s]" % (self._start, self._end)

Add following to __doc_string for FeatureLocation.__str__

Returns a representation of the location.  For the simple case this
uses the python splicing syntax, [122:150] (zero based counting) which
GenBank would call 123..150 (one based counting).

Add following to __doc__ string for class FeatureLocation

Note that the start and end location numbering is designed with splicing
in mind, thus a GenBank entry of 123..150 (one based counting) becomes
a location of [122:150] (zero based counting).

(patch to follow...)

Note:
-----
This will require updating the expected output for the test_Genbank and
test_Location files in Bio/Tests/output/

Impact on existing code SHOULD be minimal, unless anyone is actively parsing
the string output of a location somewhere?

Documentation:
--------------
The tutorial does include some examples of output using the current syntax, and
thus would also need updating, see Section 3.7.2.2  Locations

As per the mailing list discussion, the whole topic of dealing with locations
could be expanded further...




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