Skip to contents

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
# \donttest{
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)
# }