aggregate_gene_expression: Creates a matrix with aggregated expression values for...

Description Usage Arguments Value

View source: R/cluster_genes.R

Description

Creates a matrix with aggregated expression values for arbitrary groups of genes

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
aggregate_gene_expression(
  cds,
  gene_group_df = NULL,
  cell_group_df = NULL,
  norm_method = c("log", "binary", "size_only"),
  pseudocount = 1,
  scale_agg_values = TRUE,
  max_agg_value = 3,
  min_agg_value = -3,
  exclude.na = TRUE
)

Arguments

cds

The cell_data_set on which this function operates

gene_group_df

A dataframe in which the first column contains gene ids or short gene names and the second contains groups. If NULL, genes are not grouped.

cell_group_df

A dataframe in which the first column contains cell ids and the second contains groups. If NULL, cells are not grouped.

norm_method

How to transform gene expression values before aggregating them. If "log", a pseudocount is added. If "size_only", values are divided by cell size factors prior to aggregation.

pseudocount

Value to add to expression prior to log transformation and aggregation.

scale_agg_values

Whether to center and scale aggregated groups of genes.

max_agg_value

If scale_agg_values is TRUE, the maximum value the resulting Z scores can take. Higher values are capped at this threshold.

min_agg_value

If scale_agg_values is TRUE, the minimum value the resulting Z scores can take. Lower values are capped at this threshold.

exclude.na

Logical indicating whether or not to exclude NA values from the aggregated matrix.

Value

A matrix of dimension NxM, where N is the number of gene groups and M is the number of cell groups.


cole-trapnell-lab/monocle3 documentation built on April 8, 2021, 5:54 a.m.