uk.ac.man.bioinf.sequence
Class SequenceFactory

java.lang.Object
  |
  +--uk.ac.man.bioinf.sequence.SequenceFactory

public class SequenceFactory
extends Object

SequenceFactory provides a simple way into the Sequence API. It offers factory methods to create sequences from Strings and Characters. This, combined with the methods in the utility class Sequences is probably all that most users will need. Created: Tue Nov 14 18:06:37 2000

Version:
$Id: SequenceFactory.java,v 1.3 2001/04/11 17:04:43 lord Exp $
Author:
Phillip Lord
, Crispin Miller

Field Summary
protected static AminoAcid[] aa
           
 
Constructor Summary
SequenceFactory()
           
 
Method Summary
static Sequence getDNASequence(char[] dnaSequence)
          Create a Sequence representing a DNA sequence.
static Sequence getDNASequence(String dnaSequence)
          Create a Sequence representing a DNA sequence.
static Sequence getProteinSequence(char[] proteinSequence)
          Create a Sequence representing a protein sequence.
static Sequence getProteinSequence(String proteinSequence)
          Create a Sequence representing a protein sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aa

protected static AminoAcid[] aa
Constructor Detail

SequenceFactory

public SequenceFactory()
Method Detail

getProteinSequence

public static Sequence getProteinSequence(char[] proteinSequence)
                                   throws InvalidSequenceTypeException
Create a Sequence representing a protein sequence.

Parameters:
proteinSequence - a character array representing the residues in the sequence - see AminoAcid for more details
Throws:
InvalidSequenceTypeException - if the input sequence contains an invalid character.

getProteinSequence

public static Sequence getProteinSequence(String proteinSequence)
                                   throws InvalidSequenceTypeException
Create a Sequence representing a protein sequence.

Parameters:
proteinSequence - represents the residues in the sequence - see AminoAcid for more details
Throws:
InvalidSequenceTypeException - if the input sequence contains an invalid character.

getDNASequence

public static Sequence getDNASequence(char[] dnaSequence)
                               throws InvalidSequenceTypeException
Create a Sequence representing a DNA sequence.

Parameters:
dnaSequence - represents the residues in the sequence - see Nucleotide for more details
Throws:
InvalidSequenceTypeException - if the input sequence contains an invalid character.

getDNASequence

public static Sequence getDNASequence(String dnaSequence)
                               throws InvalidSequenceTypeException
Create a Sequence representing a DNA sequence.

Parameters:
dnaSequence - represents the residues in the sequence - see Nucleotide for more details
Throws:
InvalidSequenceTypeException - if the input sequence contains an invalid character.