Class 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()  
    • Field Detail

      • NUCLEOTIDE_LETTERS

        protected static final java.lang.String NUCLEOTIDE_LETTERS
        See Also:
        Constant Field Values
    • Constructor Detail

      • SequenceTools

        public SequenceTools()
    • Method Detail

      • permuteCyclic

        public static java.lang.String permuteCyclic​(java.lang.String string,
                                                     int n)
        Cyclically permute the characters in string forward by n elements.
        Parameters:
        string - The string to permute
        n - 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 permute array forward by n elements.
        Parameters:
        array - The original result; will not be changed
        fill - The permuted result will be filled into this array
        n - 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)
      • equalLengthSequences

        public static boolean equalLengthSequences​(ProteinSequence[] sequences)
        A method to check whether an array of sequences contains at least two sequences having an equal length.
        Parameters:
        sequences - the array of ProteinSequence sequences
        Returns:
        true if any two sequences are of an equal length