Implementation of Multi-Dendrix ILP. Sets up ILP, uses CPLEX Python to solve it, and parses the results.
Parameters: |
|
---|---|
Returns: | A list of t tuples sorted by weight W, where each tuple contains 1) a gene set that is part of an optimal solution for the given input data, and 2) the weight W of that gene set (recall that the function W changes with the parameter alpha). |
>>> mutation2patients = {"G1" : ["TCGA-01", "TCGA-03"], "G2" : ["TCGA-02"],
"G3" : ["TCGA-01", "TCGA-02", "TCGA-03"], "G4" : ["TCGA-02", "TCGA-04"]}
>>>> patient2mutations = {"TCGA-01" : ["G1", "G3"], "TCGA-02" : ["G2", "G2"],
"TCGA-03" : ["G1", "G3"], "TCGA-04" : ["G4"]}
>>> genes = ["G1", "G2", "G3", "G4"]
>>> patients = ["TCGA-01", "TCGA-02", "TCGA-03", "TCGA-04"]
>>> data = (4, 4, genes, patients, mutation2patients, patient2mutations)
>>> ILP(data, 2, 2, 2)
[(['G3', 'G4'], 3), (['G1', 'G2'], 3)]
See also: load_mutation_data().