QPtransform | R Documentation |
This function implements the preprocessing strategy discussed in Nguyen et al. (2020). We recommend this transformation when applying the PCzinb algorithm to real dataset.
QPtransform(x, ...)
## S4 method for signature 'SummarizedExperiment'
QPtransform(x, assay_from = "counts", assay_to = "processed", ...)
## S4 method for signature 'matrix'
QPtransform(x)
x |
the matrix of counts (n times p) or a SummarizedExperiment containing such matrix (transposed). |
... |
Additional arguments (currently not used). |
assay_from |
The assay with the input count data. |
assay_to |
The assay in which to store the processed data. |
Briefly, the transformation consists of two steps: (i) matching of the 95
percentile across cells to account for sequencing depth; (ii) adjusting the
data to be closer to a zinb distribution by using a power transformation
X^\alpha
, where \alpha \in [0,1]
is chosen to minimize the
Kolmogorov-Smirnov statistic.
if x is a matrix, a matrix with the processed data; if x is a SummarizedExperiment, a SummarizedExperiment object with the processed matrix as an additional assay.
Nguyen, T. K. H., Berge, K. V. D., Chiogna, M., & Risso, D. (2020). Structure learning for zero-inflated counts, with an application to single-cell RNA sequencing data. arXiv:2011.12044.
library(SummarizedExperiment)
se <- SummarizedExperiment(assays=list(counts=matrix(rpois(50, 5), ncol=10)))
suppressWarnings(se <- QPtransform(se))
se
mat <- matrix(rpois(50, 5), nrow=10)
suppressWarnings(QPtransform(mat))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.