
Last chance! 50% off unlimited learning
Sale ends in
diffSpliceDGE(glmfit, coef=ncol(glmfit$design), contrast=NULL, geneid, exonid=NULL, prior.count=0.125, verbose=TRUE)
DGEGLM
fitted model object produced by glmFit
or glmQLFit
. Rows should correspond to exons.design
. If specified, then takes precedence over coef
.nrow(glmfit)
or the name of the column of glmfit$genes
containing the gene identifiers. Rows with the same ID are assumed to belong to the same gene.nrow(glmfit)
or the name of the column of glmfit$genes
containing the exon identifiers.TRUE
some diagnostic information about the number of genes and exons is output.diffSpliceDGE
produces an object of class DGELRT
containing the component design
from glmfit
plus the following new components:
genes
containing gene IDs.genes
containing exon IDs.glmfit
is produced by glmFit
or glmQLFit
.
If glmfit
is produced by glmFit
, then the following components are returned in the output object:
glmfit
is produced by glmQLFit
, then the following components are returned in the output object:
Testing for differential exon usage is equivalent to testing whether the exons in each gene have the same log-fold-changes as the other exons in the same gene. At exon-level, the log-fold-change of each exon is compared to the log-fold-change of the entire gene which contains that exon. At gene-level, two different tests are provided. One is converting exon-level p-values to gene-level p-values by the Simes method. The other is using exon-level test statistics to conduct gene-level tests.
# Gene exon annotation
Gene <- paste("Gene", 1:100, sep="")
Gene <- rep(Gene, each=10)
Exon <- paste("Ex", 1:10, sep="")
Gene.Exon <- paste(Gene, Exon, sep=".")
genes <- data.frame(GeneID=Gene, Gene.Exon=Gene.Exon)
group <- factor(rep(1:2, each=3))
design <- model.matrix(~group)
mu <- matrix(100, nrow=1000, ncol=6)
# knock-out the first exon of Gene1 by 90%
mu[1,4:6] <- 10
# generate exon counts
counts <- matrix(rnbinom(6000,mu=mu,size=20),1000,6)
y <- DGEList(counts=counts, lib.size=rep(1e6,6), genes=genes)
gfit <- glmFit(y, design, dispersion=0.05)
ds <- diffSpliceDGE(gfit, geneid="GeneID")
topSpliceDGE(ds)
plotSpliceDGE(ds)
Run the code above in your browser using DataLab