get_cor: Extract correlation matrix

View source: R/get_cor.R

get_corR Documentation

Extract correlation matrix

Description

Extract correlation matrix stored as a graph.

Usage

get_cor(
  obj,
  keys = NULL,
  assay = NULL,
  slot = NULL,
  graph_key = NULL,
  method = "pearson",
  return_obj = FALSE,
  as_graph = TRUE,
  verbose = TRUE
)

Arguments

obj

A single-cell object supported by scKirby. See converters for a table of all supported conversions.

keys

The keys of reductions to extract from.

assay

Assay to used to compute correlation graph if one does not already exist.

slot

Name of component object to return

graph_key

Name of the graph to extract.

method

Pairwise correlation method.

return_obj

Whether to return the single-cell object with a new graph, or to simply return the sparse correlation matrix.

as_graph

Convert the correlation matrix to the Graphs class.

verbose

Print messages.

Value

Trait-trait correlation matrix.

Examples

obj <- example_obj("seurat")
Xcor <- get_cor(obj = obj,
                keys = "pca")

bschilder/scKirby documentation built on April 22, 2024, 12:13 a.m.