Hello,
I am using voom/limma to detect differential splicing via diffSplice, with visualization via plotSplice. I am trying to figure out how to make a heatmap of relative exon usage for my top hits, analagous to a heatmap of expression which illustrates the top hits of ordinary differential expression. This heatmap should clearly show the change in relative logFC for a given exon of the particular gene which is called differentially spliced.
So, for example suppose I have (for some expression cutoff is_expr
) an exon count matrix ecounts
over some samples, then:
dge_exon <- DGEList( counts = ecounts, genes = e_annotation)
dge_exon <- dge_exon[is_expr,]
dge_exon <- calcNormFactors(dge_exon)
v_exon <- voom( dge_exon, design)
fx <- eBayes(lmFit(v_exon, design))
ex <- diffSplice(fx)
and I want to plot relative exon usage as a heatmap across all my samples using the top few hits in ex
. How do I compute this relative usage matrix across all my samples? Would it be something like
eusage <- aggregate( v_exon$E, by = list(as.matrix(v_exon$genes$GeneID)), function(x) x/sum(x) )
Thank you in advance for your help!
zo