|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpal.datatype.SimpleDataType
pal.datatype.Nucleotides
public class Nucleotides
implements DataType for nucleotides
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pal.datatype.MolecularDataType |
---|
MolecularDataType.Utils |
Field Summary | |
---|---|
static int |
A_STATE
|
static int |
C_STATE
|
static Nucleotides |
DEFAULT_INSTANCE
|
static int |
G_STATE
|
static int |
UT_STATE
|
Constructor Summary | |
---|---|
Nucleotides()
|
|
Nucleotides(boolean isRNA)
If isRNA is true than getChar(state) will return a U instead of a T |
Method Summary | |
---|---|
static void |
complementSequence(int[] sequence)
Complement of a sequence of nucleotides (or IUPACNucleotides - but IUPAC ness is lost) |
protected char |
getCharImpl(int state)
Get character corresponding to a given state |
static int |
getComplementState(int baseState)
Obtain the complement state |
java.lang.String |
getDescription()
description of data type |
int[] |
getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates,
int startingIndex)
|
int[] |
getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates,
int startingIndex)
|
int |
getNucleotideLength()
|
int[] |
getNucleotideStates(int[] residueStates)
|
int |
getNumStates()
get number of unique states |
int |
getRelavantLength(int numberOfStates)
|
static int[] |
getSequenceComplement(int[] sequence)
Obtain the complement of a sequence of nucleotides (or IUPACNucleotides - but IUPAC ness is lost) |
protected int |
getStateImpl(char c)
Get state corresponding to character c NOTE: IF YOU CHANGE THIS IT MAY STOP THE NUCLEOTIDE TRANSLATOR FROM WORKING! - It relies on the fact that all the states for 'ACGTU' are between [0, 3] |
int |
getTypeID()
get numerical code describing the data type |
boolean |
isCreatesIUPACNuecleotides()
|
boolean |
isTransitionByChar(char firstChar,
char secondChar)
|
boolean |
isTransitionByState(int firstState,
int secondState)
|
protected boolean |
isUnknownStateImpl(int state)
For subclasses to handle, without regard for gaps |
Methods inherited from class pal.datatype.SimpleDataType |
---|
getAmbiguousVersion, getChar, getPreferredChar, getPreferredCharImpl, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface pal.datatype.DataType |
---|
getAmbiguousVersion, getChar, getPreferredChar, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState |
Field Detail |
---|
public static final int A_STATE
public static final int C_STATE
public static final int G_STATE
public static final int UT_STATE
public static final Nucleotides DEFAULT_INSTANCE
Constructor Detail |
---|
public Nucleotides()
public Nucleotides(boolean isRNA)
Method Detail |
---|
public int getNumStates()
DataType
getNumStates
in interface DataType
protected final boolean isUnknownStateImpl(int state)
SimpleDataType
isUnknownStateImpl
in class SimpleDataType
protected int getStateImpl(char c)
getStateImpl
in class SimpleDataType
protected char getCharImpl(int state)
getCharImpl
in class SimpleDataType
public java.lang.String getDescription()
DataType
getDescription
in interface DataType
public int getTypeID()
DataType
getTypeID
in interface DataType
public final boolean isTransitionByState(int firstState, int secondState)
public final boolean isTransitionByChar(char firstChar, char secondChar)
public int[] getNucleotideStates(int[] residueStates)
getNucleotideStates
in interface MolecularDataType
residueStates
- an array of states corresponding to states of public int getRelavantLength(int numberOfStates)
public int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates, int startingIndex)
getMolecularStatesFromSimpleNucleotides
in interface MolecularDataType
public int[] getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates, int startingIndex)
getMolecularStatesFromIUPACNucleotides
in interface MolecularDataType
public boolean isCreatesIUPACNuecleotides()
isCreatesIUPACNuecleotides
in interface MolecularDataType
public final int getNucleotideLength()
getNucleotideLength
in interface MolecularDataType
public static final int getComplementState(int baseState)
baseState
- the base state to complement (may be IUPAC but IUPACness is lost)
public static final int[] getSequenceComplement(int[] sequence)
sequence
- the sequence (of nucleotide states)
public static final void complementSequence(int[] sequence)
sequence
- the sequence (of nucleotide states) (is modified)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |