new_cell_data_set: Create a new cell_data_set object.

View source: R/cell_data_set.R

new_cell_data_setR Documentation

Create a new cell_data_set object.

Description

Create a new cell_data_set object.

Usage

new_cell_data_set(expression_data, cell_metadata = NULL, gene_metadata = NULL)

Arguments

expression_data

expression data matrix for an experiment, can be a sparseMatrix.

cell_metadata

data frame containing attributes of individual cells, where row.names(cell_metadata) = colnames(expression_data).

gene_metadata

data frame containing attributes of features (e.g. genes), where row.names(gene_metadata) = row.names(expression_data).

Value

a new cell_data_set object

Examples

  small_a549_colData_df <- readRDS(system.file("extdata",
                                               "small_a549_dex_pdata.rda",
                                               package = "monocle3"))
  small_a549_rowData_df <- readRDS(system.file("extdata",
                                               "small_a549_dex_fdata.rda",
                                               package = "monocle3"))
  small_a549_exprs <- readRDS(system.file("extdata",
                                          "small_a549_dex_exprs.rda",
                                          package = "monocle3"))
  small_a549_exprs <- small_a549_exprs[,row.names(small_a549_colData_df)]

  cds <- new_cell_data_set(expression_data = small_a549_exprs,
                           cell_metadata = small_a549_colData_df,
                           gene_metadata = small_a549_rowData_df)


cole-trapnell-lab/monocle3 documentation built on May 24, 2022, 5:25 p.m.