Package org.snpeff.overlap

# 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 Summary

Constructors
Constructor
Description
`SequenceRotator(DnaSequence sequence)`

## Method Summary

Modifier and Type
Method
Description
`DnaSequence`
`calcRor(int rotate)`
`DnaSequence`
`rotate(int rotate)`
Rotate left

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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