runVanillaCarnival

runVanillaCarnival(
  perturbations,
  measurements,
  priorKnowledgeNetwork,
  weights = NULL,
  carnivalOptions = defaultLpSolveCarnivalOptions()
)

Arguments

perturbations

vector of targets of perturbations.

measurements

vector of the measurements (i.e. DoRothEA/VIPER normalised enrichment scores)

priorKnowledgeNetwork

data frame of the prior knowledge network

weights

(optional) vector of the additional weights: e.g. PROGENy pathway score or measured protein activities.

carnivalOptions

the list of options for the run. See defaultLpSolveCarnivalOptions(), defaultLpSolveCarnivalOptions, defaultCbcCarnivalOptions.

Value

The function will return a list of results containing: 1. weightedSIF: A table with 4 columns containing the combined network solutions from CARNIVAL. It contains the Source of the interaction (Node1), Sign of the interaction (Sign), the Target of the interaction (Node2) and the weight of the interaction (Weight) which shows how often an interaction appears across all solutions.

2. nodesAttributes: A table with 6 columns containing information about infered protein activity states and attributes. It contains the Protein IDs (Node); how often this node has taken an activity of 0, 1 and -1 across the solutions (ZeroAct, UpAct, DownAct); the average activities across solutions (AvgAct); and the node attribute (measured, target, inferred).

3. sifAll: A list of separate network solutions.

4. attributesAll: A list of separate inferred node activities in each solution.

5. diagnostics: reports the convergence of optimization and reason of the termination. Only for CPLEX solver.

Details

Runs full CARNIVAL pipeline, vanilla(classic) flavour.

Author

Enio Gjerga, Olga Ivanova 2020-2021 carnival.developers@gmail.com

Examples

load(file = system.file("toy_perturbations_ex1.RData", package="CARNIVAL")) load(file = system.file("toy_measurements_ex1.RData", package="CARNIVAL")) load(file = system.file("toy_network_ex1.RData", package="CARNIVAL")) ## lpSolve res1 = runVanillaCarnival(perturbations = toy_perturbations_ex1, measurements = toy_measurements_ex1, priorKnowledgeNetwork = toy_network_ex1, carnivalOptions = defaultLpSolveCarnivalOptions())
#> --- Start of the CARNIVAL pipeline ---
#> 01:55:46 12.05.2021 Carnival flavour: vanilla
#> 01:55:46 12.05.2021 Generating variables for lp problem
#> 01:55:46 12.05.2021 Done: generating variables for lp problem
#> Saving preprocessed data.
#> Done: saving parsed data: /Users/olgaivanova/GoogleDrive/_PhD_Heidelberg/playground/carnival_style/carnival/docs/reference/parsedData_t01_55_46d12_05_2021n34.RData
#> 01:55:46 12.05.2021 Generating formulation for LP problem
#> 01:55:46 12.05.2021 Done: generating formulation for LP problem.
#> Saving LP file
#> Done: Saving LP file: /Users/olgaivanova/GoogleDrive/_PhD_Heidelberg/playground/carnival_style/carnival/docs/reference/lpFile_t01_55_46d12_05_2021n34.lp
#> 01:55:46 12.05.2021 Solving LP problem
#> Parsing .lp file for lpSolve
#> #> ── Column specification ──────────────────────────────────────────────────────── #> cols( #> X1 = col_character() #> )
#> Done: parsing .lp file for lpSolve
#> 01:55:46 12.05.2021 Done: solving LP problem.
#> 01:55:46 12.05.2021 Getting the solution matrix
#> 01:55:46 12.05.2021 Done: getting the solution matrix.
#> 01:55:46 12.05.2021 Exporting solution matrix
#> 01:55:46 12.05.2021 Done: exporting solution matrix.
#> Cleaning intermediate files
#> Done: cleaning
#> 01:55:46 12.05.2021 All tasks finished.
#> #> --- End of the CARNIVAL pipeline ---
res1$weightedSIF ##see @return
#> Node1 Sign Node2 Weight #> 1 I1 1 N1 100 #> 2 N1 1 M1 100 #> 3 N1 1 M2 100 #> 4 I2 -1 N2 100
res1$nodesAttributes ## see @return
#> nodes ZeroAct UpAct DownAct AvgAct nodesType #> 1 I1 0 100 0 100 P #> 2 N1 0 100 0 100 #> 3 I2 0 100 0 100 P #> 4 N2 100 0 0 0 #> 5 M1 0 100 0 100 M #> 6 M2 0 100 0 100 M
res1$sifAll ## see @return
#> [[1]] #> Node1 Sign Node2 #> 1 I1 1 N1 #> 2 N1 1 M1 #> 3 N1 1 M2 #> 4 I2 -1 N2 #>
res1$attributesAll ## see @return
#> [[1]] #> nodes activity #> 1 I1 1 #> 2 N1 1 #> 3 I2 1 #> 4 M1 1 #> 5 M2 1 #>
## Examples for cbc and cplex are commented out because these solvers are not part of R environment ## and need to be installed separately ## ## cbc ## res2 = runVanillaCarnival(perturbations = toy_perturbations_ex1, ## measurements = toy_measurements_ex1, ## priorKnowledgeNetwork = toy_network_ex1, ## carnivalOptions = defaultCbcCarnivalOptions()) ## ## res2$weightedSIF ##see @return ## res2$nodesAttributes ## see @return ## res2$sifAll ## see @return ## res2$attributesAll ## see @return ## ## cplex ## res3 = runVanillaCarnival(perturbations = toy_perturbations_ex1, ## measurements = toy_measurements_ex1, ## priorKnowledgeNetwork = toy_network_ex1, ## carnivalOptions = defaultCplexCarnivalOptions()) ## ## res3$weightedSIF ##see @return ## res3$nodesAttributes ## see @return ## res3$sifAll ## see @return ## res3$attributesAll ## see @return