Package sequence
Interface Sequence
-
- All Known Implementing Classes:
DiskSequence,MemorySequence
public interface Sequence
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbuildIndex(long k)Builds the index based on the length of the k-mer.BasegetBase(long position)List<Long>getMatchingPositions(Sequence kmer)Gets positions of the sequence that matches with k-mer.longgetSize()
-
-
-
Method Detail
-
buildIndex
void buildIndex(long k) throws ExceptionBuilds the index based on the length of the k-mer.- Parameters:
k- length of the k-mer- Throws:
Exception- throws exception when errors occur on database end
-
getMatchingPositions
List<Long> getMatchingPositions(Sequence kmer) throws Exception
Gets positions of the sequence that matches with k-mer. If an index has been built, then this method tries to use that index to perform faster look-up.- Parameters:
kmer- sub-sequence to search for- Returns:
- list of matching starting positions in this sequence
- Throws:
Exception- throws exception
-
getSize
long getSize()
- Returns:
- size of the sequence
-
getBase
Base getBase(long position)
- Parameters:
position- the position of the sequence- Returns:
- the base at the position provided
-
-