Fit clonal and subclonal components of the model to the residuals of the power-law model
Source:R/fit_subclones.R
, R/fit_subclones_binomial_BMix.R
, R/fit_subclones_binomial_CliP.R
, and 1 more
fit_subclones.Rd
Fit clonal and subclonal components of the model to the residuals of the power-law model
Usage
fit_subclones(
object,
N = 1:3,
powerlaw_model_name = active_models(object),
snvs_name = default_SNVs(object),
cnvs_name = default_CNVs(object),
method = "BMix",
upper_f_limit = 0.75,
clip_sif = NULL,
clip_input = file.path(tempdir(), "clip_input"),
clip_output = file.path(tempdir(), "clip_output"),
verbose = get_cevomod_verbosity()
)
fit_subclones_bmix(
object,
N = 1:3,
powerlaw_model_name = active_models(object),
snvs_name = default_SNVs(object),
upper_f_limit = 0.75,
verbose = get_cevomod_verbosity()
)
fit_subclones_clip(
object,
powerlaw_model_name = active_models(object),
snvs_name = default_SNVs(object),
cnvs_name = default_CNVs(object),
upper_f_limit = 0.75,
clip_sif = NULL,
clip_input = file.path(tempdir(), "clip_input"),
clip_output = file.path(tempdir(), "clip_output"),
verbose = get_cevomod_verbosity()
)
fit_subclones_mclust(
object,
N = 1:3,
powerlaw_model_name = active_models(object),
snvs_name = default_SNVs(object),
upper_f_limit = 0.75,
verbose = get_cevomod_verbosity()
)
Arguments
- object
cevodata object
- N
Vector of numbers of clones to for models
- powerlaw_model_name
Residual of which powerlaw model to use? powerlaw_fixed/powerlaw_optim
- snvs_name
Which snvs to to use?
- cnvs_name
Which cnvs to to use?
- method
Clustering method to use. Currently supported methods:
mclust - the fastest method, approximately 3-4 times faster than BMix, but uses a gaussian mixture modelling
BMix - is more accurate, considers subclones as binomial clusters, slightly slower
CliP - Clonal structure identification through penalizing pairwise differences
- upper_f_limit
ignore variants with f higher than
- clip_sif
Apptainer image file with CliP. If NULL, cevomod seeks for the CliP.sif file in the containers_dir (if set before) and in the current working directory. The container should be build with
build_clip_container()
.- clip_input
Path to store the CliP input files
- clip_output
Path to store the CliP output files
- verbose
Verbose?
Functions
fit_subclones()
: Provides a common interface for all other methods, runs the selected method and passes all the required arguments down.fit_subclones_bmix()
: Fit subclonal distributions to neutral model residuals using BMixfit_subclones_clip()
: Fit subclonal distributions to neutral model residuals using CliP - Clonal structure identification through penalizing pairwise differences (github). Requires that the Apptainer installed andthe path to the CliP.sif container image is provided,
or CliP.sif exists in the containers_dir (
set_containers_dir()
)or CliP.sif exists in the current working directory. The container should be build with
build_clip_container()
.
fit_subclones_mclust()
: Fit subclonal distributions to neutral model residuals using mclust
Examples
if (FALSE) {
# Using BMix
fit_subclones(test_data_fitted)
# or
fit_subclones_bmix(test_data_fitted)
# Using mclust
fit_subclones(test_data_fitted, method = "mclust")
# or
fit_subclones_mclust(test_data_fitted)
# Using CliP
set_containers_dir(selected_dir)
build_clip_container()
fit_subclones(test_data_fitted, method = "CliP")
# or
fit_subclones_clip(test_data_fitted)
}