Package org.biojava.nbio.core.util
Class SequenceTools
- java.lang.Object
-
- org.biojava.nbio.core.util.SequenceTools
-
public class SequenceTools extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
NUCLEOTIDE_LETTERS
-
Constructor Summary
Constructors Constructor Description SequenceTools()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 instring
forward byn
elements.static <T> void
permuteCyclic(T[] array, T[] fill, int n)
Cyclically permutearray
forward byn
elements.
-
-
-
Field Detail
-
NUCLEOTIDE_LETTERS
protected static final java.lang.String NUCLEOTIDE_LETTERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
permuteCyclic
public static java.lang.String permuteCyclic(java.lang.String string, int n)
Cyclically permute the characters instring
forward byn
elements.- Parameters:
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 acceptable
-
permuteCyclic
public static <T> void permuteCyclic(T[] array, T[] fill, int n)
Cyclically permutearray
forward byn
elements.- Parameters:
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 acceptable
-
percentNucleotideSequence
public static int percentNucleotideSequence(java.lang.String sequence)
-
isNucleotideSequence
public static boolean isNucleotideSequence(java.lang.String sequence)
-
getSequenceFromString
public Sequence<?> getSequenceFromString(java.lang.String sequence) throws CompoundNotFoundException
- Throws:
CompoundNotFoundException
-
-