ds.edgeR | R Documentation |
This function performs a non-disclosive
Differential Expression Analysis using edgeR
package functions
from Bioconductor.
ds.edgeR(
model,
set,
test = "QLF",
dispersion = "both",
normalization = "TMM",
levels = "design",
coef = 2,
contrast = NULL,
datasources = NULL
)
model |
formula indicating the condition and other covariates to be adjusted. |
set |
|
test |
a character string specifying the test to carry out.
|
dispersion |
a character string specifying the type of dispersion to estimate.
This can be set as |
normalization |
a character string specifying the normalization method to be used.
This can be set as |
levels |
a character or factor vector specifying the names of the parameters to be
used in |
coef |
an integer or character specifying the coefficients of the linear model
to be tested equal to zero. Default |
contrast |
the comparison to extract from the object to build the results table. |
datasources |
a list of |
Differential Expression Analysis of RNA-seq data based on genewise negative binomial generalized linear models using either likelihood ratio or quasi-likelihood F-tests.
The steps implemented by DataSHIELD ds.edgeR
client-side and edgeRDS
server-side function is the following:
(1) Create DGEList
object
(2) Filter genes using Expression Level. Implemented by filterByExpr
function from edgeR
package.
(3) Calculate the Normalization Factors using calcNormFactors
function.
The normalization
parameter can be set as follows:
"TMM"
: uses a trimmed mean of M-values between each pair of samples.
"TMMwsp"
: TMM with singleton pairing.
A variant of TMM
that performs better with a high proportion of zeros data
"RLE"
: relative log expression.
The median library is calculated from the geometric mean of all columns
and the median ratio of each sample to the median library is taken as the scale factor.
"upperquartile"
: the scale factors are calculated from the 75% quantile of the
counts for each library, after removing genes that are zero in all libraries.
"none"
: the normalization factors are set to 1.
Note that normalization is only necessary for sample-specific effects.
(4) Estimate the dispersion.
The dispersion
parameter can be set as follows:
"both"
: estimate common and tagwise dispersions in one run (estimateDisp
).
"common"
: estimate common dispersion (estimateCommonDisp
).
"tagwise"
: estimate tagwise dispersions (estimateTagwiseDisp
).
Note that before needs to
estimate common dispersion. This is done automatically when tagwise
option
is selected.
(5) Differential Expression Analysis. test
can be set as follows:
"QLF"
: perform quasi-likelihood F-tests (glmQLFit
and glmQLFTest
).
Highly recommended for differential expression analysis of RNA-seq.
"LRT"
: perform likelihood ratio tests (glmFit
and glmLRT
).
Useful in single cell RNA-seq and datasets with no replicates.
ds.edgeR
returns to the client-side a data frame containing differential expression
results for the top genes sorted by adjusted p-value.
L. Abarrategui, for DataSHIELD development team
## Not run:
#required packages
library(DSI)
library(DSOpal)
library(dsBaseClient)
library(dsOmicsClient)
# Connecting to the Opal servers
builder <- DSI::newDSLoginBuilder()
builder$append(server = "study1", url = "https://opal-demo.obiba.org/",
user = "dsuser", password = "password",
resource = "RSRC.tcga_liver")
logindata <- builder$build()
conns <- datashield.login(logins = logindata,
assign = TRUE,
symbol = "res")
#coerce the resource to a RangedSummarizedExperiment
datashield.assign.expr(conns = conns,
symbol = "rse",
expr = quote(as.resource.object(res)))
#Differential Expression analysis
##Default settings
ds.edgeR(model =~ gdc_cases.demographic.gender,set = "rse")
# Clear the Datashield R sessions and logout
DSI::datashield.logout(conns)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.