rename_net {decoupleR} | R 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, "input-expr_matrix.rds"))
    network <- readRDS(file.path(inputs_dir, "input-dorothea_genesets.rds"))
    rename_net(network, tf, target, mor)

[Package decoupleR version 2.0.1 Index]