[Biopython-dev] Simpler SeqRecord creation
Peter
biopython at maubp.freeserve.co.uk
Sat May 15 06:32:39 EDT 2010
Hi all,
Since several of the changes coming in Biopython 1.54
are "syntactic sugar" like accepting filenames or handles
in SeqIO, I was wondering about other ways to make life
a little easier. One is creation of a SeqRecord with the
default argument:
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
rec = SeqRecord(Seq("ACGT"), id="Test")
If the SeqRecord __init__ checked for a plain string as
the sequence, it could automatically upgrade it into a
Seq object with the default argument, thus:
from Bio.SeqRecord import SeqRecord
rec = SeqRecord("ACGT", id="Test")
I'm a little concerned that this will impose a small
but noticeable overhead when working on very
large files though...
What are peoples thoughts on this idea?
Peter
More information about the Biopython-dev
mailing list