public class Nucleotides extends SimpleDataType implements MolecularDataType
MolecularDataType.Utils| Modifier and Type | Field and Description |
|---|---|
static int |
A_STATE |
static int |
C_STATE |
static Nucleotides |
DEFAULT_INSTANCE |
static int |
G_STATE |
static int |
UT_STATE |
AMINO_ACID_DESCRIPTION, AMINOACIDS, CODON_DESCRIPTION, CODONS, GAP_BALANCED, GAP_BALANCED_DESCRIPTION, IUPAC_NUCELOTIDES_DESCRIPTION, IUPACNUCLEOTIDES, NUCLEOTIDE_DESCRIPTION, NUCLEOTIDES, NUMERIC, PRIMARY_SUGGESTED_GAP_CHARACTER, SUGGESTED_GAP_CHARACTERS, SUGGESTED_GAP_STATE, SUGGESTED_UNKNOWN_STATE, TWO_STATE_DESCRIPTION, TWOSTATES, UNKNOWN, UNKNOWN_CHARACTER, UNKNOWN_TLA| Constructor and Description |
|---|
Nucleotides() |
Nucleotides(boolean isRNA)
If isRNA is true than getChar(state) will return a U instead of a T
|
| Modifier and Type | Method and Description |
|---|---|
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
|
getAmbiguousVersion, getChar, getPreferredChar, getPreferredCharImpl, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAmbiguousVersion, getChar, getPreferredChar, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownStatepublic 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
public Nucleotides()
public Nucleotides(boolean isRNA)
public int getNumStates()
DataTypegetNumStates in interface DataTypeprotected final boolean isUnknownStateImpl(int state)
SimpleDataTypeisUnknownStateImpl in class SimpleDataTypeprotected int getStateImpl(char c)
getStateImpl in class SimpleDataTypeprotected char getCharImpl(int state)
getCharImpl in class SimpleDataTypepublic java.lang.String getDescription()
DataTypegetDescription in interface DataTypepublic int getTypeID()
DataTypepublic final boolean isTransitionByState(int firstState,
int secondState)
public final boolean isTransitionByChar(char firstChar,
char secondChar)
public int[] getNucleotideStates(int[] residueStates)
getNucleotideStates in interface MolecularDataTyperesidueStates - an array of states corresponding to states of public int getRelavantLength(int numberOfStates)
public int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates,
int startingIndex)
getMolecularStatesFromSimpleNucleotides in interface MolecularDataTypepublic int[] getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates,
int startingIndex)
getMolecularStatesFromIUPACNucleotides in interface MolecularDataTypepublic boolean isCreatesIUPACNuecleotides()
isCreatesIUPACNuecleotides in interface MolecularDataTypepublic final int getNucleotideLength()
getNucleotideLength in interface MolecularDataTypepublic 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)