[Biopython-dev] Quality scores (and per-letter-annotation) in a SeqRecord?

Jose Blanca jblanca at btc.upv.es
Tue Feb 24 09:26:02 EST 2009


> Your code seems a little more complicated, but should work too.  It
> would mean that if the parent SeqRecord's seq property was altered,
>the per-letter-annotation dictionary would know the new length.
I did it that way to allow the creation of an empty SeqRecord and to modify 
the seq property after the creation. I don't know if that's a behaviour 
supported by biopython, but it can be done now. Your proposed seq property 
implementation could take care of that removing the possibility of setting 
seq after the creation.

> > 2) I change the parent SeqRecord sequence by adding some more symbols to
> > it. I've just destroyed the association between the per-symbol-annotation
> > and my sequence without even realising it.  I'd prefer a warning that
> > this is going to happen before it destroys my earlier work, so I can make
> > the change in a duplicate SeqRecord object.
>
> This situation could be caught by a set method for the SeqRecord seq
> property (not implemented yet).  I was thinking this would silently
> throw away the old per-symbol-annotation, but this could instead raise
> an error (and make no changes), or issue a warning (but carry on).
> Good point.
I would also prefer to raise an error in that case, because the user wouldn't 
be aware of the problem if the per-symbol-annotation is thown away without 
any warning.
Regards,

-- 
Jose M. Blanca Postigo
Instituto Universitario de Conservacion y
Mejora de la Agrodiversidad Valenciana (COMAV)
Universidad Politecnica de Valencia (UPV)
Edificio CPI (Ciudad Politecnica de la Innovacion), 8E
46022 Valencia (SPAIN)
Tlf.:+34-96-3877000 (ext 88473)



More information about the Biopython-dev mailing list