[Biopython-dev] Improving the Alignment object

Michiel De Hoon mdehoon at c2b2.columbia.edu
Wed Aug 1 01:50:05 UTC 2007


Peter wrote:
> I'm not sure if requests for part of a single row or column like
> [rrr, xxx:yyy:zzz] and [rrr:ppp:qqq, xxx] are best handled by returning
> sub-alignments or as special cases (strings/Seq and Seq/SeqRecord
> respectively?).

Jan wrote:
> For instance, the Alignment object should
> support changing characters in the alignment without a need of copying 
> it (using  aln[a,x] = "D"). Can it be done now with Alignment which is 
> a list of SeqRecord objects with sequences implemented as immutable Seq 
> objects ?
>

If we allow
>>> aln[a,x] = "D"

then we should also allow
>>> aln[a,x:x+4] = "DEFG"
>>> aln[a:a+5,x] = "KLMNO"
and perhaps even
>>> aln[a:a+5,x:x+3] = ["KLMNO","PQRST","UVWXY"]


For consistency, I feel that then aln[a,x:y] and aln[a:b,x] should both
return a string.

--Michiel

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



More information about the Biopython-dev mailing list