public class CounterManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
CounterManager.Counter
Class represents an integer array with methods to increment and get the values from it with respect
to offset of outer
CounterManager . |
Constructor and Description |
---|
CounterManager(int arrayLength,
int readLength)
Constructor creates new CounterManager without any Counters,
counters are added to CounterManager via newCounter() method
|
Modifier and Type | Method and Description |
---|---|
void |
checkOutOfBounds(int locusPosition)
Method checks that new locus position is not out of bounds of Counter arrays and there is enough
space in them to hold information on at least one more read of length
this#readLength . |
void |
clear()
Clears all inner Counter arrays
|
CounterManager.Counter |
newCounter()
Creates a new Counter object and adds it to the list of managed Counters.
|
public CounterManager(int arrayLength, int readLength)
arrayLength
- length of inner Counter arraysreadLength
- proposed length of processed readspublic void checkOutOfBounds(int locusPosition)
this#readLength
.
If there is no free space, but there is accumulated information in Counter arrays after new locus position
that we may need, the arrays are rebased, so that 0 index of arrays represents new locus position.
In other case, we just clear the arrays.locusPosition
- position in the reference sequence,
that will be represented by index 0 of CounterManager.Counter
arrays.public void clear()
public CounterManager.Counter newCounter()
CounterManager.Counter
, that will be managed by current CounterManager