Return all events involving certain genes and of a certain type in 'x', which should be a
TRONCO compliant dataset - see is.compliant
.
as.events(x, genes = NA, types = NA, keysToNames = FALSE)
A matrix with 2 columns (event type, gene name) for the events found.
data(test_dataset)
as.events(test_dataset)
#> type event
#> gene 4 "ins_del" "TET2"
#> gene 5 "ins_del" "EZH2"
#> gene 7 "ins_del" "ASXL1"
#> gene 29 "missense_point_mutations" "SETBP1"
#> gene 30 "missense_point_mutations" "NRAS_Ex2_3"
#> gene 31 "missense_point_mutations" "KRAS_Ex2_3"
#> gene 32 "missense_point_mutations" "TET2"
#> gene 33 "missense_point_mutations" "EZH2"
#> gene 34 "missense_point_mutations" "CBL_Ex_8_9"
#> gene 36 "missense_point_mutations" "IDH2_R140"
#> gene 40 "missense_point_mutations" "SF3B1_Ex_12_15"
#> gene 44 "missense_point_mutations" "JARID_2_Ex1_18"
#> gene 47 "missense_point_mutations" "EED_Ex2_12"
#> gene 49 "missense_point_mutations" "CEBPA"
#> gene 50 "missense_point_mutations" "EPHB3"
#> gene 51 "missense_point_mutations" "ETNK1"
#> gene 52 "missense_point_mutations" "GATA2"
#> gene 53 "missense_point_mutations" "IRAK4"
#> gene 54 "missense_point_mutations" "MTA2"
#> gene 55 "missense_point_mutations" "CSF3R"
#> gene 56 "missense_point_mutations" "KIT"
#> gene 66 "nonsense_ins_del" "WT1"
#> gene 69 "nonsense_ins_del" "RUNX_1"
#> gene 77 "nonsense_ins_del" "CEBPA"
#> gene 88 "nonsense_point_mutations" "TET2"
#> gene 89 "nonsense_point_mutations" "EZH2"
#> gene 91 "nonsense_point_mutations" "ASXL1"
#> gene 111 "nonsense_point_mutations" "CSF3R"
#> XOR_EZH2 "Pattern" "XOR_EZH2"
#> OR_CSF3R "Pattern" "OR_CSF3R"
as.events(test_dataset, types='ins_del')
#> type event
#> gene 4 "ins_del" "TET2"
#> gene 5 "ins_del" "EZH2"
#> gene 7 "ins_del" "ASXL1"
as.events(test_dataset, genes = 'TET2')
#> type event
#> gene 4 "ins_del" "TET2"
#> gene 32 "missense_point_mutations" "TET2"
#> gene 88 "nonsense_point_mutations" "TET2"
as.events(test_dataset, types='Missing')
#> type event