saezlab / cosmosR

COSMOS (Causal Oriented Search of Multi-Omic Space) is a method that integrates phosphoproteomics, transcriptomics, and metabolomics data sets.
https://saezlab.github.io/cosmosR/
GNU General Public License v3.0
56 stars 15 forks source link

Switching to Gurobi solver for running COSMOS #31

Closed SwagatikaSahoo2023 closed 1 month ago

SwagatikaSahoo2023 commented 1 year ago

Dear Saez Lab Thanks for your support earlier. I have setup COSMOS in R, and currently running into issues while using the Gurobi solver. Below is a copy of the console.

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

filter, lag

The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union

Loading required package: slam [1] "Adding compartment codes." Error in match.arg(solver, choices = solver_options) : 'arg' should be one of “lpSolve”, “cplex”, “cbc”

source("~/MOMI_Project/Vantage_OMICsAnalysis/to_SS_for_cosmos/run_cosmos_nbc_recent.R") [1] "Adding compartment codes." Automatic setup path for cplex solver is not support for Windows yet. [1] "COSMOS: 145 input/measured nodes are not in PKN any more: MetabHMDB0003454_c, Metab__HMDB0014828_c, MetabHMDB0035589_c, MetabHMDB0061683_c, Metab__HMDB0040865_c, MetabHMDB0041272_c and 139 more." [1] "COSMOS: 183 input/measured nodes are not in PKN any more: ZNF723P, AC008984.2, VDAC1P4, PEX5L, RP11-252I13.1, RFPL1 and 177 more." [1] "COSMOS: all 4 signaling nodes from data were found in the meta PKN" [1] "COSMOS: all 23 metabolic nodes from data were found in the meta PKN" [1] "COSMOS: 6 of the 15 genes in expression data were found as transcription factor target" [1] "COSMOS: 6 of the 5321 transcription factor targets were found in expression data" [1] "COSMOS: removing nodes that are not reachable from inputs within 5 steps" [1] "COSMOS: 59839 from 83556 interactions are removed from the PKN" [1] "COSMOS: 20 input/measured nodes are not in PKN any more: MetabHMDB0001930_c, Metab__HMDB0014389_c, MetabHMDB0014633_c, MetabHMDB0014928_c, Metab__HMDB0003791_c, MetabHMDB0000228_c and 14 more." [1] "COSMOS: removing nodes that are not observable by measurements within 5 steps" [1] "COSMOS: 21226 from 23717 interactions are removed from the PKN" [1] "COSMOS: 2 input/measured nodes are not in PKN any more: FOXA1, HNF4A and 0 more." [1] "COSMOS: 133 interactions are removed from the PKN based on consistency check between TF activity and gene expression" --- Start of the CARNIVAL pipeline --- 16:12:53 05.06.2023 Carnival flavour: vanilla 16:12:53 05.06.2023 Generating variables for lp problem 16:12:53 05.06.2023 Done: generating variables for lp problem Saving preprocessed data. Done: saving parsed data: C:/Users/vanta/OneDrive/Documents/MOMI_Project/Vantage_OMICsAnalysis/to_SS_for_cosmos/parsedData_t16_12_53d05_06_2023n43.RData 16:12:53 05.06.2023 Generating formulation for LP problem 16:12:53 05.06.2023 Done: generating formulation for LP problem. Saving LP file Done: Saving LP file: C:/Users/vanta/OneDrive/Documents/MOMI_Project/Vantage_OMICsAnalysis/to_SS_for_cosmos/lpFile_t16_12_53d05_06_2023n43.lp 16:12:54 05.06.2023 Solving LP problem Writing cplex command file Done: writing cplex command file Saving results... Error in solversFunctions$solve(carnivalOptions) : CPLEX solution file is not found. CPLEX was likely interrupted (exceeding memory limit is the usual cause). Try to increase the available resources (memory) or reducing the PKN. In addition: Warning message: In file.remove("cplex.exe") : cannot remove file 'cplex.exe', reason 'No such file or directory'

Please advise further. Please note that I am using Gurobi, but due to default_CARNIVAL_options, I have written it as "cplex". Best Swagatika Sahoo

adugourd commented 2 months ago

Gurobi isn't suppprted in cosmos sadly. Now with the latest update we are moving away from third party solvers altogether, so this shouldn't be a problem anymore :)

an-altosian commented 1 month ago

Hi @adugourd Could you please explain a little bit more? How could I avoid the third party solver problem? Thanks.

adugourd commented 1 month ago

hi, see: https://github.com/saezlab/COSMOS_basic :)