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
58 stars 15 forks source link

error in Check Pertubations #29

Closed narmadabc closed 1 year ago

narmadabc commented 1 year ago

Since we are hitting a memory limit for the cplex solver CPLEX> 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.

we tried to reduce the size of the RNA_input but I am encountering this issue while running Cosmos

Error in checkPerturbations(perturbations, nodesPriorKnowledgeNetwork) : None of your perturbations are in prior knowledge networks (PKN). Check node identifiers in both perturbations and PKN objects

Can you please suggest a solution?

gabora commented 1 year ago

Based on the error messages you provided, it seems that you are encountering two separate issues. Let's address each one individually:

  1. Memory Limit Error with CPLEX Solver:
    The error message suggests that you are hitting a memory limit while using the CPLEX solver. This is a common issue when solving large optimization problems. To resolve this, you can try the following solutions:
  1. Perturbations Not Found in Prior Knowledge Networks (PKN): The second error message suggests that the perturbations you are providing are not present in the prior knowledge networks (PKN). This means that the node identifiers in your perturbations do not match the nodes in the PKN. To address this issue, you can consider the following steps:

By addressing these two separate issues, you should be able to make progress with your code and resolve the encountered errors.

disclaimer: text was generated by GPT 3.5. content was checked and adjusted.

narmadabc commented 1 year ago

How to check the perturbations and the nodes in the PKN?

adugourd commented 1 year ago

Hi,

reducing the size of your RNA input won't help here actually, because the RNA_input is used mainly to filter out genes that are not expressed from the PKN. I would advise against doing that.

In order to reduce the size of the PKN, I would suggest to lower the number of steps that are allowed to reach the downstream nodes from the perturbations (maximum_network_depth parameter, try setting it to 3 or 4)

Cheers,

Aurelien

narmadabc commented 1 year ago

Thank you Aurelien, when I set the network depth parameter to 3 or 2 I encounter the second error again. I am trying with the NC160 sample dataset

Error in checkPerturbations(perturbations, nodesPriorKnowledgeNetwork) : None of your perturbations are in prior knowledge networks (PKN). Check node identifiers in both perturbations and PKN objects

How to check the node identifiers for comparing between perturbations and PKN objects?

adugourd commented 1 year ago

What's happening here is that probalby after pruning the network to the length defined by maximum_network_depth, none of the metabolites can be reached in such a short path from the upstream signaling inputs.

You can try to increase the path length and see if it fixes it.

alternativelly, you can also use the igraph package to explore the meta_pkn variable manually, for example to find the shortest path between a given perturbation (signaling input) and a downstream metabolite (see igraph tutorials).

If you are limited in memory when increasing the maximum_netowrk_depth, you may also try to increase the maximum memory allocation of Rstudio (you can find how to do it online, depending on your exploitation system the procedure may vary)

narmadabc commented 1 year ago

I have increased the R studio memory limit to 1gb and still facing same issue. I will try with increasing Here what is meant by perturbations (is it the signaling input and metab input files or something else). Does the carnival flavour matter when there are no external perturbations like disease or drugs?

adugourd commented 1 year ago

Ah I see, 1Gb is actually pretty low for many cases. You may wanna try to increase it to at least 16Gb.

the perturbations are simply the deregulated upstream nodes. In the case of the NCI 60 dataset, the upstream deregulated (the signaling input) are considered "perturbations". You shouldn't worry about Carnival flavour.