calculateThreshold: Calculate the default threshold of edge-weight in PANDA...

Description Usage Arguments Value Examples

View source: R/calculateThreshold.R

Description

In a PANDA network, the 4th column is filled with the edge-weight calculated by Z-score formular. [(Glass et al. 2013)]) This function transforms all the edge-weights into values above 0 by formular w'=ln(e^w+1) , then calculates the midpoint between the median edge-weight of prior ( 3rd column "Motif" is 1.0) edges and the median edge-weight of non-prior edges (3rd column "Motif" is 0.0) in PANDA network.

Usage

1

Arguments

df

Data Frame indicating the entire network result of PANDA algorithm, it is created by runPanda and accessd by $panda.

Value

Numeric vector of the midpoint between two medians. One median is the median edge-weight of all prior edges, another is the meadian edge-weight of all non-prior edges.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# refer to four input datasets files in inst/extdat
treated_expression_file_path <- system.file("extdata", "expr4.txt", package = "netZoo", mustWork = TRUE)
control_expression_file_path <- system.file("extdata", "expr10.txt", package = "netZoo", mustWork = TRUE)
motif_file_path <- system.file("extdata", "chip.txt", package = "netZoo", mustWork = TRUE)
ppi_file_path <- system.file("extdata", "ppi.txt", package = "netZoo", mustWork = TRUE)


# Run PANDA for treated and control network
treated_all_panda_result <- runPanda(e = treated_expression_file_path, m = motif_file_path, ppi = ppi_file_path, rm_missing = TRUE )
control_all_panda_result <- runPanda(e = control_expression_file_path, m = motif_file_path, ppi = ppi_file_path, rm_missing = TRUE )

# Access PANDA regulatory network
treated_net <- treated_all_panda_result$panda
control_net <- control_all_panda_result$panda

# Calculate the default threshold of edge-weight in a PANDA network.
calculateCutoff (treated_net )

twangxxx/netZoo documentation built on May 17, 2019, 1:02 p.m.