EstimFDRcontrol: EstimFDRcontrol

Description Usage Arguments Details Value Examples

Description

Estimate loss of FDR control for scDD using pooled cells and the Kolmogorov-Smirnov test. Quality controlled, library sized normalized (and not log transformed) values should be used.

Usage

1
EstimFDRcontrol(dt, batches, groups, FDR)

Arguments

dt

num matrix or data.frame of (not log transformed) expression values with rows as genes and columns as cells

batches

vector identifying batches (chr, or int)

groups

vector identifying batches (chr, or int)

FDR

num scalar of predicted FDR

Details

When measurement comming from different batches are treated equally independent (pooling cells), then methods for detecting differentially distributed genes lose control over the false discovery rate (FDR). scDD is moderately robust to this effect, yet quite powerful. This function uses your dataset to predict how much scDD underestimates the FDR.

It returns a bool of whether scDD's predicted FDR can be trusted or not. This is decided by a classifier based on a flexible discriminant analysis.

If scDD's FDR control is within an acceptable range, we encourage using the above mentioned method with edgeR and summed up batches (Lun, 2017) and scDD together. scDD is quite good at detecting different shapes in distributions while edgeR is good at detecting different means.

Value

list of bool whether scDD's FDR can be trusted and num of posterior probability from the flexible discriminant analysis

Examples

1
2
3
4
5
6
ds <- SimulateData()
res <- EstimFDRcontrol(ds$table, ds$pData$batch, ds$pData$group, 0.1)
res
ds <- SimulateData(nCells = 50)
res <- EstimFDRcontrol(ds$table, ds$pData$batch, ds$pData$group, 0.1)
res

mRcSchwering/Lattirl documentation built on May 3, 2019, 5:19 p.m.