principal_graph_aux-set-cell_data_set-method: Method to set principal graph auxiliary information into CDS

principal_graph_aux<-,cell_data_set-methodR Documentation

Method to set principal graph auxiliary information into CDS

Description

Method to set principal graph auxiliary information into CDS

Usage

## S4 replacement method for signature 'cell_data_set'
principal_graph_aux(x) <- value

Arguments

x

A cell_data_set object.

value

A S4Vectors::SimpleList of principal graph auxiliary information.

Value

x.

Examples

 
    cell_metadata <- readRDS(system.file('extdata',
                                         'worm_embryo/worm_embryo_coldata.rds',
                                         package='monocle3'))
    gene_metadata <- readRDS(system.file('extdata',
                                         'worm_embryo/worm_embryo_rowdata.rds',
                                         package='monocle3'))
    expression_matrix <- readRDS(system.file('extdata',
                                             'worm_embryo/worm_embryo_expression_matrix.rds',
                                             package='monocle3'))

    cds <- new_cell_data_set(expression_data=expression_matrix,
                             cell_metadata=cell_metadata,
                             gene_metadata=gene_metadata)

    cds <- preprocess_cds(cds)
    cds <- align_cds(cds, alignment_group =
                     "batch", residual_model_formula_str = "~ bg.300.loading +
                      bg.400.loading + bg.500.1.loading + bg.500.2.loading +
                      bg.r17.loading + bg.b01.loading + bg.b02.loading")
   cds <- reduce_dimension(cds)
   ciliated_genes <- c("che-1", "hlh-17", "nhr-6", "dmd-6", "ceh-36", "ham-1")
   cds <- cluster_cells(cds)
   cds <- learn_graph(cds)
   pr_gr_aux <- principal_graph_aux(cds)
   principal_graph_aux(cds) <- NULL
   principal_graph_aux(cds) <- pr_gr_aux
 


cole-trapnell-lab/monocle3 documentation built on April 7, 2024, 9:24 p.m.