testGeneForDEU {DEXSeq}R Documentation

Test a single gene for differential exon usage.

Description

This function first fits a GLM for the null model, then a GLM for the full model for each exon counting bin. Then, p values are derived with a chi-squared test from the deviance differences between the models.

Usage

testGeneForDEU( ecs, gene, formula0=NULL, formula1=NULL )

Arguments

ecs

An ExonCountSet object.

gene

The ID of the gene to be tested for differential exon usage.

formula0

Formula for the null model. If NULL, the default "count ~ sample + exon + condition is used.

formula1

Formula for the full model. If NULL, the default "count ~ sample + exon + condition * I(exon==exonID) is used.

Details

The terms in the formulas must be columns of design(ecs). In addition, in formula1, the variable exonID is set to the ID of the currently tested exon counting bin, looping through all the counting bins.

The GLMs are of the negative binomial family, using the dispersions from the dispersion column in fData(ecs).

Value

A data frame with columns "deviance", "df" (degrees of freedom) and pvalues from the test.

See Also

testForDEU

Examples

   data("pasillaExons", package="pasilla")
   pasillaExons <- estimateSizeFactors( pasillaExons )
   pasillaExons <- estimateDispersions( pasillaExons )
   pasillaExons <- fitDispersionFunction( pasillaExons )
   testGeneForDEU(pasillaExons, "FBgn0085442")

[Package DEXSeq version 1.0.2 Index]