newTopNetwork: TopNetwork object creator

Description Usage Arguments Value Examples

View source: R/regenrichClasses.R

Description

This function create 'TopNetwork' object using 3-column edge table.

Usage

1
2
3
4
5
6
7
newTopNetwork(
  networkEdgeTable,
  reg = "",
  directed = TRUE,
  networkConstruction = c("new", "COEN", "GRN"),
  percent = 100
)

Arguments

networkEdgeTable

a data frame of 3 columns, representing 'from.gene' ('regulators'), 'to.gene' ('targets') and 'weight', respectively.

reg

a vector of gene regulators.

directed

logical, whether the network is directed. Default is TRUE.

networkConstruction

the method to construct this network. Possible can be: 'COEN', coexpression network; 'GRN', gene regulatory network by random forest; 'new' (default), meaning a network provided by user, rather than infered based on the expression data.

percent

the percentage of edges in the original whole network. Default is 100, meaning 100% edges in whole network.

Value

an object of topNetwork class.

Examples

1
2
3
4
5
6
data(TFs)
edge = data.frame(from = rep(TFs$TF_name[seq(3)], seq(3)),
                  to = TFs$TF_name[11:16], weight = 0.1*(6:1))
object = newTopNetwork(edge, networkConstruction = 'new', percent = 100)
object
str(object)

WTaoUMC/RegEnrich documentation built on Aug. 4, 2021, 4:11 p.m.