saezlab / PHONEMeS-ILP

ILP implementation of PHONEMeS
GNU General Public License v3.0
1 stars 2 forks source link

Problem while executing runPHONEMeS_UD() with the PHONEMeS Upside-Down Analysis Example #7

Closed anamdv closed 2 years ago

anamdv commented 3 years ago

Hi!!

I am really interested in making PHONEMES work with my data, so I am trying first to execute it with your example datasets. I have faced an error while trying out the Colon Cancer (Upside-Down) dataset. The error appears when I execute the last step: phonemes_ud <- runPHONEMeS_UD(targets.P = targets.P, conditions = conditions, inputObj = dataInput, experiments = experiments, bg = bg, solver="cbc",solverPath = "C:/Users/svg993/Desktop/testR/cbc.exe")

I have looked into the function, and I traced back the error to this line of code cbc_table <- merge(cbc_table, mapping_table, by.x = "name", by.y = "milp") within the solve_with_cbc function. It seems that the cbc_table (cbc_results.txt and the temp.lp files have indexes that do not match, so the resulting table is empty. So when the main function runPHONEMeS tries: colnames(resultsSIF1) <- c("Source", "Interaction", "Target") resultsSIF1[, 2] <- "1" gives the following error, because resultsIF1 is empty: Error in [<-.data.frame(*tmp*, , 2, value = "1") : replacement has 1 row, data has 0

I got this error in the console while running the solve_with_cbc_function as well, in case it helps you figure out the root of the problem: Coin3007W ### CoinLpIO::is_invalid_name(): Name c26534: contains illegal character ':' Coin3007W ### CoinLpIO::are_invalid_names(): Invalid name: vnames[28084]: c26534: Coin3007W ### CoinLpIO::is_invalid_name(): Name c26535: contains illegal character ':' Coin3007W ### CoinLpIO::are_invalid_names(): Invalid name: vnames[28085]: c26535: Coin3007W ### CoinLpIO::readLp(): Invalid column names

Thank you a lot in advance!

Best,

Ana

jmj21-ic commented 2 years ago

Hi,

I am also very interested in using PHONEMeS_ud for my research, and am experiencing the same issue trying to run the example with Cplex (Error in [<-.data.frame(tmp, , 2, value = "1") : replacement has 1 row, data has 0).

I agree that the issue is occurs in the solvewith{solver} function, however I think it is a result of the files that are created by the write_lp_file_inv_2 function. Specifically, it seems to be in defining the constraints. The difference between write_lp_file_inv_1 (which runs fine) and write_lp_file_inv_2 is replacement of write_constraints_2 and write_constraints_5 with write_constraints_2_ud and write_constraints_5_ud respectively. Replacing them back to the originals (without _ud) allows the code to run without errors, which might be indicative of what is going on? I hope this is helpful as I am very eager to use your tool!

Many thanks,

Jess

gabora commented 2 years ago

dear @jmj21-ic

We are working on the unification of the different phonemes versions. We have some updates on the original Phonemes repo (https://github.com/saezlab/PHONEMeS) it also uses the ILP formalism and CPLEX, furthermore it comes with a nice tutorial (https://github.com/saezlab/PHONEMeS/blob/master/vignettes/tutorial.md) (feedbacks are welcomed if something remained unclear) . I think in that version this problem is solved. Could you please give a try there ?

best, Attila

jmj21-ic commented 2 years ago

@gabora thank you!

Is there an equivalent to the runPHONEMeS_UD function within that repo?

Best,

Jess

gabora commented 2 years ago

@smuellerd do you know about the mentioned feature? :D

smuellerd commented 2 years ago

Hi @jmj21-ic,

PHONEMeS_UD should be the equivalent to our main function that we have implemented in the original Phonemes repo now. There the function is called run_phonemes and how to use it is explained in the tutorial mentioned above (https://github.com/saezlab/PHONEMeS/blob/master/vignettes/tutorial.md). You also start from your phosphoproteomic data and select deregulated phosphorylation sites and kinases based on differential analysis and kinase activity estimation, respectively.

Best Sophia