public class SequenceTools extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
NUCLEOTIDE_LETTERS |
Constructor and Description |
---|
SequenceTools() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equalLengthSequences(ProteinSequence[] sequences)
A method to check whether an array of sequences contains at least two sequences having an equal length.
|
Sequence<?> |
getSequenceFromString(String sequence) |
static boolean |
isNucleotideSequence(String sequence) |
static int |
percentNucleotideSequence(String sequence) |
static String |
permuteCyclic(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 String NUCLEOTIDE_LETTERS
public SequenceTools()
public static String permuteCyclic(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(String sequence)
public static boolean isNucleotideSequence(String sequence)
public Sequence<?> getSequenceFromString(String sequence) throws CompoundNotFoundException
CompoundNotFoundException
public static boolean equalLengthSequences(ProteinSequence[] sequences)
sequences
- the array of ProteinSequence
sequencesCopyright © 2000–2018 BioJava. All rights reserved.