Mobios v0.91

mobios.type
Class DNA

java.lang.Object
  extended by mobios.type.Sequence
      extended by mobios.type.DNA
All Implemented Interfaces:
Serializable

public class DNA
extends Sequence

A DNA is a compact representation of a DNA sequence.

Version:
2003.06.06
Author:
Rui Mao, Willard
See Also:
Serialized Form

Nested Class Summary
static class DNA.DNASymbol
           
 
Field Summary
static Alphabet ALPHABET
          The alphabet of DNASymbols.
static WeightMatrix EditDistanceWeightMatrix
          A complete EditDistanceWeightMatrix: { 0, 1, 1, 1, 0.5, 1, 0.5, 1, 0.5, 1, 1, 0.5, 0.5, 0.5, 0.5 },// A Adenine { 1, 0, 1, 1, 1, 0.5, 0.5, 1, 1, 0.5, 0.5, 1, 0.5, 0.5, 0.5 },// C Cytosine { 1, 1, 0, 1, 0.5, 1, 1, 0.5, 1, 0.5, 0.5, 0.5, 1, 0.5, 0.5 },// G Guanine { 1, 1, 1, 0, 1, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 1, 0.5 },// T Thymine { 0.5, 1, 0.5, 1, 0, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 }, // R Purine (A or G) { 1, 0.5, 1, 0.5, 1, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 },// Y Pyrimidine (C, T, or U) { 0.5, 0.5, 1, 1, 0.5, 0.5, 0, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 },// M C or A { 1, 1, 0.5, 0.5, 0.5, 0.5, 1, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 },// K T, U, or G { 0.5, 1, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 1, 0.5, 0.5, 0.5, 0.5, 0.5 },// W T, U, or A { 1, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 0.5, 1, 0, 0.5, 0.5, 0.5, 0.5, 0.5 },// S C or G { 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5, 0.5, 0.5, 0.5 },// B C, T, U, or G (not A) { 0.5, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5, 0.5, 0.5 },// D A, T, U, or G (not C) { 0.5, 0.5, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5, 0.5 },// H A, T, U, or C (not G) { 0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5 },// V A, C, or G (not T, not U) { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0 }// N Anybase (A,C,G,T,or U)
static Alphabet SIMPLE_ALPHABET
          A simple alphabet of DNASymbols.
static WeightMatrix SimpleDNAEditDistanceMatrix
          The SimpleDNAEditDistanceMatrix looks like: {0,1,1,1}, {1,0,1,1}, {1,1,0,1}, {1,1,1,0}
static WeightMatrix SimpleWeightedDNAMatrix
          A simpleWeightedDNAMatrix.
 
Constructor Summary
DNA(String sequenceID, String sequence)
          Construct a DNA.
 
Method Summary
 Symbol get(int index)
           
 Alphabet getAlphabet()
           
 String toString()
           
 
Methods inherited from class mobios.type.Sequence
getSequenceID, numFragments, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALPHABET

public static final Alphabet ALPHABET
The alphabet of DNASymbols. Includes all of the symbols in DNASymbol.


SIMPLE_ALPHABET

public static final Alphabet SIMPLE_ALPHABET
A simple alphabet of DNASymbols. Only includes A,C, T, and G.


SimpleDNAEditDistanceMatrix

public static final WeightMatrix SimpleDNAEditDistanceMatrix
The SimpleDNAEditDistanceMatrix looks like: {0,1,1,1}, {1,0,1,1}, {1,1,0,1}, {1,1,1,0}


SimpleWeightedDNAMatrix

public static final WeightMatrix SimpleWeightedDNAMatrix
A simpleWeightedDNAMatrix. { 0, 2 / 3, 2 / 3, 2 / 3 }, { 2 / 3, 0, 2 / 3, 2 / 3 }, { 2 / 3, 2 / 3, 0, 1 }, { 2 / 3, 2 / 3, 1, 0 } }


EditDistanceWeightMatrix

public static final WeightMatrix EditDistanceWeightMatrix
A complete EditDistanceWeightMatrix: { 0, 1, 1, 1, 0.5, 1, 0.5, 1, 0.5, 1, 1, 0.5, 0.5, 0.5, 0.5 },// A Adenine { 1, 0, 1, 1, 1, 0.5, 0.5, 1, 1, 0.5, 0.5, 1, 0.5, 0.5, 0.5 },// C Cytosine { 1, 1, 0, 1, 0.5, 1, 1, 0.5, 1, 0.5, 0.5, 0.5, 1, 0.5, 0.5 },// G Guanine { 1, 1, 1, 0, 1, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 1, 0.5 },// T Thymine { 0.5, 1, 0.5, 1, 0, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 }, // R Purine (A or G) { 1, 0.5, 1, 0.5, 1, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 },// Y Pyrimidine (C, T, or U) { 0.5, 0.5, 1, 1, 0.5, 0.5, 0, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 },// M C or A { 1, 1, 0.5, 0.5, 0.5, 0.5, 1, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 },// K T, U, or G { 0.5, 1, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 1, 0.5, 0.5, 0.5, 0.5, 0.5 },// W T, U, or A { 1, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 0.5, 1, 0, 0.5, 0.5, 0.5, 0.5, 0.5 },// S C or G { 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5, 0.5, 0.5, 0.5 },// B C, T, U, or G (not A) { 0.5, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5, 0.5, 0.5 },// D A, T, U, or G (not C) { 0.5, 0.5, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5, 0.5 },// H A, T, U, or C (not G) { 0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5 },// V A, C, or G (not T, not U) { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0 }// N Anybase (A,C,G,T,or U)

Constructor Detail

DNA

public DNA(String sequenceID,
           String sequence)
Construct a DNA.

Parameters:
sequenceID - the sequence ID of the DNA sequence. can be the accession number, or a user assigned ID.
sequence - a string representing a DNA sequence.
Method Detail

getAlphabet

public Alphabet getAlphabet()
Specified by:
getAlphabet in class Sequence
Returns:

get

public Symbol get(int index)
Specified by:
get in class Sequence
Parameters:
index - an integer index value
Returns:
the Symbol corresponding to that index.

toString

public String toString()
Specified by:
toString in class Sequence

Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group