filter_genes: Filter genes with quality control criteria

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Select genes with high relative variance in count data for further analysis

Usage

1
2
3
4
filter_genes(object, markers = NULL, vmr.min = 0,
  min.cells.expressed = 0, max.cells.expressed = Inf,
  rescue.genes = FALSE, progress.bar = TRUE, save.memory = FALSE,
  plot = TRUE, log = "xy", cex = 0.5)

Arguments

object

scNMFSet object.

markers

A vector containing marker genes to be selected. All rows in rowData that contain columns matching this set will be selected.

vmr.min

Minimum variance-to-mean ratio for gene filtering.

min.cells.expressed

Minimum no. of cells expressed for gene filtering.

max.cells.expressed

Maximum no. of cells expressed for gene filtering.

rescue.genes

Selected additional genes whose (non-zero) count distributions have at least one mode.

progress.bar

Display progress of mode-gene scan or VMR calculation with save.memory = TRUE.

save.memory

For a very large number of cells, calculate VMR row by row while avoiding calls to as.matrix(). Progress bar will be displayed unless progress.bar=FALSE.

plot

Plot the distribution of no. of cells expressed vs. VMR.

log

Axis in log-scale, c('x','y','xy').

cex

Symbol size for each gene in the plot.

Details

Takes as input scNMFSet object and scatterplot no. of cells expressed versus VMR (variance-to-mean ratio) for each gene. Optionally, genes are filtered using minimum VMR together with a range of no. of cells expressed.

Value

Object of class scNMFSet.

Examples

1
2
3
4
set.seed(1)
s <- scNMFSet(matrix(stats::rpois(n=1200,lambda=3),40,30))
s <- filter_genes(s,vmr.min=1.0,min.cells.expressed=28,
        rescue.genes=FALSE)

hjunwoo/ccfindR documentation built on Oct. 4, 2019, 10:31 a.m.