powered by
This never creates the full residual matrix and can be used to determine highly variable genes.
get_residual_var( vst_out, umi, residual_type = "pearson", res_clip_range = c(-sqrt(ncol(umi)), sqrt(ncol(umi))), min_variance = vst_out$arguments$min_variance, cell_attr = vst_out$cell_attr, bin_size = 256, verbosity = vst_out$arguments$verbosity )
A vector of residual variances (after clipping)
The output of a vst run
The UMI count matrix that will be used
What type of residuals to return; can be 'pearson' or 'deviance'; default is 'pearson'
Numeric of length two specifying the min and max values the residuals will be clipped to; default is c(-sqrt(ncol(umi)), sqrt(ncol(umi)))
Lower bound for the estimated variance for any gene in any cell when calculating pearson residual; default is vst_out$arguments$min_variance
Data frame of cell meta data
Number of genes to put in each bin (to show progress)
An integer specifying the verbosity level: 0 (silent, no messages), 1 (show messages only), or 2 (show messages and progress bars); default is 2
# \donttest{ vst_out <- vst(pbmc, return_cell_attr = TRUE) res_var <- get_residual_var(vst_out, pbmc) # }
Run the code above in your browser using DataLab