% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ctest.R
\name{ctest}
\alias{ctest}
\title{Exact poisson test on the ratio between IP and input counts.}
\usage{
ctest(
  IP_count,
  input_count,
  IP_sizeFactor,
  input_sizeFactor,
  fold = 1,
  alpha = 0.05
)
}
\arguments{
\item{IP_count}{a numeric vector for the counts of IP sample.}

\item{input_count}{a numeric vector for the counts of input sample.}

\item{IP_sizeFactor}{a numeric vector for the size factors of IP sample.}

\item{input_sizeFactor}{a numeric vector for the size factors of input sample.}

\item{fold}{the fold change under the null hypothesis; default = 1.}

\item{alpha}{the alpha level used for determining the optimal independent filtering in \code{filtered_R}; default = 0.05.}
}
\value{
A list include adjusted p values (with method fdr) and the corresponding log2 fold changes.
}
\description{
Exact poisson test on the ratio between IP and input counts.
}
\details{
C-tests will be conducted between each entries of the IP and input vector.

The following statistical model is assumed on the data:

IP ~ Poisson(mean_IP*IP_sizeFactor)

input ~ Poisson(mean_input*input_sizeFactor)

The one-sided statistical test (C-test) is conducted with the following hypothesis pair:

\deqn{H_0: mean(IP)/mean(input) <= fold}

\deqn{H_1: mean(IP)/mean(input) > fold}

The exact p-values will be generated using binomial test, check \code{\link{poisson.test}} for more details.

The p-values are adjusted with "BH" method with an independent filtering slected by function \code{filtered_R} in package \code{genefilter};

the filter statistics used is the normalized read abundence.
}
\keyword{internal}
