Multi-Dendrix Logo

This Page

multi_dendrix.ILP

multi_dendrix.ILP(mutation_data, t=2, k_min=2, k_max=3, alpha=1.0, delta=0.0, lmbda=1.0, verbose=False, max_mem=None, max_time=None)

Implementation of Multi-Dendrix ILP. Sets up ILP, uses CPLEX Python to solve it, and parses the results.

Parameters:
  • t (int) – number of gene sets (default: 2).
  • k_min (int) – minimum gene set size (default: 2).
  • k_max (int) – maximum gene set size (default: 3).
  • alpha (float) – modifies the weight function W by changing the tradeoff between coverage and coverage overlap (default: 1.0).
  • delta (float) – number of delta allowed between any pair of gene sets (default: 0).
  • lmbda (int) – number of gene sets any gene can be a member of (default: 1).
  • verbose – outputs progress to stdout (default: False).
  • max_mem (float) – amount of memory to constrain the CPLEX optimizer to (default: unconstrained).
  • max_time (float) – amount of time to constrain the CPLEX optimizer to (default: unconstrained).
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).

Examples:
A view of example input:
>>> 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)
The results of Multi-Dendrix run for t = kmax = kmin = 2:
>>> ILP(data, 2, 2, 2)
[(['G3', 'G4'], 3), (['G1', 'G2'], 3)]

See also: load_mutation_data().