Class 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 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()  
      java.lang.String toString()  
      java.lang.String toStringAll()  
      java.lang.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 Detail

      • debug

        public static boolean debug
    • Constructor Detail

      • NmerCount

        public NmerCount​(int nmerSize)
    • 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 class java.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: