rename_net: Rename network

View source: R/utils-dataset-converters.R

rename_netR Documentation

Rename network

Description

Renames a given network to these column names: .source, .target, .mor, If .mor is not provided, then the function sets them to default values.

Usage

rename_net(
  network,
  .source,
  .target,
  .mor = NULL,
  .likelihood = NULL,
  def_mor = 1
)

Arguments

network

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

.source

Column with source nodes.

.target

Column with target nodes.

.mor

Column with edge mode of regulation (i.e. mor).

.likelihood

Deprecated argument. Now it will always be set to 1.

def_mor

Default value for .mor when not provided.

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"))
rename_net(net, source, target, mor)

saezlab/decoupleR documentation built on Oct. 21, 2024, 8:47 a.m.