Skip to contents

Helper function for data on features to plot from a diverse set of data sources.

Usage

collect_features(
  source,
  features = NULL,
  gene_mapping = human_gene_mapping,
  n = 1
)

Arguments

source

Matrix or data frame to pull features from, or a vector of feature values for a single feature. For a matrix, the features must be rows.

features

Character vector of features names to plot if source is not a vector.

gene_mapping

An optional vector for gene name matching with match_gene_symbol(). Ignored if source is a data frame.

n

Internal-use parameter marking the number of nested calls. This is used for finding the name of the "source" input variable from the caller's perspective

Value

Data frame with one column for each feature requested

Details

If source is a data.frame, features will be drawn from the columns. If source is a matrix object (IterableMatrix, dgCMatrix, or matrix), features will be drawn from rows.