| plot_penalty | R Documentation | 
Plot the fit penalty as a barplot, for each one of a set of desired
driver events, where the bar represents the counts of each trajectory
in the data. This function allows also to filter out entries that have
been seen below a predetermined cutoff, and tests for significance in the
association A -> B via a one-sided Fisher 2x2 test adjusted for the number of
comparison (marginal count of B-ended trajectories). The tests are carried
out by function revolver:::enrichment_test_incoming_edge, which can
be used to obtain a tidy representation of the tests' results.
plot_penalty( x, drivers = x$variantIDs.driver, min.occurrences = 0, alpha_level = 0.05, drivers_palette = distinct_palette_many )
x | 
 A REVOLVER object with fits.  | 
drivers | 
 The list of drivers to use; by default all of them. If the
entry is a subset of the actual list of all drivers, all the entries in the
penalty data structure   | 
min.occurrences | 
 The penalty data structure will be filtered for
  | 
alpha_level | 
 The significance level for the enrichment Fisher test.  | 
drivers_palette | 
 A function that can return, for an input number, a number of colours.  | 
A ggplot object for this plot.
# Data released in the 'evoverse.datasets'
data('TRACERx_NEJM_2017_REVOLVER', package = 'evoverse.datasets')
 
plot_penalty(TRACERx_NEJM_2017_REVOLVER)
plot_penalty(TRACERx_NEJM_2017_REVOLVER, min.occurrences = 5)
plot_penalty(TRACERx_NEJM_2017_REVOLVER, min.occurrences = 5, alpha_level = 0.001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.