dot-fit_preprocessing: Pre-processing for methods that fit networks.

.fit_preprocessingR Documentation

Pre-processing for methods that fit networks.

Description

  • If center is true, then the expression values are centered by the mean of expression across the samples.

Usage

.fit_preprocessing(network, mat, center, na.rm, sparse)

Arguments

network

Tibble or dataframe with edges and it's associated metadata.

mat

Matrix to evaluate (e.g. expression matrix). Target nodes in rows and conditions in columns. rownames(mat) must have at least one intersection with the elements in network .target column.

center

Logical value indicating if mat must be centered by base::rowMeans().

na.rm

Should missing values (including NaN) be omitted from the calculations of base::rowMeans()?

sparse

Deprecated parameter.

Value

A named list of matrices to evaluate in methods that fit models, like .mlm_analysis().

  • mat: Features as rows and samples as columns.

  • mor_mat: Features as rows and columns as source.

Examples

inputs_dir <- system.file("testdata", "inputs", package = "decoupleR")
mat <- readRDS(file.path(inputs_dir, "mat.rds"))
net <- readRDS(file.path(inputs_dir, "net.rds"))
net <- rename_net(net, source, target, mor)
.fit_preprocessing(net, mat, center = FALSE, na.rm = FALSE, sparse = FALSE)

saezlab/decoupleR documentation built on April 12, 2024, 10:41 a.m.