Set all per-window CNV values to zero while keeping genomic coordinates and sample metadata intact. Useful for resetting CNV prior to recomputation.
removeCNV(qseaSet)A qseaSet with the CNV matrix zeroed (same dimensions as before).
This operation preserves regions (windows) and sample metadata; only the
per-window CNV values are replaced with zeros. Use this to “clear”
existing CNV calls before running addHMMcopyCNV() or other CNV
routines again.
data(exampleTumourNormal, package = "mesa")
# Zero out CNV and inspect the first rows
exampleTumourNormal %>%
removeCNV() %>%
getCNV() %>%
utils::head()
#> GRanges object with 6 ranges and 10 metadata columns:
#> seqnames ranges strand | Colon1_N Colon1_T Colon2_N Colon2_T
#> <Rle> <IRanges> <Rle> | <numeric> <numeric> <numeric> <numeric>
#> [1] 1 1-1000000 * | 0 0 0 0
#> [2] 1 1000001-2000000 * | 0 0 0 0
#> [3] 1 2000001-3000000 * | 0 0 0 0
#> [4] 1 3000001-4000000 * | 0 0 0 0
#> [5] 1 4000001-5000000 * | 0 0 0 0
#> [6] 1 5000001-6000000 * | 0 0 0 0
#> Lung1_N Lung1_T Lung2_N Lung2_T Lung3_N Lung3_T
#> <numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
#> [1] 0 0 0 0 0 0
#> [2] 0 0 0 0 0 0
#> [3] 0 0 0 0 0 0
#> [4] 0 0 0 0 0 0
#> [5] 0 0 0 0 0 0
#> [6] 0 0 0 0 0 0
#> -------
#> seqinfo: 22 sequences from an unspecified genome; no seqlengths