
Rerun CNV Calling with User-Defined Purity and Size Factor or Diploid Region
Source:R/runRerun.R
RerunCNV.RdAllows users to rerun copy number variant (CNV) calling with custom purity and scale factor (size factor) values, or by specifying a diploid region for normalization.
Usage
RerunCNV(
seg,
input,
models,
call,
gender,
callcov = 0.3,
dicovsf = NULL,
purity = NULL,
chromosome = NULL,
start = NULL,
end = NULL,
mode = NULL,
out_file
)Arguments
- seg
Character. Path to the AI segment file (e.g.,
*_GATK_AI_segment.tsv).- input
Character. Path to the top likelihood row file (e.g.,
*_top_likelihood_calls.tsv).- models
Character. Path to the model likelihood file (e.g.,
*_Models_likelihood.tsv).- call
Character. Path to the final call file.
- gender
Character. Sample gender, either
"male"or"female".- callcov
Numeric. Subclonal events calling cutoff based on coverage.
- dicovsf
Numeric or character. Desired scale factor or range (e.g.,
0.9,"0.9:1.1"). Optional.- purity
Numeric or character. Desired purity or range (e.g.,
0.5,"0.5:0.7"). Optional.- chromosome
Character. Chromosome for diploid region (e.g.,
"1","X"). Optional.- start
Integer. Start position for diploid region. Optional.
- end
Integer. End position for diploid region. Optional.
- mode
Character. Rerun mode: either
"model"or"region".- out_file
Character. Output file path for the final calls.
Details
When mode = "region", chromosome must be set. If only chromosome and start are provided, the region spans from start to the end of the chromosome. If only chromosome and end are provided, the region spans from the start of the chromosome to end. If both start and end are given, the user-defined region is used.
When mode = "model", at least one of dicovsf or purity must be set. Both can be specified as single values or as ranges (e.g., "0.9:1.1").
This function enables re-calling of CNV segments using user-specified purity and/or size factor (SF), or by defining a diploid region for normalization. It supports both "model" and "region" rerun modes. The resulting calls are written to out_file.
Examples
if (FALSE) { # \dontrun{
# Rerun using a specific purity and size factor
RerunCNV(
seg = "sample_GATK_AI_segment.tsv",
input = "sample_top_likelihood_calls.tsv",
models = "sample_Models_likelihood.tsv",
call = "sample_final_call.tsv",
gender = "female",
dicovsf = "0.95:1.05",
purity = "0.6:0.8",
mode = "model",
out_file = "sample_final_call_refined.tsv"
)
# Rerun using a user-defined diploid region
RerunCNV(
seg = "sample_GATK_AI_segment.tsv",
input = "sample_top_likelihood_calls.tsv",
models = "sample_Models_likelihood.tsv",
call = "sample_final_call.tsv",
gender = "male",
chromosome = "3",
start = 1e6,
end = 5e7,
mode = "region",
out_file = "sample_final_call_refined.tsv"
)
} # }