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.SerializableMark 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 booleandebug
-
Constructor Summary
Constructors Constructor Description NmerCount(int nmerSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleavg()Average number of nmersvoidcount(Nmer nmer)Count an instance of this NmerlongcountLessThan(int threshold)Count how many nmers are below a given thresholdprotected intget(long key)intget(Nmer nmer)Get kmer countlongmax()Max nmer countlongmax(NmerCount nullDistribution)Max nmer countvoidrandom(int iterations)Create random sequences and count nmers This is used to create a null distributionintsize()java.lang.StringtoString()java.lang.StringtoStringAll()java.lang.StringtoStringAll(int minCount)longtotal()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:
toStringin 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:
-
-