generateLpFileCarnival

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

Arguments

perturbations

(optional, if inverse CARNIVAL flavour is used further) 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 scores or measured protein activities.

carnivalOptions

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

Value

paths to .lp file and .RData file that can be used for runFromLpCarnival()

Details

Prepares the input data for the run: tranforms data into lp file and .Rdata file. These files can be reused to run CARNIVAL without preprocessing step using runCarnivalFromLp(..)

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 = generateLpFileCarnival(perturbations = toy_perturbations_ex1, measurements = toy_measurements_ex1, priorKnowledgeNetwork = toy_network_ex1, carnivalOptions = defaultLpSolveCarnivalOptions())
#> --- Start of the CARNIVAL pipeline ---
#> 01:55:44 12.05.2021 Carnival flavour: LP generator
#> 01:55:44 12.05.2021 Generating variables for lp problem
#> 01:55:44 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_44d12_05_2021n45.RData
#> 01:55:44 12.05.2021 Generating formulation for LP problem
#> 01:55:44 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_44d12_05_2021n45.lp
#> Cleaning intermediate files
#> Done: cleaning
#> 01:55:44 12.05.2021 All tasks finished.
#> #> --- End of the CARNIVAL pipeline ---
res1["lpFile"] ##path to generated lp file
#> lpFile #> "/Users/olgaivanova/GoogleDrive/_PhD_Heidelberg/playground/carnival_style/carnival/docs/reference/lpFile_t01_55_44d12_05_2021n45.lp"
res1["parsedDataFile"] ##path to data file used during generation
#> parsedDataFile #> "/Users/olgaivanova/GoogleDrive/_PhD_Heidelberg/playground/carnival_style/carnival/docs/reference/parsedData_t01_55_44d12_05_2021n45.RData"
## 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 = generateLpFileCarnival(perturbations = toy_perturbations_ex1, ## measurements = toy_measurements_ex1, ## priorKnowledgeNetwork = toy_network_ex1, ## carnivalOptions = defaultCbcCarnivalOptions()) ## ## res2["lpFile"] ##path to generated lp file ## res2["parsedDataFile"] ##path to data file used during generation ## ## cplex ## res3 = generateLpFileCarnival(perturbations = toy_perturbations_ex1, ## measurements = toy_measurements_ex1, ## priorKnowledgeNetwork = toy_network_ex1, ## carnivalOptions = defaultCplexCarnivalOptions()) ## ## res3["lpFile"] ##path to generated lp file ## res3["parsedDataFile"] ##path to data file used during generation