[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


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


Change the __str__ function from:

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


"[%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...)

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?

The tutorial does include some examples of output using the current syntax, and
thus would also need updating, see Section  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