likelihood_ratio_tissue_generalized_poisson: Chi Square test statistic for comparison of expression levels...

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

View source: R/genpseq.R

Description

This function compares the expression pattern of a given gene/exon across two given conditions or tissues. The null is that the gene is not differentially expressed across the two conditions. The input is the counts of a given gene/exon at each position in the two tissues and is modeled as a Generalized Poisson. The function outputs -2 times The Log likelihood ratio which is distributed as a Chi-Square with 1 degree of freedom. The Newton Raphson method is used to estimate the parameters in the null model and therefore the results are only applicable if the algorithm converges.

Usage

1
likelihood_ratio_tissue_generalized_poisson(x, lambda1, theta1, y, lambda2, theta2, w)

Arguments

x

Count vector of Gene/Exon in condition 1

lambda1

Lambda parameter for the Generalized Poisson for the Gene/Exon counts in Condition 1

theta1

Theta parameter for the Generalized Poisson for the Gene/Exon counts in Condition 2

y

Count vector of Gene/Exon in condition 2

lambda2

Lambda parameter for the Generalized Poisson for the Gene/Exon counts in condition 1

theta2

Theta parameter for the Generalized Poisson for the Gene/Exon counts in condition 2

w

Normalizing factor of condition 1 compared to condition 2

Value

~Describe the value returned If it is a LIST, use

mark

1 if the Newton Raphson algorithm converges. The test statistic is only valid if mark = 1

Gptest

Chi Square Statistic = -2 * Log Likelihood Ratio

Author(s)

Sudeep Srivastava, Liang Chen

References

Consul, P. C. (1989) Generalized Poisson Distributions: Properties and Applications. New York: Marcel Dekker.
Sudeep Srivastava, Liang Chen A two-parameter generalized Poisson model to improve the analysis of RNA-Seq data Nucleic Acids Research Advance Access published July 29,2010 doi : 10.1093/nar/gkq670

See Also

generalized_poisson_likelihood , likelihood_ratio_tissue_poisson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(666);
x <- rpois(100,1);
y <- rpois(100,5);

outx = generalized_poisson_likelihood(x);
outy = generalized_poisson_likelihood(y);
w = runif(1,0,1);

output = likelihood_ratio_tissue_generalized_poisson(x,outx$lambda,outx$theta,y,outy$lambda,outy$theta,w);

cat("Converged = ",output$mark," Test Statistic = ",output$Gptest,"\n");

GPseq documentation built on May 30, 2017, 3:11 a.m.