Checks and sets required parameters for "model" or "region" mode in CNV calling, ensuring user input is sufficient and filling in missing values when possible.
Arguments
- mode
Character. Mode of operation; either
"model"or"region".- purity
Numeric or NULL. Tumor purity value or range (required for "model" mode if
dicovsfis not provided).- dicovsf
Numeric or NULL. Size factor (diploid coverage scale factor) or range (required for "model" mode if
purityis not provided).- chromosome
Character or NULL. Chromosome number for diploid region (required for "region" mode).
- start
Numeric or NULL. Start coordinate of the diploid region. If not set in "region" mode, the program will use the first nucleotide of the detectable region of the chromosome.
- end
Numeric or NULL. End coordinate of the diploid region. If not set in "region" mode, the program will use the last nucleotide of the detectable region of the chromosome.
- call
Data frame or tibble. Segment call data, required if estimating
dicovsfin "region" mode.
Details
In "model" mode, at least one of
purityordicovsfmust be provided.In "region" mode,
chromosomemust be provided; ifdicovsfis missing, it is estimated usingEstimateCovSF()with the specified region.
Examples
Checkmode("model", purity = 0.7, dicovsf = NULL, chromosome = NULL, start = NULL, end = NULL, call = call_df)
#> $mode
#> [1] "model"
#>
#> $dicovsf
#> NULL
#>
#> $purity
#> [1] 0.7
#>
Checkmode("region", purity = NULL, dicovsf = NULL, chromosome = "1", start = 100000, end = 200000, call = call_df)
#> Error: object 'call_df' not found
