correctIntegerCopyNumber {TitanCNA} | R Documentation

## Compute purity and ploidy corrected log ratios; recompute integer CN for high-level amplifications.

### Description

TitanCNA uses a finite state space that defines a maximum number of copies to model. High-level amplifications that exceed this defined maximum need to be corrected and reported as the likely copy number based on the observed data. `correctIntegerCN` performs two tasks: (1) correct log ratio based on purity and ploidy, and then convert to decimal CN value; (2) Correct bins (from `cn`) and segments (from `segs`) in which the original predicted integer copy number was assigned the maximum CN state; bins and segments for all of chromosome X are also corrected, if provided in the input.

### Usage

    correctIntegerCN(cn, segs, purity, ploidy, maxCNtoCorrect.autosomes = NULL,
    		maxCNtoCorrect.X = NULL, correctHOMD = TRUE, minPurityToCorrect = 0.2, gender = "male",
    		chrs = c(1:22, "X"))

### Arguments

`cn` | data.table object output from the function outputTitanResults
`segs` | data.table object output from the function outputTitanSegments
`purity` | Float type of the 1 minus the normal contamination estimate from TitanCNA
`ploidy` | Float type of the average tumor ploidy estimate from TitanCNA
`maxCNtoCorrect.autosomes` | Bins and segments in autosomes with this copy number value or higher will be corrected. If `NULL`, then it will use the original copy number value from the input data.
`maxCNtoCorrect.X` | Bins and segments in chromosome X, if provided, with this copy number value or higher will be corrected. If `NULL`, then it will use the original copy number value from the input data.
`minPurityToCorrect` | If `purity` is less than `minPurityToCorrect`, then `Corrected_Copy_Number` will retain the same copy number values as the input copy number.
`correctHOMD` | If `TRUE`, then will correct the copy number of homozygous deletion bins and segments based on purity and ploidy corrected log ratios.
`gender` | data.frame containing list of centromere regions. This should contain 3 columns: chr, start, and end. If this argument is used, then data at and flanking the centromeres will be removed.
`chrs` | Chromosomes to consider for copy number correction.

### Value

`cn`: `data.table` object that contains the same columns as the input object but also includes new columns `logR_Copy_Number`, `Corrected_Copy_Number`, `Corrected_Call`. `segs`: `data.table` object that contains the same columns as the input object but also includes new columns `logR_Copy_Number`, `Corrected_Copy_Number`, `Corrected_Call`, `Corrected_MajorCN`, `Corrected_MinorCN`. Column definitions:

`logR_Copy_Number` | Purity and ploidy corrected log ratios that have been converted to a decimal-based copy number value.
`Corrected_Copy_Number` | `round(logR_Copy_Number)`
`Corrected_Call` | String representation of `Corrected_Copy_Number`; `HLAMP`=high-level amplification is assigned to bins/segments that have been corrected.
`Corrected_MajorCN` | Purity and ploidy corrected integer (rounded) major copy number value.
`Corrected_MinorCN` | Purity and ploidy corrected integer (rounded) minor copy number value.

### Author(s)

Gavin Ha <gavinha@gmail.com>

### References

Ha, G., Roth, A., Khattra, J., Ho, J., Yap, D., Prentice, L. M., Melnyk, N., McPherson, A., Bashashati, A., Laks, E., Biele, J., Ding, J., Le, A., Rosner, J., Shumansky, K., Marra, M. A., Huntsman, D. G., McAlpine, J. N., Aparicio, S. A. J. R., and Shah, S. P. (2014). TITAN: Inference of copy number architectures in clonal cell populations from tumour whole genome sequence data. Genome Research, 24: 1881-1893. (PMID: 25060187)

### See Also

`outputTitanResults`, `outputTitanSegments`

### Examples

    data(EMresults)

    #### COMPUTE OPTIMAL STATE PATH USING VITERBI ####
    optimalPath <- viterbiClonalCN(data, convergeParams)

    #### FORMAT RESULTS ####
    results <- outputTitanResults(data, convergeParams, optimalPath,
                                  filename = NULL, posteriorProbs = FALSE,
                                  subcloneProfiles = TRUE, correctResults = TRUE,
                                  proportionThreshold = 0.05, recomputeLogLik = FALSE,
                                  proportionThresholdClonal = 0.05,
                                  is.haplotypeData = FALSE)
    ## use corrected parameters
    convergeParams <- results$convergeParam
    ## use corrected results
    results <- results$corrResults
    ## get normal contamination and ploidy estimates
    norm <- tail(convergeParams$n,1)
    ploidy <- tail(convergeParams$phi,1)

    #### OUTPUT SEGMENTS ####
    segs <- outputTitanSegments(results, id = "test", convergeParams,
      filename = NULL, igvfilename = NULL)
    corrIntCN.results <- correctIntegerCN(results, segs, 1 - norm, ploidy, maxCNtoCorrect.autosomes = NULL,
    		maxCNtoCorrect.X = NULL, correctHOMD = TRUE, minPurityToCorrect = 0.2, gender = "female", chrs = 2)

[Package TitanCNA version 1.25.0 Index]