Skip to contents

Selects the best model (mu, rho) combination based on total log-likelihood and distance to integer copy number, refines segment calls, and writes results to output files.

Usage

SelectFinalModel(
  results,
  top_likelihood_rows,
  groupinfo,
  prefix,
  gender,
  out_dir,
  model_source,
  seg,
  callcov,
  modelminAIsize,
  modelminprobes,
  minsf
)

Arguments

results

Data frame or tiblle. Likelihood results calculated by RunCallikelihood function.

top_likelihood_rows

Data frame or tibble. Top likelihood calls for each segment, including columns mu, rho, log_MAF_likelihood, major, minor, Tag, etc.

groupinfo

Data frame or tibble. Information for estimating minimum purity (see EstimateMinPurity).

prefix

Character. Output file prefix.

gender

Character. Sample gender ("male" or "female").

out_dir

Character. Output directory for saving results.

model_source

Character. Description of model source (e.g., "Coverage", "Coverage + MAF").

seg

Data frame or tibble. Segment information.

callcov

Numeric. Subclonal events calling cutoff based on coverage.

modelminAIsize

Numeric. Minimum segment size for model inclusion.

modelminprobes

Integer. Minimum number of probes for model inclusion.

minsf

Numeric. Minimum scale factor will be estimated. default is 0.4. range 0~0.4.

Value

A list with:

Final_model

The final selected model (see ClusterModels).

models

The full model table (before and after refinement).

refined_calls

The final calls of tier1 models.

Details

  • Refines calls and models through several selection and clustering steps.

  • Writes the model table and final calls to output files in the specified output directory.

Examples

# SelectFinalModel(top_likelihood_rows, groupinfo, prefix = "Sample1", gender = "female", out_dir = "results/",model_source = "Coverage + MAF", callcov = 0.3,modelminAIsize=5000000, modelminprobes= 20)