Class ScoreList

  • Direct Known Subclasses:
    PvaluesList

    public class ScoreList
    extends java.lang.Object
    A list of scores
    Author:
    pcingola
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ScoreList.ScoreSummary  
    • Constructor Summary

      Constructors 
      Constructor Description
      ScoreList()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(double score)
      Add a p-value to the list
      double avg()
      Get average
      double avgLargestTop​(int topN)
      Get average pvalue (largest N)
      double avgSmallestTop​(int topN)
      Get average score (smallest N)
      double cdf​(double p)
      Cumulative distribution function of p-values: P[ pValues <= p ] (i.e.
      double cdfUpper​(double p)
      Cumulative distribution function of p-values: P[ pValues > p ] (i.e.
      static double chiSquareCDFComplementary​(double chiSquare, int nu)
      Upper tail 1 - ChiSquareCDF(p)
      protected double getDefaultValue()  
      java.lang.String getGeneId()  
      double getScore​(int index)  
      double max()
      Get minimum pvalue
      double min()
      Get minimum pvalue
      double pValueBonferroni()
      Minimum p-value corrected using Bonferroni
      double pValueFdr​(double alpha)
      Combine p-values using FDR procedure References: http://en.wikipedia.org/wiki/False_discovery_rate
      double pValueFisherChi2()
      Combine p-values using Fisher's method References: http://en.wikipedia.org/wiki/Fisher's_method
      double pValueSimes()
      Combine p-values using Simes's procedure References: http://biomet.oxfordjournals.org/content/73/3/751
      double pValueZScore()
      Combine p-values using Stouffer's Z-score method References: http://en.wikipedia.org/wiki/Fisher's_method (scroll down to Stouffer's method)
      double quantile​(double quantile)
      Get pvalue quantile
      double score​(ScoreList.ScoreSummary pvalueSummary)
      Create a single pValue representing the gene
      void setGeneId​(java.lang.String geneId)  
      int size()  
      double sum()
      Get sum of scores
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • SIGNIFICANCE_LEVEL_95

        public static final double SIGNIFICANCE_LEVEL_95
        See Also:
        Constant Field Values
    • Constructor Detail

      • ScoreList

        public ScoreList()
    • Method Detail

      • chiSquareCDFComplementary

        public static double chiSquareCDFComplementary​(double chiSquare,
                                                       int nu)
        Upper tail 1 - ChiSquareCDF(p)
        Parameters:
        chiSquare -
        nu -
        Returns:
      • add

        public void add​(double score)
        Add a p-value to the list
        Parameters:
        score -
      • avg

        public double avg()
        Get average
        Returns:
      • avgLargestTop

        public double avgLargestTop​(int topN)
        Get average pvalue (largest N)
        Returns:
      • avgSmallestTop

        public double avgSmallestTop​(int topN)
        Get average score (smallest N)
        Returns:
      • cdf

        public double cdf​(double p)
        Cumulative distribution function of p-values: P[ pValues <= p ] (i.e. lower tail).
        Parameters:
        p -
        Returns:
      • cdfUpper

        public double cdfUpper​(double p)
        Cumulative distribution function of p-values: P[ pValues > p ] (i.e. upper tail).
        Parameters:
        p -
        Returns:
      • getDefaultValue

        protected double getDefaultValue()
      • getGeneId

        public java.lang.String getGeneId()
      • getScore

        public double getScore​(int index)
      • max

        public double max()
        Get minimum pvalue
        Returns:
      • min

        public double min()
        Get minimum pvalue
        Returns:
      • pValueBonferroni

        public double pValueBonferroni()
        Minimum p-value corrected using Bonferroni
        Returns:
      • pValueFdr

        public double pValueFdr​(double alpha)
        Combine p-values using FDR procedure References: http://en.wikipedia.org/wiki/False_discovery_rate
        Returns:
        A combined p-value
      • pValueFisherChi2

        public double pValueFisherChi2()
        Combine p-values using Fisher's method References: http://en.wikipedia.org/wiki/Fisher's_method
        Returns:
      • pValueSimes

        public double pValueSimes()
        Combine p-values using Simes's procedure References: http://biomet.oxfordjournals.org/content/73/3/751
        Returns:
        A combined p-value
      • pValueZScore

        public double pValueZScore()
        Combine p-values using Stouffer's Z-score method References: http://en.wikipedia.org/wiki/Fisher's_method (scroll down to Stouffer's method)
        Returns:
        A combined p-value
      • quantile

        public double quantile​(double quantile)
        Get pvalue quantile
        Returns:
      • score

        public double score​(ScoreList.ScoreSummary pvalueSummary)
        Create a single pValue representing the gene
        Returns:
      • setGeneId

        public void setGeneId​(java.lang.String geneId)
      • size

        public int size()
      • sum

        public double sum()
        Get sum of scores
        Returns:
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object