get_net2target_list: Convert Pairwise Network Data Frame to Driver-to-Target List

View source: R/pipeline_functions.R

get_net2target_listR Documentation

Convert Pairwise Network Data Frame to Driver-to-Target List

Description

get_net2target_list is a helper function in the get.SJAracne.network. But if users have their own pairwise gene network files, they can convert it to driver-to-target list object.

Usage

get_net2target_list(net_dat = NULL)

Arguments

net_dat

data.frame, must contain two columns with column names "source" (driver) and "target" (target genes). "MI" (mutual information) and "spearman" (spearman correlation coefficient) columns are optional, but strongly suggested to use. If "MI" and "spearman" columns are missing, errors may occur in some following steps (e.g. es.method='weightedmean' in cal.Activity).

Value

Return a list. The names of the list elements are drivers. Each element is a data frame, contains three columns. "target", target gene names; "MI", mutual information; "spearman", spearman correlation coefficient.

Examples

tf.network.file <- sprintf('%s/demo1/network/SJAR/project_2019-02-14/%s/%s',
                   system.file(package = "NetBID2"),
                   'output_tf_sjaracne_project_2019-02-14_out_.final',
                   'consensus_network_ncol_.txt')
net_dat      <- read.delim(file=tf.network.file,stringsAsFactors = FALSE)
target_list  <- get_net2target_list(net_dat)

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.