de.jstacs.data
Class DataSetKMerEnumerator
java.lang.Object
de.jstacs.data.DataSetKMerEnumerator
- All Implemented Interfaces:
- RecyclableSequenceEnumerator, Enumeration<Sequence>
public class DataSetKMerEnumerator
- extends Object
- implements RecyclableSequenceEnumerator
Class for an RecyclableSequenceEnumerator
of Sequence
s that enumerates all k-mers that exist in a given DataSet
, optionally ignoring reverse complements.
- Author:
- Jens Keilwagen, Jan Grau
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSetKMerEnumerator
public DataSetKMerEnumerator(DataSet data,
int k,
boolean eliminateRevComp)
throws OperationNotSupportedException
- Constructs a new DataSetKMerEnumerator from a
DataSet
data
by extracting all k-mers.
- Parameters:
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-mers
- Throws:
OperationNotSupportedException
- if a Sequence
in data
does not support to compute the reverse complement but eliminateRevComp
is true
reset
public void reset()
- Description copied from interface:
RecyclableSequenceEnumerator
- This method enables the user to reuse this enumerator.
- Specified by:
reset
in interface RecyclableSequenceEnumerator
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interface Enumeration<Sequence>
nextElement
public Sequence nextElement()
- Specified by:
nextElement
in interface Enumeration<Sequence>