pandaToAlpaca: Use two PANDA network to generate an ALPACA result

View source: R/pandaToAlpaca.R

pandaToAlpacaR Documentation

Use two PANDA network to generate an ALPACA result

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 pandaPy in this package and finds the sets of nodes that best characterize the change in modular structure.

Usage

pandaToAlpaca(panda.net1, panda.net2, file.stem = "./alpaca", verbose = FALSE)

Arguments

panda.net1

data.frame indicating an complete network of one condition generated by pandaPy

panda.net2

data.frame indicating an complete network of another condition generated by pandaPy

file.stem

String indicating the folder path and prefix of result files, where all results will be stored.

verbose

Boolean vector indicating whether the full differential modularity matrix should also be written to a file. The default values is 'FALSE'.

Value

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

Examples

# refer to four input datasets files in inst/extdat
treated_expression_file_path <- system.file("extdata", "expr4_matched.txt", 
package = "netZooR", mustWork = TRUE)
control_expression_file_path <- system.file("extdata", "expr10_matched.txt", 
package = "netZooR", mustWork = TRUE)
motif_file_path <- system.file("extdata", "chip_matched.txt", package = "netZooR", mustWork = TRUE)
ppi_file_path <- system.file("extdata", "ppi_matched.txt", package = "netZooR", mustWork = TRUE)


# Run PANDA for treated and control network

treated_panda_net <- pandaPy(expr_file = treated_expression_file_path, 
motif_file = motif_file_path, ppi_file = ppi_file_path, 
modeProcess="legacy", remove_missing = TRUE )$panda
control_panda_net <- pandaPy(expr_file = control_expression_file_path, 
motif_file = motif_file_path, ppi_file = ppi_file_path, 
modeProcess="legacy", remove_missing = TRUE )$panda
 
# Run ALPACA
alpaca<- pandaToAlpaca(treated_panda_net, control_panda_net, "./TB", verbose=TRUE)

# Delete files.
file.remove("TB_ALPACA_ctrl_memb.txt")
file.remove("TB_ALPACA_final_memb.txt")
file.remove("TB_ALPACA_scores.txt")
file.remove("TB_DWBM.txt")
file.remove("TB_DWBM_colnames.txt")
file.remove("TB_DWBM_rownames.txt")



netZoo/netZooR documentation built on Oct. 16, 2024, 10:23 p.m.