Class SequenceRotator

java.lang.Object
org.snpeff.overlap.SequenceRotator

public class SequenceRotator extends 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 Details

    • SequenceRotator

      public SequenceRotator(DnaSequence sequence)
  • Method Details

    • calcRor

      public DnaSequence calcRor(int rotate)
    • 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