View source: R/pandaToAlpaca.R
pandaToAlpaca | R Documentation |
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.
pandaToAlpaca(panda.net1, panda.net2, file.stem = "./alpaca", verbose = FALSE)
panda.net1 |
data.frame indicating an complete network of one condition generated by |
panda.net2 |
data.frame indicating an complete network of another condition generated by |
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'. |
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
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.