[Biojava-l] Collections of sequences

Matthew Pocock mrp@sanger.ac.uk
Sat, 05 May 2001 15:24:05 +0100


David Waring wrote:

> I will be writing programs that deal will collections of sequences, either
> transient or static. I would not modifying the collection in any permantent
> sense just working with the collection. I am trying to figure out whether
> the SequenceDB interface is the place to start or is there another set of
> interfaces/classes geared toward this purpose.

SequenceDB represents any random-access set of sequences. 
SequenceIterator represents a stream of sequences.

> 
> I'll get specific. I want to write something that will run cross_match (or
> some other variant of SW) on two collections of sequences. One collection
> may be a group of contigs in a sequencing project. These could come from an
> an ace file (phrap output) but my program could be dynamicly changing this
> collection. The other would be a fasta file with vector sequences.  I then
> want to pass these off to my cross_matcher class to compare them and give me
> back the results. So I am thinking of extending AbstractSequenceDB to handle
> this with different subclasses for different types of sequences. I want to
> write the cross_matcher so that it will take two collections of various
> types. Does this seem like an appropriate use of SequenceDB?
> 
> David

Why do you need sub-classes of SequenceDB for the two collections? Would 
the two have different funcitonality? You can force a SequenceDB to be 
immutable by something like this:

seqDB.addChangeListener(ChangeListener.VETO_ALL, SequenceDB.SEQUENCES);

It sounds like the fasta file is being used more as a serialized version 
of a steam of sequences, where as the contigs are being treated as a 
dynamic SequenceDB. Anyhow, the actual cross_match class will look prety 
much the same regardless.

Keep us posted. I will be happy to help where I can.

Matthew

> 
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||
> |   David Waring
> |   Systems Programmer
> |   University of Washington Genome Center
> |   dwaring@u.washington.edu
> |   (206) 221-6902
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l