Learn R Programming

inferCSN (version 1.2.0)

single_network: Construct network for single target gene

Description

Construct network for single target gene

Usage

single_network(
  matrix,
  regulators,
  target,
  cross_validation = FALSE,
  seed = 1,
  penalty = "L0",
  r_squared_threshold = 0,
  n_folds = 5,
  verbose = TRUE,
  ...
)

Value

A data frame of the single target gene network. The data frame has three columns: regulator, target, and weight.

Arguments

matrix

An expression matrix.

regulators

The regulator genes for which to infer the regulatory network.

target

The target gene.

cross_validation

Whether to use cross-validation. Default is FALSE.

seed

The random seed for cross-validation. Default is 1.

penalty

The type of regularization, default is "L0". This can take either one of the following choices: "L0", "L0L1", and "L0L2". For high-dimensional and sparse data, "L0L2" is more effective.

r_squared_threshold

Threshold of \(R^2\) coefficient. Default is 0.

n_folds

The number of folds for cross-validation. Default is 5.

verbose

Whether to print progress messages. Default is TRUE.

...

Parameters for other methods.

Examples

Run this code
data(example_matrix)
head(
  single_network(
    example_matrix,
    regulators = colnames(example_matrix),
    target = "g1"
  )
)
head(
  single_network(
    example_matrix,
    regulators = colnames(example_matrix),
    target = "g1",
    cross_validation = TRUE
  )
)

single_network(
  example_matrix,
  regulators = c("g1", "g2", "g3"),
  target = "g1"
)
single_network(
  example_matrix,
  regulators = c("g1", "g2"),
  target = "g1"
)

Run the code above in your browser using DataLab