Each patient is identied through its id (patientID
);
with this function, you can remove patients, which consists in removing data
and trees. If you have fit the models or clustered the cohort,
you must 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 drivers might be removed by this function.
remove_patients(x, patientID, check = TRUE)
x | A REVOLVER cohort. |
---|---|
patientID | Id of the patient to remove. It can be a vector. |
A modified cohort without the required patients.
# 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_patients(TRACERx_NEJM_2017_REVOLVER, "CRUK0001")#>#>#> #> # A tibble: 1 x 7 #> variantID numClonal p_clonal numSubclonal p_subclonal N_tot p_tot #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 PASK 1 0.0102 0 0 1 0.0102#> ℹ Retained 98 patients after driver removal..#>#>#> ┌───────────────────────────────────────────────────────────────────────────────────────────┐ #> │ │ #> │ 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>#> [ 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: 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>#>#>#> #> # A tibble: 1 x 7 #> variantID numClonal p_clonal numSubclonal p_subclonal N_tot p_tot #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 IKZF1 0 0 1 0.0102 1 0.0102#> ℹ Retained 98 patients after driver removal..#>#>#> ┌───────────────────────────────────────────────────────────────────────────────────────────┐ #> │ │ #> │ WARNING - Some patients have only one clone with drivers; they will just be expanded. │ #> │ │ #> └───────────────────────────────────────────────────────────────────────────────────────────┘ #> # A tibble: 55 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 45 more rows, and 2 more variables: numTruncalMutations <int>, #> # numSubclonalMutations <int>#> [ 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: 55 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 45 more rows, and 2 more variables: numTruncalMutations <int>, #> # numSubclonalMutations <int>