hyperGtest: hypergeometric test

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/hyperGtest.R

Description

hypergeometric test with lower.tail = FALSE used by getEnrichedGO

Usage

1
hyperGtest(alltermcount, thistermcount, totaltermInGenome, totaltermInPeakList)

Arguments

alltermcount

a list with two variables: GOterm and GOcount which is GO terms and corresponding counts in the whole genome

thistermcount

a list with two variables: GOterm and GOcount which is GO terms and corresponding counts in the peak list

totaltermInGenome

number of total GO terms in the whole genome

totaltermInPeakList

number of total GO terms in the peak list

Details

see phyper for details

Value

a list with 6 variables

thisterm

GO term

thistermcount

count of this GO term in the peak list

thistermtotal

count of this GO term in the whole genome

pvalue

pvalue of the hypergeometric test

totaltermInPeakList

number of total GO terms in the peak list

totaltermInGenome

number of total GO terms in the whole genome

Note

internal function not intended to be used directly by users

Author(s)

Lihua Julie ZHu

References

Johnson, N. L., Kotz, S., and Kemp, A. W. (1992) Univariate Discrete Distributions, Second Edition. New York: Wiley

See Also

phyper, getEnrichedGO

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
goList= c("GO:0000075", "GO:0000082","GO:0000082","GO:0000122",
          "GO:0000122","GO:0000075","GO:0000082","GO:0000082",
          "GO:0000122","GO:0000122","GO:0000122","GO:0000122",
          "GO:0000075", "GO:0000082","GO:000012")
  
alltermcount = list(GOterm=c("GO:0000075", "GO:0000082", "GO:000012", 
                             "GO:0000122"), 
                    GOcount=c(100, 200, 10, 10))
thistermcount = getUniqueGOidCount(goList)
totaltermInPeakList = 15
totaltermInGenome = 1000
hyperGtest(alltermcount,thistermcount, totaltermInGenome, totaltermInPeakList)

LihuaJulieZhu/ChIPpeakAnno documentation built on Aug. 5, 2020, 12:02 a.m.