[Biopython-dev] Simpler SeqRecord creation
Michiel de Hoon
mjldehoon at yahoo.com
Sat May 15 12:19:05 EDT 2010
Simpler SeqRecord creation is good in itself, but I wouldn't spend too much time on int. If hopefully we some day deprecate alphabets, then a Seq object reduces to a string anyway.
--Michiel.
--- On Sat, 5/15/10, Peter <biopython at maubp.freeserve.co.uk> wrote:
> From: Peter <biopython at maubp.freeserve.co.uk>
> Subject: [Biopython-dev] Simpler SeqRecord creation
> To: "Biopython-Dev Mailing List" <biopython-dev at lists.open-bio.org>
> Date: Saturday, May 15, 2010, 6:32 AM
> 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
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>
More information about the Biopython-dev
mailing list