R/revolver_check_cohort.R
revolver_check_cohort.RdPerform some basic diagnostic of a cohort object. It will inform of patients without drivers and other information that can be used to reshape the data before fitting a model.
revolver_check_cohort(x, stopOnError = FALSE)Nothing, all relevant information are print to screen
and the stop is raised only if stopOnError = TRUE.
Other Cohort creation:
CCF_parser(),
compute_clone_trees(),
compute_mutation_trees(),
input_custom_trees(),
revolver_cohort()
# Data released in the 'evoverse.datasets'
data('TRACERx_NEJM_2017_REVOLVER', package = 'evoverse.datasets')
revolver_check_cohort(TRACERx_NEJM_2017_REVOLVER)
#> ┌───────────────────────────────────────────────────────────────────────────────────────────┐
#> │ │
#> │ WARNING - Some patients have only one clone with drivers; they will just be expanded. │
#> │ │
#> └───────────────────────────────────────────────────────────────────────────────────────────┘
#> # A tibble: 54 × 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
#> # ℹ 44 more rows
#> # ℹ 2 more variables: numTruncalMutations <int>, numSubclonalMutations <int>
print(TRACERx_NEJM_2017_REVOLVER) # calls this anyway
#> [ 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 × 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
#> # ℹ 44 more rows
#> # ℹ 2 more variables: numTruncalMutations <int>, numSubclonalMutations <int>