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 exon usage for a given exon of the particular gene across samples.
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, just like I would plot expression across samples to visualize a couple of top DEG hits. How do I compute this relative usage matrix across all my samples to construct this heatmap? 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!
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 exon usage for a given exon of the particular gene across samples.
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, just like I would plot expression across samples to visualize a couple of top DEG hits. How do I compute this relative usage matrix across all my samples to construct this heatmap? 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!