[BioPython] Making the Seq object act more like a string

Michiel De Hoon mdehoon at c2b2.columbia.edu
Thu Aug 23 06:06:27 UTC 2007


Peter wrote:
> However, if SeqRecord acted more like a Seq (and therefore more like a 
> string) then you could do this which does avoid the lambda:
> 
> seguid_dict = SeqIO.to_dict(SeqIO.parse(open("ls_orchid.gbk"), \
>                              "genbank"), seguid)
> 
> Or, we could enhance your the CheckSum functions to cope with a 
> SeqRecord, a Seq or a string - right now they cope with a Seq or a string.
>
Nice example.

The SeqRecord class is one of those classes in Biopython for which I never
understood why they exist. A SeqRecord is nothing more than a Seq with some
attributes attached. If we add those attributes to the Seq class directly,
then we can get rid of the SeqRecord class. Then, functions such as those in
CheckSum only need to cope with strings.

--Micheil.




Michiel de Hoon
Center for Computational Biology and Bioinformatics
Columbia University
1150 St Nicholas Avenue
New York, NY 10032





-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3293 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/biopython/attachments/20070823/b40defae/attachment-0002.bin>


More information about the Biopython mailing list