File: dot-fit_preprocessing.Rd

package info (click to toggle)
r-bioc-decoupler 2.12.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,612 kB
  • sloc: makefile: 5
file content (45 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/decoupleR-pre.R
\name{.fit_preprocessing}
\alias{.fit_preprocessing}
\title{Pre-processing for methods that fit networks.}
\usage{
.fit_preprocessing(network, mat, center, na.rm, sparse)
}
\arguments{
\item{network}{Tibble or dataframe with edges and it's associated metadata.}

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

\item{center}{Logical value indicating if \code{mat} must be centered by
\code{\link[base:colSums]{base::rowMeans()}}.}

\item{na.rm}{Should missing values (including NaN) be omitted from the
calculations of \code{\link[base:colSums]{base::rowMeans()}}?}

\item{sparse}{Deprecated parameter.}
}
\value{
A named list of matrices to evaluate in methods that fit models, like
\code{.mlm_analysis()}.
\itemize{
\item mat: Features as rows and samples as columns.
\item mor_mat: Features as rows and columns as source.
}
}
\description{
\itemize{
\item If \code{center} is true, then the expression values are centered by the
mean of expression across the samples.
}
}
\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)
}