calc_norm_counts_scRNAseq: Filter, normalize, and/or convert counts object for...

Description Usage Arguments Details Value

View source: R/calc_norm_counts_scRNAseq.R

Description

This function performs a number of operations on a counts object. It optionally filters out low-count genes. It optionally normalizes, log2-transforms, and/or transposes counts.

Usage

1
2
3
4
5
6
calc_norm_counts_scRNAseq(
  counts,
  min_count=NULL, min_cpm=NULL, min_libs_perc=0.15,
  normalize=TRUE, norm_method="TMM",
  log2_transform=FALSE, transpose=FALSE, return_DGEcounts=FALSE,
  ...)

Arguments

counts

a matrix or data frame of gene expression counts. Should have samples in columns and genes in rows.

min_count

numeric, the minimum count for a library to be considered passing threshold for a given gene. Setting to NULL avoids filtering by minimum counts.

min_cpm

numeric, the minimum counts per million for a library to be considered passing threshold for a given gene. Setting to NULL avoids filtering by minimum counts.

min_libs_perc

numeric, the minimum percentage of libraries that must meet min_count or min_cpm threshold for a gene to be retained.

normalize

logical, whether to normalize counts.

norm_method

character, the method by which to normalize counts. Used only if normalize is TRUE. Options are "TMM", which uses edgeR::calcNormFactors; "deconvolution", which uses cell deconvolution as implemented in the package scran; or "lib_size", simple library size normalization using cpm. Unique partial matches are accepted.

log2_transform

logical, whether to log2 transform the counts. Defaults to FALSE.

transpose

logical, whether to transpose the matrix or data frame of counts.

...

(optional) parameters passed to normalization functions.

Details

This function (optionally) utilizes min_filter_counts to filter the counts object. It then (optionally) normalizes the counts, using one of several methods applicable to single-cell RNA-seq data. It then (optionally) log2-transforms the counts and/or transposes the counts object. Finally, it returns the counts either as a data frame, or as a DGEList object.

Value

a data frame containing the processed counts.


mjdufort/countSubsetNorm documentation built on Nov. 7, 2019, 6:37 p.m.