Package org.snpeff.nmer

# Class NmerCount

java.lang.Object
org.snpeff.nmer.NmerCount

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `NmerCountWc`

public class NmerCount extends Object implements 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

Modifier and Type
Method
Description
`double`
`avg()`
Average number of nmers
`void`
`count(Nmer nmer)`
Count an instance of this Nmer
`long`
`countLessThan(int threshold)`
Count how many nmers are below a given threshold
`protected int`
`get(long key)`
`int`
`get(Nmer nmer)`
Get kmer count
`long`
`max()`
Max nmer count
`long`
`max(NmerCount nullDistribution)`
Max nmer count
`void`
`random(int iterations)`
Create random sequences and count nmers This is used to create a null distribution
`int`
`size()`
`String`
`toString()`
`String`
`toStringAll()`
`String`
`toStringAll(int minCount)`
`long`
`total()`
Total number of nmers

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## 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

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 String toString()

Overrides:
  `toString` in class `Object`

### toStringAll

public String toStringAll()

### toStringAll

public String toStringAll(int minCount)

### total

public long total()
Total number of nmers

Parameters:
  `threshold` -
Returns: