runAlpaca: Run ALPACA

Description Usage Arguments Value Examples

View source: R/runAlpaca.R

Description

ALPACA(ALtered Partitions Across Community Architectures) is a method for comparing two genome-scale networks derived from different phenotypic states to identify condition-specific modules. [(Padi and Quackenbush 2018)]) This function compares two networks generate by runPanda in this package and finds the sets of nodes that best characterize the change in modular structure.

Usage

1
runAlpaca(panda_net1, panda_net2, file.stem, verbose = F)

Arguments

panda_net1

Data Frame indicating one entire network generate by runPanda

panda_net2

Data Frame indicating another entire network generate by runPanda

file.stem

The folder location and title under which all results will be stored.

verbose

Indicates whether the full differential modularity matrix should also be written to a file. Defaults to FALSE.

Value

A string message showing the location of output file if file.stem is given, or a List where first element is the membership vector and second element is the contribution score of each node to its module's total differential modularity

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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_panda_net <- runPanda(e = treated_expression_file_path, m = motif_file_path, ppi = ppi_file_path, rm_missing = TRUE )$panda
control_panda_net <- runPanda(e = control_expression_file_path, m = motif_file_path, ppi = ppi_file_path, rm_missing = TRUE )$panda
 
# Run ALPACA
alpaca<- runAlpaca(treated_panda_net, control_panda_net, "~/Desktop/TB", verbose=T)

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