test_class.declarator: hypergeometric = new Hypergeometric()
test_class.modifier: private static final
test_class.original_string: private static final Hypergeometric hypergeometric = new Hypergeometric();
test_class.type: Hypergeometric
test_class.var_name: hypergeometric
test_class.declarator: EPSILON = 0.00001
test_class.modifier: private static final
test_class.original_string: private static final double EPSILON = 0.00001;
test_class.type: double
test_class.var_name: EPSILON
test_class.file: phenol-analysis/src/test/java/org/monarchinitiative/phenol/stats/HypergeometricTest.java
test_class.identifier: HypergeometricTest
test_case.body: @Test
    void test_phyper_overrepresentation() {
      int N = 60; // # total number of genes
      int n = 13; // # study set
      int n_t = 2; // # number genes in study set annotated to t
      int m_t = 5; // # number of genes in population annotated to t
      double result = hypergeometric.phyper(n_t-1, N, m_t, n, false);
      assertEquals(0.2945756, result, EPSILON);
    }
test_case.class_method_signature: HypergeometricTest.test_phyper_overrepresentation()
test_case.full_signature: @Test void test_phyper_overrepresentation()
test_case.identifier: test_phyper_overrepresentation
test_case.invocations: phyper assertEquals
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_phyper_overrepresentation()
focal_class.declarator: lfactorial
focal_class.modifier: private final
focal_class.original_string: private final Vector<Double> lfactorial;
focal_class.type: Vector<Double>
focal_class.var_name: lfactorial
focal_class.file: phenol-analysis/src/main/java/org/monarchinitiative/phenol/stats/Hypergeometric.java
focal_class.identifier: Hypergeometric
focal_class.class_method_signature: Hypergeometric.Hypergeometric()
focal_class.full_signature: public  Hypergeometric()
focal_class.identifier: Hypergeometric
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Hypergeometric()
focal_class.class_method_signature: Hypergeometric.phypergeometric(int n, double p, int k, int r)
focal_class.full_signature: public double phypergeometric(int n, double p, int k, int r)
focal_class.identifier: phypergeometric
focal_class.modifiers: public
focal_class.parameters: (int n, double p, int k, int r)
focal_class.return: double
focal_class.signature: double phypergeometric(int n, double p, int k, int r)
focal_class.class_method_signature: Hypergeometric.phypergeometric(int m, int m_t, int n, int n_t)
focal_class.full_signature: public double phypergeometric(int m, int m_t, int n, int n_t)
focal_class.identifier: phypergeometric
focal_class.modifiers: public
focal_class.parameters: (int m, int m_t, int n, int n_t)
focal_class.return: double
focal_class.signature: double phypergeometric(int m, int m_t, int n, int n_t)
focal_class.class_method_signature: Hypergeometric.dhyper(int x, int N, int M, int n)
focal_class.full_signature: public double dhyper(int x, int N, int M, int n)
focal_class.identifier: dhyper
focal_class.modifiers: public
focal_class.parameters: (int x, int N, int M, int n)
focal_class.return: double
focal_class.signature: double dhyper(int x, int N, int M, int n)
focal_class.class_method_signature: Hypergeometric.phyper(int x, int N, int M, int n, boolean lowerTail)
focal_class.full_signature: public double phyper(int x, int N, int M, int n, boolean lowerTail)
focal_class.identifier: phyper
focal_class.modifiers: public
focal_class.parameters: (int x, int N, int M, int n, boolean lowerTail)
focal_class.return: double
focal_class.signature: double phyper(int x, int N, int M, int n, boolean lowerTail)
focal_class.class_method_signature: Hypergeometric.lNchooseK(int n, int k)
focal_class.full_signature: public double lNchooseK(int n, int k)
focal_class.identifier: lNchooseK
focal_class.modifiers: public
focal_class.parameters: (int n, int k)
focal_class.return: double
focal_class.signature: double lNchooseK(int n, int k)
focal_class.class_method_signature: Hypergeometric.logfact(int i)
focal_class.full_signature: public double logfact(int i)
focal_class.identifier: logfact
focal_class.modifiers: public
focal_class.parameters: (int i)
focal_class.return: double
focal_class.signature: double logfact(int i)
focal_method.body: public double phyper(int x, int N, int M, int n, boolean lowerTail) {
      int i;
      int up;
      double p;
  
      up = Math.min(n, M);
      p = 0;
  
      if (x < up / 2) {
        for (i = x; i >= 0; i--)
          p += dhyper(i, N, M, n);
  
        if (lowerTail) return p;
        else return 1 - p;
      } else {
        for (i = x + 1; i <= up; i++)
          p += dhyper(i, N, M, n);
  
        if (lowerTail) return 1 - p;
        else return p;
      }
    }
focal_method.class_method_signature: Hypergeometric.phyper(int x, int N, int M, int n, boolean lowerTail)
focal_method.full_signature: public double phyper(int x, int N, int M, int n, boolean lowerTail)
focal_method.identifier: phyper
focal_method.invocations: min dhyper dhyper
focal_method.modifiers: public
focal_method.parameters: (int x, int N, int M, int n, boolean lowerTail)
focal_method.return: double
focal_method.signature: double phyper(int x, int N, int M, int n, boolean lowerTail)