Package org.snpeff.nmer
Class NmerCount
- java.lang.Object
-
- org.snpeff.nmer.NmerCount
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
NmerCountWc
public class NmerCount extends java.lang.Object implements java.io.Serializable
Mark if an Nmer has been 'seen' It only count up to 255 (one byte per counter)- Author:
- pcingola
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
debug
-
Constructor Summary
Constructors Constructor Description NmerCount(int nmerSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
avg()
Average number of nmersvoid
count(Nmer nmer)
Count an instance of this Nmerlong
countLessThan(int threshold)
Count how many nmers are below a given thresholdprotected int
get(long key)
int
get(Nmer nmer)
Get kmer countlong
max()
Max nmer countlong
max(NmerCount nullDistribution)
Max nmer countvoid
random(int iterations)
Create random sequences and count nmers This is used to create a null distributionint
size()
java.lang.String
toString()
java.lang.String
toStringAll()
java.lang.String
toStringAll(int minCount)
long
total()
Total number of nmers
-
-
-
Method Detail
-
avg
public double avg()
Average number of nmers- Parameters:
threshold
-- Returns:
-
count
public void count(Nmer nmer)
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
public int get(Nmer nmer)
Get kmer count- Parameters:
nmer
-- Returns:
-
max
public long max()
Max nmer count- Parameters:
threshold
-- Returns:
-
max
public long max(NmerCount nullDistribution)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringAll
public java.lang.String toStringAll()
-
toStringAll
public java.lang.String toStringAll(int minCount)
-
total
public long total()
Total number of nmers- Parameters:
threshold
-- Returns:
-
-