PCzinb | R Documentation |
This method implements a set of local algorithms to estimate the structure of a graph, starting from a matrix (or a SummarizedExperiment) of counts, typically representing the gene expression of p genes in n cells.
PCzinb(x, ...)
## S4 method for signature 'SummarizedExperiment'
PCzinb(x, whichAssay = "processed", ...)
## S4 method for signature 'matrix'
PCzinb(
x,
method = c("poi", "nb", "zinb0", "zinb1"),
alpha = 2 * pnorm(nrow(x)^0.2, lower.tail = FALSE),
maxcard = 2,
extend = TRUE
)
## S4 method for signature 'SingleCellExperiment'
PCzinb(x, whichAssay = "processed", ...)
x |
the matrix of counts (n times p) or a SummarizedExperiment containing such matrix (transposed). |
... |
Arguments to pass to the matrix method. |
whichAssay |
The assay to use as input for the matrix method. |
method |
the algorithm used to estimate the graph: 'poi', 'nb', 'zinb0', or 'zinb1'. See details below. |
alpha |
the significant level of the tests |
maxcard |
the uper bound of the cardinality of the conditional sets K |
extend |
if TRUE it considers the union of the tests, otherwise it considers the intersection. |
This approach is based on the PC algorithm and assumes that the node-conditional distribution of the data is zero-inflated negative binomial ('zinb'), or its special cases negative binomial ('nb') and Poisson ('poi').
There are two version of the algorithm for 'zinb': one that assumes that the structure of the graph depends only on the mean parameter ('zinb0') and one that assumes that the structure of the graph depends on both the mean parameter and the zero inflation parameter ('zinb1').
Obviously, 'zinb1' is the most general case and should be the more accurate in most cases. However, the 'poi' and 'nb' algorithms offer some computational advantages.
The default value of the significance level alpha is based on a rule that ensure control of the type I error of all tests. See Nguyen et al. (2020) for details.
if x is a matrix, the estimated adjacency matrix of the graph; if x is a SummarizedExperiment, a SummarizedExperiment object with the adjacency matrix as metadata.
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(matrix(rpois(50, 5), ncol=10))
PCzinb(se, method="poi")
mat <- matrix(rpois(50, 5), nrow=10)
PCzinb(mat, method="poi")
library(SingleCellExperiment)
se <- SingleCellExperiment(matrix(rpois(50, 5), ncol=10))
se <- PCzinb(se, method="poi")
rowPair(se)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.