Convert colnames/rownames of a matrix into intelligible event names, e.g., change a key G23 in 'Mutation KRAS'. If a name is not found, the original name is left unchanged.

keysToNames(x, matrix)

Arguments

x

A TRONCO compliant dataset.

matrix

A matrix with colnames/rownames which represent genotypes keys.

Value

The matrix with intelligible colnames/rownames.

Examples

data(test_model)
adj_matrix = as.adj.matrix(test_model, events=as.events(test_model)[5:15,])$capri_bic
keysToNames(test_model, adj_matrix)
#>                                         missense_point_mutations NRAS_Ex2_3
#> missense_point_mutations NRAS_Ex2_3                                       0
#> missense_point_mutations KRAS_Ex2_3                                       0
#> missense_point_mutations TET2                                             0
#> missense_point_mutations EZH2                                             0
#> missense_point_mutations CBL_Ex_8_9                                       0
#> missense_point_mutations IDH2_R140                                        0
#> missense_point_mutations SF3B1_Ex_12_15                                   0
#> missense_point_mutations JARID_2_Ex1_18                                   0
#> missense_point_mutations EED_Ex2_12                                       0
#> missense_point_mutations CEBPA                                            0
#> missense_point_mutations EPHB3                                            0
#>                                         missense_point_mutations KRAS_Ex2_3
#> missense_point_mutations NRAS_Ex2_3                                       0
#> missense_point_mutations KRAS_Ex2_3                                       0
#> missense_point_mutations TET2                                             0
#> missense_point_mutations EZH2                                             0
#> missense_point_mutations CBL_Ex_8_9                                       0
#> missense_point_mutations IDH2_R140                                        0
#> missense_point_mutations SF3B1_Ex_12_15                                   0
#> missense_point_mutations JARID_2_Ex1_18                                   0
#> missense_point_mutations EED_Ex2_12                                       0
#> missense_point_mutations CEBPA                                            0
#> missense_point_mutations EPHB3                                            0
#>                                         missense_point_mutations TET2
#> missense_point_mutations NRAS_Ex2_3                                 0
#> missense_point_mutations KRAS_Ex2_3                                 0
#> missense_point_mutations TET2                                       0
#> missense_point_mutations EZH2                                       0
#> missense_point_mutations CBL_Ex_8_9                                 0
#> missense_point_mutations IDH2_R140                                  0
#> missense_point_mutations SF3B1_Ex_12_15                             0
#> missense_point_mutations JARID_2_Ex1_18                             0
#> missense_point_mutations EED_Ex2_12                                 0
#> missense_point_mutations CEBPA                                      0
#> missense_point_mutations EPHB3                                      0
#>                                         missense_point_mutations EZH2
#> missense_point_mutations NRAS_Ex2_3                                 0
#> missense_point_mutations KRAS_Ex2_3                                 0
#> missense_point_mutations TET2                                       0
#> missense_point_mutations EZH2                                       0
#> missense_point_mutations CBL_Ex_8_9                                 0
#> missense_point_mutations IDH2_R140                                  0
#> missense_point_mutations SF3B1_Ex_12_15                             0
#> missense_point_mutations JARID_2_Ex1_18                             0
#> missense_point_mutations EED_Ex2_12                                 0
#> missense_point_mutations CEBPA                                      0
#> missense_point_mutations EPHB3                                      0
#>                                         missense_point_mutations CBL_Ex_8_9
#> missense_point_mutations NRAS_Ex2_3                                       0
#> missense_point_mutations KRAS_Ex2_3                                       0
#> missense_point_mutations TET2                                             0
#> missense_point_mutations EZH2                                             0
#> missense_point_mutations CBL_Ex_8_9                                       0
#> missense_point_mutations IDH2_R140                                        0
#> missense_point_mutations SF3B1_Ex_12_15                                   0
#> missense_point_mutations JARID_2_Ex1_18                                   0
#> missense_point_mutations EED_Ex2_12                                       0
#> missense_point_mutations CEBPA                                            0
#> missense_point_mutations EPHB3                                            0
#>                                         missense_point_mutations IDH2_R140
#> missense_point_mutations NRAS_Ex2_3                                      0
#> missense_point_mutations KRAS_Ex2_3                                      0
#> missense_point_mutations TET2                                            0
#> missense_point_mutations EZH2                                            0
#> missense_point_mutations CBL_Ex_8_9                                      0
#> missense_point_mutations IDH2_R140                                       0
#> missense_point_mutations SF3B1_Ex_12_15                                  0
#> missense_point_mutations JARID_2_Ex1_18                                  0
#> missense_point_mutations EED_Ex2_12                                      0
#> missense_point_mutations CEBPA                                           0
#> missense_point_mutations EPHB3                                           0
#>                                         missense_point_mutations SF3B1_Ex_12_15
#> missense_point_mutations NRAS_Ex2_3                                           0
#> missense_point_mutations KRAS_Ex2_3                                           0
#> missense_point_mutations TET2                                                 0
#> missense_point_mutations EZH2                                                 0
#> missense_point_mutations CBL_Ex_8_9                                           0
#> missense_point_mutations IDH2_R140                                            0
#> missense_point_mutations SF3B1_Ex_12_15                                       0
#> missense_point_mutations JARID_2_Ex1_18                                       0
#> missense_point_mutations EED_Ex2_12                                           0
#> missense_point_mutations CEBPA                                                0
#> missense_point_mutations EPHB3                                                0
#>                                         missense_point_mutations JARID_2_Ex1_18
#> missense_point_mutations NRAS_Ex2_3                                           1
#> missense_point_mutations KRAS_Ex2_3                                           0
#> missense_point_mutations TET2                                                 0
#> missense_point_mutations EZH2                                                 0
#> missense_point_mutations CBL_Ex_8_9                                           0
#> missense_point_mutations IDH2_R140                                            0
#> missense_point_mutations SF3B1_Ex_12_15                                       0
#> missense_point_mutations JARID_2_Ex1_18                                       0
#> missense_point_mutations EED_Ex2_12                                           0
#> missense_point_mutations CEBPA                                                0
#> missense_point_mutations EPHB3                                                0
#>                                         missense_point_mutations EED_Ex2_12
#> missense_point_mutations NRAS_Ex2_3                                       0
#> missense_point_mutations KRAS_Ex2_3                                       0
#> missense_point_mutations TET2                                             0
#> missense_point_mutations EZH2                                             0
#> missense_point_mutations CBL_Ex_8_9                                       0
#> missense_point_mutations IDH2_R140                                        0
#> missense_point_mutations SF3B1_Ex_12_15                                   0
#> missense_point_mutations JARID_2_Ex1_18                                   0
#> missense_point_mutations EED_Ex2_12                                       0
#> missense_point_mutations CEBPA                                            0
#> missense_point_mutations EPHB3                                            0
#>                                         missense_point_mutations CEBPA
#> missense_point_mutations NRAS_Ex2_3                                  0
#> missense_point_mutations KRAS_Ex2_3                                  0
#> missense_point_mutations TET2                                        0
#> missense_point_mutations EZH2                                        1
#> missense_point_mutations CBL_Ex_8_9                                  0
#> missense_point_mutations IDH2_R140                                   0
#> missense_point_mutations SF3B1_Ex_12_15                              0
#> missense_point_mutations JARID_2_Ex1_18                              0
#> missense_point_mutations EED_Ex2_12                                  0
#> missense_point_mutations CEBPA                                       0
#> missense_point_mutations EPHB3                                       0
#>                                         missense_point_mutations EPHB3
#> missense_point_mutations NRAS_Ex2_3                                  0
#> missense_point_mutations KRAS_Ex2_3                                  0
#> missense_point_mutations TET2                                        0
#> missense_point_mutations EZH2                                        0
#> missense_point_mutations CBL_Ex_8_9                                  0
#> missense_point_mutations IDH2_R140                                   0
#> missense_point_mutations SF3B1_Ex_12_15                              0
#> missense_point_mutations JARID_2_Ex1_18                              0
#> missense_point_mutations EED_Ex2_12                                  0
#> missense_point_mutations CEBPA                                       0
#> missense_point_mutations EPHB3                                       0