Given a cohort and a pathway, return the cohort with events restricted to genes involved in the pathway. This might contain a new 'pathway' genotype with an alteration mark if any of the involved genes are altered.
as.pathway(
x,
pathway.genes,
pathway.name,
pathway.color = "yellow",
aggregate.pathway = TRUE,
silent = FALSE
)
A TRONCO compliant dataset.
Gene (symbols) involved in the pathway.
Pathway name for visualization.
Pathway color for visualization.
If TRUE drop the events for the genes in the pathway.
A parameter to disable/enable verbose messages.
Extract the subset of events for genes which are part of a pathway.
data(test_dataset)
p = as.pathway(test_dataset, c('ASXL1', 'TET2'), 'test_pathway')
#> *** Extracting events for pathway: test_pathway .
#> *** Events selection: #events = 30 , #types = 5 Filters freq|in|out = { FALSE , TRUE , FALSE }
#> [filter.in] Genes hold: ASXL1, TET2 ... [ 2 / 2 found].
#> Selected 5 events, returning.
#> Pathway extracted succesfully.