Package org.snpeff.overlap
Class SequenceRotator
- java.lang.Object
-
- org.snpeff.overlap.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 Summary
Constructors Constructor Description SequenceRotator(DnaSequence sequence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnaSequence
calcRor(int rotate)
DnaSequence
rotate(int rotate)
Rotate left
-
-
-
Constructor Detail
-
SequenceRotator
public SequenceRotator(DnaSequence sequence)
-
-
Method Detail
-
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
-
-