Learn R Programming

monocle3 (version 1.0.0)

new_cell_data_set: 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

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab