Package org.snpeff.binseq.indexer
Class SuffixIndexerNmer<T extends BinarySequence>
- java.lang.Object
-
- org.snpeff.binseq.indexer.SequenceIndexer<T>
-
- org.snpeff.binseq.indexer.SuffixIndexerNmer<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Comparator<java.lang.Long>
public class SuffixIndexerNmer<T extends BinarySequence> extends SequenceIndexer<T>
Index all suffixes of all the sequences (it indexes using Nmers). Note: Under the current structure, only exact overlap matches are allowed- Author:
- pcingola
-
-
Constructor Summary
Constructors Constructor Description SuffixIndexerNmer(SubsequenceComparator<T> subsequenceComparator, int nmerSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
add(T sequence)
Add a sequence to this indexOverlapRessult<T>
findBestOverlap(T sequence)
Find best overlap for 'sequence'OverlapFilter<T>
getOverlapFilter()
java.util.Iterator<T>
iterator()
boolean
overlap(T sequence)
Find the best possible overlap and join the sequences or just add add the sequence to the indexvoid
printSequences()
void
sanityCheck()
Perform consistency checksvoid
setOverlapFilter(OverlapFilter<T> overlapFilter)
java.lang.String
toString()
java.lang.String
toStringSequences()
-
Methods inherited from class org.snpeff.binseq.indexer.SequenceIndexer
add, compare, get, size
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
SuffixIndexerNmer
public SuffixIndexerNmer(SubsequenceComparator<T> subsequenceComparator, int nmerSize)
-
-
Method Detail
-
add
public int add(T sequence)
Add a sequence to this index- Overrides:
add
in classSequenceIndexer<T extends BinarySequence>
- Parameters:
sequence
-- Returns:
- Index to this sequence (a number that can be used to retrieve this sequence)
-
findBestOverlap
public OverlapRessult<T> findBestOverlap(T sequence)
Find best overlap for 'sequence'- Parameters:
sequence
-- Returns:
- An overlap result
-
getOverlapFilter
public OverlapFilter<T> getOverlapFilter()
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<T extends BinarySequence>
- Overrides:
iterator
in classSequenceIndexer<T extends BinarySequence>
-
overlap
public boolean overlap(T sequence)
Find the best possible overlap and join the sequences or just add add the sequence to the index- Parameters:
sequence
-- Returns:
- true if an overlap was found and false if no overlap was found
-
printSequences
public void printSequences()
-
sanityCheck
public void sanityCheck()
Perform consistency checks
-
setOverlapFilter
public void setOverlapFilter(OverlapFilter<T> overlapFilter)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringSequences
public java.lang.String toStringSequences()
-
-