public class SequenceTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
NUCLEOTIDE_LETTERS |
Constructor and Description |
---|
SequenceTools() |
Modifier and Type | Method and Description |
---|---|
Sequence<?> |
getSequenceFromString(java.lang.String sequence) |
static boolean |
isNucleotideSequence(java.lang.String sequence) |
static int |
percentNucleotideSequence(java.lang.String sequence) |
static java.lang.String |
permuteCyclic(java.lang.String string,
int n)
Cyclically permute the characters in
string forward by n elements. |
static <T> void |
permuteCyclic(T[] array,
T[] fill,
int n)
Cyclically permute
array forward by n elements. |
protected static final java.lang.String NUCLEOTIDE_LETTERS
public static java.lang.String permuteCyclic(java.lang.String string, int n)
string
forward by n
elements.string
- The string to permuten
- The number of characters to permute by; can be positive or negative; values greater than the length of the array are acceptablepublic static <T> void permuteCyclic(T[] array, T[] fill, int n)
array
forward by n
elements.array
- The original result; will not be changedfill
- The permuted result will be filled into this arrayn
- The number of elements to permute by; can be positive or negative; values greater than the length of the array are acceptablepublic static int percentNucleotideSequence(java.lang.String sequence)
public static boolean isNucleotideSequence(java.lang.String sequence)
public Sequence<?> getSequenceFromString(java.lang.String sequence) throws CompoundNotFoundException
CompoundNotFoundException