View source: R/BASiCS_TestDE.R
BASiCS_TestDE | R Documentation |
Function to assess changes in expression between two groups of cells (mean and over-dispersion)
BASiCS_TestDE(
Chain1,
Chain2,
EpsilonM = log2(1.5),
EpsilonD = log2(1.5),
EpsilonR = log2(1.5)/log2(exp(1)),
ProbThresholdM = 2/3,
ProbThresholdD = 2/3,
ProbThresholdR = 2/3,
OrderVariable = c("GeneIndex", "GeneName", "Mu"),
GroupLabel1 = "Group1",
GroupLabel2 = "Group2",
Plot = TRUE,
PlotOffset = TRUE,
PlotOffsetType = c("offset estimate", "before-after", "MA plot"),
Offset = TRUE,
EFDR_M = 0.05,
EFDR_D = 0.05,
EFDR_R = 0.05,
GenesSelect = rep(TRUE, ncol(Chain1@parameters[["mu"]])),
min.mean = 1,
MinESS = 100,
...
)
Chain1 |
an object of class |
Chain2 |
an object of class |
EpsilonM |
Minimum fold change tolerance threshold for detecting
changes in overall expression (must be a positive real number).
Default value: |
EpsilonD |
Minimum fold change tolerance threshold for detecting
changes in biological over-dispersion (must be a positive real number).
Default value: |
EpsilonR |
Minimum distance threshold for detecting
changes in residual over-dispersion (must be a positive real number).
Default value: |
ProbThresholdM |
Optional parameter. Probability threshold for detecting
changes in overall expression (must be a positive value, between 0 and 1).
If |
ProbThresholdD |
Optional parameter. Probability threshold for detecting
changes in cell-to-cell biological over-dispersion (must be a positive value,
between 0 and 1). Same usage as |
ProbThresholdR |
Optional parameter. Probability threshold for detecting
changes in residual over-dispersion (must be a positive value, between 0 and
1). Same usage as |
OrderVariable |
Ordering variable for output.
Possible values: |
GroupLabel1 |
Label assigned to reference group.
Default: |
GroupLabel2 |
Label assigned to reference group.
Default: |
Plot |
If |
PlotOffset |
If |
PlotOffsetType |
See argument |
Offset |
Optional argument to remove a fix offset effect (if not
previously removed from the MCMC chains). Default: |
EFDR_M |
Target for expected false discovery rate related to
the comparison of means. If |
EFDR_D |
Target for expected false discovery rate related to
the comparison of dispersions. If |
EFDR_R |
Target for expected false discovery rate related to
the comparison of residual over-dispersions. If |
GenesSelect |
Optional argument to provide a user-defined list
of genes to be considered for the comparison.
Default: |
min.mean |
Minimum mean expression threshold required for inclusion in offset calculation. Similar to 'min.mean' in 'scran::computeSumFactors'. This parameter is only relevant with 'Offset = TRUE'. |
MinESS |
The minimum effective sample size for a gene to be included in the tests for differential expression. This helps to remove genes with poor mixing from differential expression tests. Default is 100. If set to NA, genes are not checked for effective sample size before differential expression tests are performed. |
... |
Optional parameters. |
BASiCS_TestDE
returns an object of class
BASiCS_ResultsDE
Catalina A. Vallejos cnvallej@uc.cl
Nils Eling eling@ebi.ac.uk
# Loading two 'BASiCS_Chain' objects (obtained using 'BASiCS_MCMC')
data(ChainSC)
data(ChainRNA)
Test <- BASiCS_TestDE(
Chain1 = ChainSC, Chain2 = ChainRNA,
GroupLabel1 = "SC", GroupLabel2 = "P&S",
EpsilonM = log2(1.5), EpsilonD = log2(1.5),
OffSet = TRUE
)
# Results for the differential mean test
head(as.data.frame(Test, Parameter = "Mean"))
# Results for the differential over-dispersion test
# This only includes genes marked as 'NoDiff' in Test$TableMean
head(as.data.frame(Test, Parameter = "Disp"))
# For testing differences in residual over-dispersion, two chains obtained
# via 'BASiCS_MCMC(Data, N, Thin, Burn, Regression=TRUE)' need to be provided
data(ChainSCReg)
data(ChainRNAReg)
Test <- BASiCS_TestDE(
Chain1 = ChainSCReg, Chain2 = ChainRNAReg,
GroupLabel1 = 'SC', GroupLabel2 = 'P&S',
EpsilonM = log2(1.5), EpsilonD = log2(1.5),
EpsilonR = log2(1.5)/log2(exp(1)),
OffSet = TRUE
)
## Plotting the results of these tests
BASiCS_PlotDE(Test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.