Differential expression using RNA-seq data

Guillermo Ayala

5/11/23

Packages

We have to load the package SummarizedExperiment to use the class RangedSummarizedExperiment or simply SummarizedExperiment.

pacman::p_load(tami,SummarizedExperiment)

Data

The RNA-seq dataset used in this vignette is PRJNA297664 and can be loaded from tamidata.

data(PRJNA297664,package="tamidata")

The phenotypic covariables are

colData(PRJNA297664)
DataFrame with 6 rows and 4 columns
   SampleName         Run      treatment replication
  <character> <character>       <factor>   <numeric>
1  GSM1900735  SRR2549634 Wild                     1
2  GSM1900737  SRR2549636 Wild                     3
3  GSM1900739  SRR2549638 SEC66 deletion           2
4  GSM1900736  SRR2549635 Wild                     2
5  GSM1900738  SRR2549637 SEC66 deletion           1
6  GSM1900740  SRR2549639 SEC66 deletion           3

The covariable colData(x)[,"treatment"] will be used as the experimental factor giving the group or condition of each sample.

Marginal differential expression using edgeR

Common dispersion

We can consider a common dispersion.

PRJNA297664_common_deo = 
  tami::dema(x=PRJNA297664,y="treatment",test = edgercommon,
       correction = "BH",fdr= 0.01,foutput = "output")

A data.frame with the results is obtained with

df1 = tidy(PRJNA297664_common_deo)

The same report in a html file is obtained with

glimpse(PRJNA297664_common_deo)
[1] "./reports/output.html"

We can open the file with

browseURL(glimpse(PRJNA297664_common_deo))

Tagwise dispersion

The second choice is to consider a different dispersion parameter per gene.

PRJNA297664_tagwise_deo = 
  dema(x=PRJNA297664,y="treatment",test = edgertagwise,
       correction = "BH",fdr= 0.01,foutput = "output")

A data.frame with the results is obtained with

df1 = tidy(PRJNA297664_tagwise_deo)

The same report in a html file is obtained with

glimpse(PRJNA297664_tagwise_deo)
[1] "./reports/output.html"

We can open the file with

browseURL(glimpse(PRJNA297664_tagwise_deo))