Learn R Programming

GrabSVG (version 0.0.2)

SpFilter: A function for filtering low expressed genes

Description

A function for filtering low expressed genes

Usage

SpFilter(ExpMat_Sp, Threshold = 5)

Value

A sparse expression matrix in dgCMatrix class

Arguments

ExpMat_Sp

A sparse, N x M expression matrix in dgCMatrix class with N genes and M spots

Threshold

A threshold set to filter out genes with a total read count below this specified value

Examples

Run this code
# create a sparse expression matrix
Raw_ExpMat <- Matrix::rsparsematrix(nrow = 10000, ncol = 2000, 
density = 0.01, rand.x = function(n) rpois(n, 15))
Filtered_ExpMat <- SpFilter(Raw_ExpMat)

Run the code above in your browser using DataLab