[Biojava-dev] Re: [Biojava-l] Should Alignment extend Sequence?

Thomas Down thomas at derkholm.net
Tue Jun 10 13:39:40 EDT 2003


Once upon a time, Kalle N?slund wrote:
>
> One can argue if Alignment is the best name for the interface, i am not 
> so sure about
> that =), but changing names of interfaces, is something that breaks 
> everyones code
> and should most likely not be done in a  general .1 release, but perhaps 
> for 2.0 ( whenever
> now that one is comming out )

If we *do* get to the point of making serious interface changes
(and yes, I think this should be for BJ2), my vote would be
for removing the distinction between SymbolLists and Alignments
completely.  It's actually possible to represent a multiple sequence
alignment as a straightforward SymbolList over a crossproduct
Alphabet.  The Alignment interface offers two extra things:

    - Convenience methods for `horizontally' slicing the alignment
      (e.g. extracting a single sequence from a multiple sequence
      alignment)

    - Making it possible to access the individual sequences using
      label objects rather than just indices.

The first set of functionality could perhaps be usefully
rolled into the SymbolList interface.  In much the same way
that all Symbol objects have a getSymbols() method even if
they're not actually cross-product symbols.

The labelling of sequences in an alignment belongs elsewhere.
A SymbolList doesn't have a name (only a Sequence does), so
a straightforward Alignment shouldn't have labels.  Too late
to change in 1.x now, though...

    Thomas.


More information about the biojava-dev mailing list