de.jstacs.data
Class SampleKMerEnumerator
java.lang.Object
de.jstacs.data.SampleKMerEnumerator
- All Implemented Interfaces:
- RecyclableSequenceEnumerator, Enumeration<Sequence>
public class SampleKMerEnumerator
- extends Object
- implements RecyclableSequenceEnumerator
Class for an RecyclableSequenceEnumerator of Sequences that enumerates all k-mers that exist in a given Sample, optionally ignoring reverse complements.
- Author:
- Jens Keilwagen, Jan Grau
|
Constructor Summary |
SampleKMerEnumerator(Sample data,
int k,
boolean eliminateRevComp)
Constructs a new SampleKMerEnumerator from a Sample data by extracting all k-mers. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SampleKMerEnumerator
public SampleKMerEnumerator(Sample data,
int k,
boolean eliminateRevComp)
throws OperationNotSupportedException
- Constructs a new SampleKMerEnumerator from a
Sample 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>