View source: R/get_prop_zero.R
get_prop_zero | R Documentation |
This function calculates the Proportion Zero for each gene in each user defined group. Proportion Zero = number of zero counts for a gene for a group of cells/number of cells in the group.
get_prop_zero(sce, group_col = "cellType")
sce |
SummarizedExperiment-class object |
group_col |
name of the column in the
colData() of |
For more information about calculating Proportion Zero, check equation 1 from the vignette in section "Calculate Proportion Zero and Pick Cutoff".
A data.frame()
containing proportion of zero counts, genes as rows,
groups as columns.
Other Proportion Zero functions:
filter_prop_zero()
## Basic Proportion counts == 0
rowSums(assays(sce_zero_test)$counts == 0) / ncol(sce_zero_test)
## Get proportion by the default group "cellType"
get_prop_zero(sce_zero_test)
## Get proportion by user defined grouping of the data
get_prop_zero(sce_zero_test, group_col = "group")
## Groups with missing levels will be dropped
get_prop_zero(sce_zero_test, group_col = "cellType_na")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.