Class SequenceRotator


  • public class SequenceRotator
    extends java.lang.Object
    Rotates a binary packed sequence WARNING: We only rotate up to Coder.basesPerWord() because after that the sequences are the same (with an integer offset) NOTE: Left rotation 'n' is the same as a right rotation 'Coder.basesPerWord() - n'
    Author:
    pcingola
    • Constructor Detail

      • SequenceRotator

        public SequenceRotator​(DnaSequence sequence)
    • Method Detail

      • rotate

        public DnaSequence rotate​(int rotate)
        Rotate left
        Parameters:
        rotate - : A number of rotations to the right (if positive) or to the left (if negative) WARNING: We only rotate up to BinCoder.BASES_PER_WORD because after that the sequences are the same (with an integer offset)
        Returns:
        A rotated sequence