public class DataSetKMerEnumerator extends Object implements RecyclableSequenceEnumerator
RecyclableSequenceEnumerator
of Sequence
s that enumerates all k-mers that exist in a given DataSet
, optionally ignoring reverse complements.Constructor and Description |
---|
DataSetKMerEnumerator(DataSet data,
int k,
boolean eliminateRevComp)
Constructs a new DataSetKMerEnumerator from a
DataSet data by extracting all k-mers. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements() |
Sequence |
nextElement() |
void |
reset()
This method enables the user to reuse this enumerator.
|
public DataSetKMerEnumerator(DataSet data, int k, boolean eliminateRevComp) throws OperationNotSupportedException
DataSet
data
by extracting all k-mers.data
- the data to extract the k-mers fromk
- the length of the k-merseliminateRevComp
- whether to ignore the reverse complement of already existing k-mersOperationNotSupportedException
- if a Sequence
in data
does not support to compute the reverse complement but eliminateRevComp
is truepublic void reset()
RecyclableSequenceEnumerator
reset
in interface RecyclableSequenceEnumerator
public boolean hasMoreElements()
hasMoreElements
in interface Enumeration<Sequence>
public Sequence nextElement()
nextElement
in interface Enumeration<Sequence>