jbil.sequence
Class SequenceFactory

java.lang.Object
  extended by jbil.sequence.SequenceFactory

public class SequenceFactory
extends java.lang.Object

Singleton sequence factory.

Author:
Paulo G. S. da Fonseca

Method Summary
 Sequence createDNASequence(java.lang.String strsequence)
          Parses a string into a DNA sequence, that is, a Sequence object.
static SequenceFactory getInstance()
           
 Sequence newSequence(Alphabet alphabet)
          Creates a new empty sequence over the specified base alphabet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SequenceFactory getInstance()
Returns:
The singleton instance of the sequence factory.

newSequence

public Sequence newSequence(Alphabet alphabet)
Creates a new empty sequence over the specified base alphabet.

Parameters:
alphabet -

createDNASequence

public Sequence createDNASequence(java.lang.String strsequence)
Parses a string into a DNA sequence, that is, a Sequence object. The String cannot have characters other than a,g,c,t. Otherwise an InvalidSymbolException is raised. with a DNAAlphabet as base alphabet.

Parameters:
strsequence - The DNA string.