Package org.snpeff.nmer
Class NmerCount
java.lang.Object
org.snpeff.nmer.NmerCount
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NmerCountWc
Mark if an Nmer has been 'seen'
It only count up to 255 (one byte per counter)
- Author:
- pcingola
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
avg()
Average number of nmersvoid
Count an instance of this Nmerlong
countLessThan
(int threshold) Count how many nmers are below a given thresholdprotected int
get
(long key) int
Get kmer countlong
max()
Max nmer countlong
Max nmer countvoid
random
(int iterations) Create random sequences and count nmers This is used to create a null distributionint
size()
toString()
toStringAll
(int minCount) long
total()
Total number of nmers
-
Field Details
-
debug
public static boolean debug
-
-
Constructor Details
-
NmerCount
public NmerCount(int nmerSize)
-
-
Method Details
-
avg
public double avg()Average number of nmers- Parameters:
threshold
-- Returns:
-
count
Count an instance of this Nmer- Parameters:
nmer
-
-
countLessThan
public long countLessThan(int threshold) Count how many nmers are below a given threshold- Parameters:
threshold
-- Returns:
-
get
protected int get(long key) -
get
Get kmer count- Parameters:
nmer
-- Returns:
-
max
public long max()Max nmer count- Parameters:
threshold
-- Returns:
-
max
Max nmer count- Parameters:
threshold
-- Returns:
-
random
public void random(int iterations) Create random sequences and count nmers This is used to create a null distribution- Parameters:
iterations
-
-
size
public int size() -
toString
-
toStringAll
-
toStringAll
-
total
public long total()Total number of nmers- Parameters:
threshold
-- Returns:
-