Multi-Dendrix Logo

This Page

multi_dendrix.W

multi_dendrix.W(mutation2patients, gene_set, alpha)[source]

Calculates the weight W of a set of genes, defined as the weighted difference between their total coverage and coverage overlap.

Parameters:
  • mutation2patients (dictionary) – mapping gene / mutation class to the patients with mutations in that gene.
  • gene_set (list) – a list of gene names.
  • alpha (float) – Multi-Dendrix parameter alpha (see ilp() for reference).
Returns:

weight W

Example:

>>> h = { "g1" : [3, 4, 5], "g2" : [1, 2, 3], "g3" : [5, 6, 7]}
>>> gset = ["g1", "g2", "g3"]
>>> W(h, gset, 2)
5