ctest: ctest

Description Usage Arguments Details Value References Examples

View source: R/ctest.R

Description

c-test is used to compare two Poisson means, for peak calling or binding sites identification in exomePeak R-package

Usage

1
ctest(IP, INPUT, TOTAL_IP, TOTAL_INPUT, FOLD = 1, minimal_counts_in_fdr = 10)

Arguments

IP

a vector of integers, each elemetnt represents the number of reads from a binding site in the IP sample

INPUT

a vector of integers, each elements represents the number of reads from a binding site in the Input control sample

TOTAL_IP

an integer, which represents the total number of reads in IP sample

TOTAL_INPUT

an integer, which represents the total number of reads in Input control sample

FOLD

a decimal number, which indicates the ration of Possion mean to be tested, default: 1. Use a larger number for detection of highly enriched binding sites.

minimal_counts_in_fdr

an integer threshold, only the loci with reads more than this number are subjected for fdr calculation. default: 10

Details

c-test is used to compare two Poisson means, for peak calling or binding sites identification in exomePeak R-package. The comparison of two Possion distributions is converted into a binomial distribution based test. The number of reads at the same locus for the aligned reads are counted by other packages, such as Rsamtools or HTseq-count.

Value

The function returns a list of length 3, which contains the log(p-value), log(fdr) and log(fold change), respectively.

References

Przyborowski, J. and Wilenski, H. (1940) Homogeneity of results in testing samples from Poisson series: with an application to testing clover seed for dodder. Biometrika, 31, 313-323

Examples

1
result = ctest(c(20,10, 1), c(2,1,20), 100, 200)

exomePeak documentation built on May 6, 2019, 2:05 a.m.