BIMIB-DISCo / TRONCO

Repository of the TRanslational ONCOlogy library, which includes various algorithms (such as CAPRESE and CAPRI) and the Pipeline for Cancer Inference (PICNIC).
https://bimib-disco.github.io/TRONCO
GNU General Public License v3.0
28 stars 7 forks source link

Bug tronco.plot when expanding hypotheses #101

Closed egalimberti closed 7 years ago

egalimberti commented 7 years ago

There is a bug in tronco.plot when we expand hypotheses in the specific case when we have hypotheses connected to or from other hypotheses.

Check the attached data file (to be imported to R) to reproduce the bug.

hyp.rds.zip

caravagn commented 7 years ago

I cannot import in R the attached zip file, once I uncompress it (it has no extension). What format is that? Can you provide us with an Rdata?

danro9685 commented 7 years ago

I also tried to import the file to R but it does not work. @egalimberti please also attach the .RData

egalimberti commented 7 years ago

It's an .rds data. You can use it like this: "hyp = readRDS('/Users/edotony/Cytoscape Data/hyp.rds')".

In any case, I attach the .RData file. hyp.RData.zip

danro9685 commented 7 years ago

UPDATE: I did some more test, and I am attaching a new RData that reproduces the crash res.RData.zip

It seems the problem is related to the hypothesis.expansion. I get error both if I run tronco.capri(res,de.boot=FALSE) and if I get a valid model (for instance tronco.edmondsi(res,do.boot=FALSE) works) and do tronco.plot. The error disappear if we run the tronco.plot with expand = FALSE.

@luca-dex when you can please have a look. Also, this object was generated by cyTRON. I am not 100% sure that the operations to add hypotheses in cyTRON are totally correct, but I fear this is not a problem with cyTRON but with TRONCO. Which is weird, cause we never noticed before (all my tests have been made with the release from Bioconductor).

Daniele

caravagn commented 7 years ago

It seems to me that the object is contains a model inferred with Edmonds, plus hypotheses.

as.selective.advantage.relations(res) $edmonds_no_reg_pmi SELECTS SELECTED OBS.SELECTS OBS.SELECTED TEMPORAL.PRIORITY PROBABILITY.RAISING 1 Deletion PTEN Deletion SMAD4 4 4 1.693339e-01 1.078582e-21 2 Deletion SMAD4 Deletion ACVR1B 4 1 4.407760e-75 1.633707e-76 3 Amplification AXIN2 Amplification BRAF 3 1 7.944758e-52 1.431574e-66 4 Mutation TP53 Mutation LRP5 89 1 4.297191e-101 2.713618e-76 5 Mutation BRAF Amplification SMAD2 6 1 2.860643e-95 5.265699e-73 6 Mutation FBXW7 Mutation CTNNB1 19 10 5.637708e-85 9.831867e-87 7 Mutation APC Pattern XOR_TP53 119 90 1.163250e-99 1.617815e-03

etc. Is this right?

You are not supposed to have patterns and use Edmonds.