new_cell_data_set: Create a new cell_data_set object.

Description Usage Arguments Value Examples

View source: R/cell_data_set.R

Description

Create a new cell_data_set object.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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 April 8, 2021, 5:54 a.m.