jbil.sequence
Interface KMerCounter

All Known Implementing Classes:
FactorTrie, Trie, TrieForest

public interface KMerCounter

Contains methods for counting kmers in sets of sequences.

Author:
Paulo G. S. da Fonseca

Method Summary
 Pair<java.lang.Integer,java.lang.Integer> countOccurrences(Sequence pattern, int beginIndex, int endIndex, int offset)
          Counts the number of occurrences of the kmers pattern[beginIndex..endIndex-2] and pattern[beginIndex..endIndex-1] respectively, from a given position in a set of sequences.
 int sequenceCount()
          Returns the number of sequences over which kmers are counted.
 

Method Detail

sequenceCount

int sequenceCount()
Returns the number of sequences over which kmers are counted.


countOccurrences

Pair<java.lang.Integer,java.lang.Integer> countOccurrences(Sequence pattern,
                                                           int beginIndex,
                                                           int endIndex,
                                                           int offset)
Counts the number of occurrences of the kmers pattern[beginIndex..endIndex-2] and pattern[beginIndex..endIndex-1] respectively, from a given position in a set of sequences. For example, if the sequences are {acggt, ggacg, acgcg, cggcg}, then the pattern cg occurs once from position 0, twice from position 1, and three times from position 3.

Parameters:
pattern - The base pattern.
beginIndex - The start position of the subpattern to be counted.
endIndex - The end position (not inclusive) of the subpattern to be counted.
offset - The position at which the match must begin.