wrap_expression: Create a wrapper object with expression and counts

View source: R/wrap_add_expression.R

wrap_expressionR Documentation

Create a wrapper object with expression and counts

Description

Projected expression based on RNA velocity can also be added to the wrapper through the expression_future argument

Usage

wrap_expression(
  id = NULL,
  expression,
  counts,
  cell_info = NULL,
  feature_info = NULL,
  expression_future = NULL,
  ...
)

Arguments

id

A unique identifier for the data. If NULL, a random string will be generated.

expression

The normalised expression values of genes (columns) within cells (rows). This can be both a dense and sparse matrix.

counts

The counts values of genes (columns) within cells (rows). This can be both a dense and sparse matrix.

cell_info

Optional meta-information pertaining the cells.

feature_info

Optional meta-information of the features, a dataframe with at least feature_id as column

expression_future

Projected expression using RNA velocity of genes (columns) within cells (rows). This can be both a dense and sparse matrix.

...

extra information to be stored in the dataset

Details

Information about the cells and/or features can be added through cell_info and feature_info

Examples

dataset <- wrap_expression(
  counts = example_dataset$counts,
  expression = example_dataset$expression,
  expression_future = example_dataset$expression_future
)

dataset$counts[1:10, 1:3]
dataset$expression[1:10, 1:3]
dataset$expression_future[1:10, 1:3]


dynwrap documentation built on July 26, 2023, 5:15 p.m.