Each event is identified through its id (variantID); with this function, you can remove a list of driver events, which consists in flagging them as FALSE in the is.Driver column of the data, and updating the information transfer. If you have fit the models or clustered the cohort, you should re-run the analyses after this modification; for this reason, any previous result from those analyses is cancelled from the returned object.

Notice also that some patients might be removed by this function, because if they have no longer drivers then they cannot be fit afterwards.

remove_drivers(x, variantID, check = TRUE)

Arguments

x

A REVOLVER cohort.

variantID

Id of the driver event to remove.

Value

A modified cohort where the required events are no longer annotated as drivers.

Examples

# Data released in the 'evoverse.datasets' data('TRACERx_NEJM_2017_REVOLVER', package = 'evoverse.datasets') print(TRACERx_NEJM_2017_REVOLVER)
#> [ REVOLVER - Repeated Evolution in Cancer ] #> #> Dataset : TRACERx NEJM 2017 #> Cohort : 99 patients, 450 variants and 79 driver events. #> #> Trees per patient : YES #> Fit via TL : YES #> REVOLVER clustering : YES #> Jackknife statistics : YES #> #> For summary statistics see `?Stats_*(x)` with * = {cohort, drivers, trees, fits, clusters, ...} #> #> ┌───────────────────────────────────────────────────────────────────────────────────────────┐ #> #> WARNING - Some patients have only one clone with drivers; they will just be expanded. #> #> └───────────────────────────────────────────────────────────────────────────────────────────┘ #> # A tibble: 54 x 7 #> patientID numBiopsies numMutations numDriverMutations numClonesWithDriver #> <chr> <int> <int> <int> <int> #> 1 CRUK0007 2 3 3 1 #> 2 CRUK0010 2 3 3 1 #> 3 CRUK0012 2 1 1 1 #> 4 CRUK0018 4 4 4 1 #> 5 CRUK0019 2 1 1 1 #> 6 CRUK0021 2 4 4 1 #> 7 CRUK0025 3 3 3 1 #> 8 CRUK0026 2 4 4 1 #> 9 CRUK0028 2 2 2 1 #> 10 CRUK0029 6 4 4 1 #> # … with 44 more rows, and 2 more variables: numTruncalMutations <int>, #> # numSubclonalMutations <int>
new_cohort = remove_drivers(TRACERx_NEJM_2017_REVOLVER, "MET")
#> ── Removing driver events ─────────────────────────────────────────────── MET ──
#> #> # A tibble: 1 x 7 #> variantID numClonal p_clonal numSubclonal p_subclonal N_tot p_tot #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 MET 3 0.0303 0 0 3 0.0303
#> Warning: CRUK0043 will have no drivers, and therefore will be removed.
#> Retained 98 patients after driver removal..
#> - The cohort has fits which will be cancelled, please re-compute the fits ...
#> - The cohort has clusters which will be cancelled, please re-compute the clusters ...
#> ┌───────────────────────────────────────────────────────────────────────────────────────────┐ #> #> WARNING - Some patients have only one clone with drivers; they will just be expanded. #> #> └───────────────────────────────────────────────────────────────────────────────────────────┘ #> # A tibble: 53 x 7 #> patientID numBiopsies numMutations numDriverMutations numClonesWithDriver #> <chr> <int> <int> <int> <int> #> 1 CRUK0007 2 3 3 1 #> 2 CRUK0010 2 3 3 1 #> 3 CRUK0012 2 1 1 1 #> 4 CRUK0018 4 4 4 1 #> 5 CRUK0019 2 1 1 1 #> 6 CRUK0021 2 4 4 1 #> 7 CRUK0025 3 3 3 1 #> 8 CRUK0026 2 4 4 1 #> 9 CRUK0028 2 2 2 1 #> 10 CRUK0029 6 4 4 1 #> # … with 43 more rows, and 2 more variables: numTruncalMutations <int>, #> # numSubclonalMutations <int>
print(new_cohort)
#> [ REVOLVER - Repeated Evolution in Cancer ] #> #> Dataset : TRACERx NEJM 2017 #> Cohort : 98 patients, 449 variants and 78 driver events. #> #> Trees per patient : YES #> Fit via TL : NO #> REVOLVER clustering : NO #> Jackknife statistics : YES #> #> For summary statistics see `?Stats_*(x)` with * = {cohort, drivers, trees, fits, clusters, ...} #> #> ┌───────────────────────────────────────────────────────────────────────────────────────────┐ #> #> WARNING - Some patients have only one clone with drivers; they will just be expanded. #> #> └───────────────────────────────────────────────────────────────────────────────────────────┘ #> # A tibble: 53 x 7 #> patientID numBiopsies numMutations numDriverMutations numClonesWithDriver #> <chr> <int> <int> <int> <int> #> 1 CRUK0007 2 3 3 1 #> 2 CRUK0010 2 3 3 1 #> 3 CRUK0012 2 1 1 1 #> 4 CRUK0018 4 4 4 1 #> 5 CRUK0019 2 1 1 1 #> 6 CRUK0021 2 4 4 1 #> 7 CRUK0025 3 3 3 1 #> 8 CRUK0026 2 4 4 1 #> 9 CRUK0028 2 2 2 1 #> 10 CRUK0029 6 4 4 1 #> # … with 43 more rows, and 2 more variables: numTruncalMutations <int>, #> # numSubclonalMutations <int>