SDA_counts_preproc | R Documentation |
This function preprocesses a raw gene expression count matrix by performing basic quality control checks, computing library sizes, and visualizing feature distributions per cell/sample. It returns a list containing the filtered expression matrix and selected features.
SDA_counts_preproc(rawCountMat, minLibrarySize = 1)
rawCountMat |
A numeric matrix or sparse matrix where rows represent features (genes) and columns represent cells/samples. |
minLibrarySize |
Integer. Minimum library size threshold for filtering (default: 1). |
The function checks if the number of cells/samples exceeds recommended limits for SDA (Sparse Decomposition of Arrays). It then calculates total features per cell, generates a density plot with peak estimation, and returns the input data along with feature metadata.
A list containing:
GEX |
Preprocessed count matrix (same as input for now). |
featuresToUse |
Vector of feature (gene) names included in preprocessing. |
minLibrarySize |
The minimum library size threshold used. |
## Not run:
if(requireNamespace("Matrix", quietly = TRUE)) {
raw_counts <- Matrix::Matrix(rpois(1000, lambda = 10), nrow = 100, ncol = 10, sparse = TRUE)
processed_data <- SDA_counts_preproc(raw_counts)
str(processed_data)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.