[Biopython-dev] [Biopython - Bug #2351] Make Seq more like a string, even subclass string?

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Tue Jun 26 21:48:08 EDT 2012


Issue #2351 has been updated by Michiel de Hoon.


Can we let Seq subclass string? Then we could do the following (which I naively would expect to work):

>>> from Bio import SeqIO
>>> genome = SeqIO.read('chrM.fa', 'fasta')
>>> output = open("sequences.txt", 'w')
>>> output.write(genome.seq)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: argument 1 must be string or read-only character buffer, not Seq
>>>
----------------------------------------
Bug #2351: Make Seq more like a string, even subclass string?
https://redmine.open-bio.org/issues/2351

Author: Peter Cock
Status: New
Priority: Normal
Assignee: Biopython Dev Mailing List
Category: Main Distribution
Target version: Not Applicable
URL: 


We've started talking on the mailing list about making the SeqRecord class a subclass of the Seq object, and making that a subclass of the Python string.

This bug is for holding patches - I suspect a lot of the discussion will continueon the mailing lists rather than here.

I explicitly have left the "assign to" field pointing at the dev mailinglist.


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org



More information about the Biopython-dev mailing list