Multi-Dendrix Logo

This Page

multi_dendrix.A

multi_dendrix.A(patient2mutations, gene, patient)

Mutation matrix accessor function (see ILP()).

Parameters:
  • patient2mutations (dictionary) – mapping of patients to the genes in which they have mutations.
  • gene (string) – gene name.
  • patient (string) – patient name.
Returns:

1 if gene g is mutated in the given patient, 0 otherwise.

Examples:
>>> A({"TCGA-01" : ["G2", "G3"], "G2", "TCGA-01"})
1
>>> A({"TCGA-01" : ["G2", "G3"], "G1", "TCGA-01"})
0