Learn R Programming

GPseq (version 0.5)

likelihood_ratio_tissue_poisson: Chi Square test statistic for comparison of expression levels of genes/exons across two conditions using the Poisson Model

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 Poisson random variable. The function outputs -2 times The Log likelihood ratio which is distributed as a Chi-Square with 1 degree of freedom.

Usage

likelihood_ratio_tissue_poisson(x, lambda1, y, lambda2, w)

Arguments

x
Count vector of Gene/Exon in condition 1
lambda1
Lambda for the Poisson for the Gene/Exon counts in condition 1. The MLE = mean(x)
y
Count vector of Gene/Exon in condition 2
lambda2
Lambda for the Poisson for the Gene/Exon counts in condition 2. The MLE = mean(y)
w
Normalizing factor of condition 1 compared to condition 2

Value

Ptest
Chi Square statistic = -2 * Log Likelihood Ratio

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

Examples

Run this code
set.seed(666);
x <- rpois(100,1);
y <- rpois(100,5);

w = runif(1,0,1);

output = likelihood_ratio_tissue_poisson(x,mean(x),y,mean(y),w);

cat(" Test Statistic = ",output$Ptest,"\n");

Run the code above in your browser using DataLab