[Biojava-l] Should Alignment extend Sequence?

Kalle Näslund kalle.naslund at genpat.uu.se
Tue Jun 10 14:03:58 EDT 2003


Bradford Powell wrote:

>
>So, resulting questions are:
>
>Are there established reasons for _not_ having Alignments extend Sequence?
>(am I stepping into an old argument...?)
>
If Alignment were to extend Sequence, you will effectively be forcing 
anyone that
wants to work with alignments into using full blown sequence objects. 
Its a bit like
saying we should drop SymbolList and require people to use fullblown 
Sequence
objects everywhere.

Biojava so far seems to have gone towards the direction of keeping its 
interfaces
as simple and as small as possible. Its imho a good design. as it makes 
it easier to adopt
new types of objects to the framework, and objects implementing the 
interfaces tend to
have sane implementations that just dont throws exceptions saying 
"operation not
supported" or returning som autogenerated output that says "seq1", 
"seq2", "seq3" etc.

Sometimes with some types of data, it makes sense to have the 
capabilities to add Annotations and
features to the Alignment. Then you will have to use something more 
"advanced" then a SimpleAlignment.
but that doesnt mean we should have all our methods ONLY accepting those 
more "advanced" objects.
 

>If not, what would people think about making a change so that Alignments
>extend Sequence?
>  
>
I would think its not a good idea, as i have pointed out above, i think 
we should leave
alignment as it is ( basicly just a SymbolList with some extra methods ) 
and as far
as possible, only require the use of SymbolList or Alignment, and not 
require
everyone to use Sequence or other more complex interfaces.

BUT, we should perhaps add an implementation of the Alignment Interface, 
where you
can add features, annotations etc to it. I would think that is something 
people can find
usefull ( it seems you do, and i bet others will find it usefull to =) )

>If Alignments should extend that interface that is currently called
>"Sequence", should the name be changed to be semantically less confusing or
>should we just accept a broader interpretation of what the word "sequence"
>means?
>  
>
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 )

>-- Bradford Powell
>-- bradford_powell at unc.edu
>
>[1] http://diploid.med.unc.edu/~bradford/AlignmentViewer/
>[2] http://biojava.org/pipermail/biojava-l/2003-May/003801.html
>
>_______________________________________________
>Biojava-l mailing list  -  Biojava-l at biojava.org
>http://biojava.org/mailman/listinfo/biojava-l
>  
>




More information about the Biojava-l mailing list