R Under development (unstable) (2024-02-16 r85931 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("PSCBS") PSCBS v0.67.0 successfully loaded. See ?PSCBS for help. > subplots <- R.utils::subplots > stext <- R.utils::stext > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Load SNP microarray data > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > data <- PSCBS::exampleData("paired.chr01") > str(data) 'data.frame': 73346 obs. of 6 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : int 1145994 2224111 2319424 2543484 2926730 2941694 3084986 3155127 3292731 3695086 ... $ CT : num 1.625 1.071 1.406 1.18 0.856 ... $ betaT : num 0.757 0.771 0.834 0.778 0.229 ... $ CN : num 2.36 2.13 2.59 1.93 1.71 ... $ betaN : num 0.827 0.875 0.887 0.884 0.103 ... > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Paired PSCBS segmentation > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Drop single-locus outliers > dataS <- dropSegmentationOutliers(data) > > # Run light-weight tests by default > if (Sys.getenv("_R_CHECK_FULL_") == "") { + # Use only every 5th data point + dataS <- dataS[seq(from=1, to=nrow(data), by=5),] + # Number of segments (for assertion) + nSegs <- 3L + # Number of bootstrap samples (see below) + B <- 100L + } else { + # Full tests + nSegs <- 12L + B <- 1000L + } > > str(dataS) 'data.frame': 14670 obs. of 6 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : int 1145994 2941694 3710825 4240737 4276892 4464544 4714611 5095111 5034491 5158416 ... $ CT : num 1.63 1.4 1.41 1.17 1.16 ... $ betaT : num 0.7574 0.169 0.2357 0.2604 0.0576 ... $ CN : num 2.36 2.13 2.26 2.01 2.32 ... $ betaN : num 0.8274 0.5072 0.1671 0.1609 0.0421 ... > > R.oo::attachLocally(dataS) > > > gaps <- findLargeGaps(dataS, minLength=2e6) > knownSegments <- gapsToSegments(gaps, dropGaps=TRUE) > > # Paired PSCBS segmentation > fit <- segmentByPairedPSCBS(dataS, knownSegments=knownSegments, + seed=0xBEEF, verbose=-10) Segmenting paired tumor-normal signals using Paired PSCBS... Calling genotypes from normal allele B fractions... num [1:14670] 0.8274 0.5072 0.1671 0.1609 0.0421 ... Called genotypes: num [1:14670] 1 0.5 0 0 0 0 1 0 1 0.5 ... - attr(*, "modelFit")=List of 1 ..$ :List of 7 .. ..$ flavor : chr "density" .. ..$ cn : int 2 .. ..$ nbrOfGenotypeGroups: int 3 .. ..$ tau : num [1:2] 0.315 0.677 .. ..$ n : int 14640 .. ..$ fit :Classes 'PeaksAndValleys' and 'data.frame': 5 obs. of 3 variables: .. .. ..$ type : chr [1:5] "peak" "valley" "peak" "valley" ... .. .. ..$ x : num [1:5] 0.104 0.315 0.499 0.677 0.885 .. .. ..$ density: num [1:5] 1.479 0.522 1.056 0.551 1.453 .. ..$ fitValleys :Classes 'PeaksAndValleys' and 'data.frame': 2 obs. of 3 variables: .. .. ..$ type : chr [1:2] "valley" "valley" .. .. ..$ x : num [1:2] 0.315 0.677 .. .. ..$ density: num [1:2] 0.522 0.551 ..- attr(*, "class")= chr [1:2] "NaiveGenotypeModelFit" "list" muN 0 0.5 1 5221 4198 5251 Calling genotypes from normal allele B fractions...done Normalizing betaT using betaN (TumorBoost)... Normalized BAFs: num [1:14670] 0.9301 0.1667 0.0685 0.0995 0.0155 ... - attr(*, "modelFit")=List of 5 ..$ method : chr "normalizeTumorBoost" ..$ flavor : chr "v4" ..$ delta : num [1:14670] -0.17264 0.00239 0.1671 0.16085 0.04213 ... .. ..- attr(*, "modelFit")=List of 1 .. .. ..$ :List of 7 .. .. .. ..$ flavor : chr "density" .. .. .. ..$ cn : int 2 .. .. .. ..$ nbrOfGenotypeGroups: int 3 .. .. .. ..$ tau : num [1:2] 0.315 0.677 .. .. .. ..$ n : int 14640 .. .. .. ..$ fit :Classes 'PeaksAndValleys' and 'data.frame': 5 obs. of 3 variables: .. .. .. .. ..$ type : chr [1:5] "peak" "valley" "peak" "valley" ... .. .. .. .. ..$ x : num [1:5] 0.104 0.315 0.499 0.677 0.885 .. .. .. .. ..$ density: num [1:5] 1.479 0.522 1.056 0.551 1.453 .. .. .. ..$ fitValleys :Classes 'PeaksAndValleys' and 'data.frame': 2 obs. of 3 variables: .. .. .. .. ..$ type : chr [1:2] "valley" "valley" .. .. .. .. ..$ x : num [1:2] 0.315 0.677 .. .. .. .. ..$ density: num [1:2] 0.522 0.551 .. .. ..- attr(*, "class")= chr [1:2] "NaiveGenotypeModelFit" "list" ..$ preserveScale: logi FALSE ..$ scaleFactor : num NA Normalizing betaT using betaN (TumorBoost)...done Setup up data... 'data.frame': 14670 obs. of 7 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 1145994 2941694 3710825 4240737 4276892 ... $ CT : num 1.63 1.4 1.41 1.17 1.16 ... $ betaT : num 0.7574 0.169 0.2357 0.2604 0.0576 ... $ betaTN : num 0.9301 0.1667 0.0685 0.0995 0.0155 ... ..- attr(*, "modelFit")=List of 5 .. ..$ method : chr "normalizeTumorBoost" .. ..$ flavor : chr "v4" .. ..$ delta : num [1:14670] -0.17264 0.00239 0.1671 0.16085 0.04213 ... .. .. ..- attr(*, "modelFit")=List of 1 .. .. .. ..$ :List of 7 .. .. .. .. ..$ flavor : chr "density" .. .. .. .. ..$ cn : int 2 .. .. .. .. ..$ nbrOfGenotypeGroups: int 3 .. .. .. .. ..$ tau : num [1:2] 0.315 0.677 .. .. .. .. ..$ n : int 14640 .. .. .. .. ..$ fit :Classes 'PeaksAndValleys' and 'data.frame': 5 obs. of 3 variables: .. .. .. .. .. ..$ type : chr [1:5] "peak" "valley" "peak" "valley" ... .. .. .. .. .. ..$ x : num [1:5] 0.104 0.315 0.499 0.677 0.885 .. .. .. .. .. ..$ density: num [1:5] 1.479 0.522 1.056 0.551 1.453 .. .. .. .. ..$ fitValleys :Classes 'PeaksAndValleys' and 'data.frame': 2 obs. of 3 variables: .. .. .. .. .. ..$ type : chr [1:2] "valley" "valley" .. .. .. .. .. ..$ x : num [1:2] 0.315 0.677 .. .. .. .. .. ..$ density: num [1:2] 0.522 0.551 .. .. .. ..- attr(*, "class")= chr [1:2] "NaiveGenotypeModelFit" "list" .. ..$ preserveScale: logi FALSE .. ..$ scaleFactor : num NA $ betaN : num 0.8274 0.5072 0.1671 0.1609 0.0421 ... $ muN : num 1 0.5 0 0 0 0 1 0 1 0.5 ... ..- attr(*, "modelFit")=List of 1 .. ..$ :List of 7 .. .. ..$ flavor : chr "density" .. .. ..$ cn : int 2 .. .. ..$ nbrOfGenotypeGroups: int 3 .. .. ..$ tau : num [1:2] 0.315 0.677 .. .. ..$ n : int 14640 .. .. ..$ fit :Classes 'PeaksAndValleys' and 'data.frame': 5 obs. of 3 variables: .. .. .. ..$ type : chr [1:5] "peak" "valley" "peak" "valley" ... .. .. .. ..$ x : num [1:5] 0.104 0.315 0.499 0.677 0.885 .. .. .. ..$ density: num [1:5] 1.479 0.522 1.056 0.551 1.453 .. .. ..$ fitValleys :Classes 'PeaksAndValleys' and 'data.frame': 2 obs. of 3 variables: .. .. .. ..$ type : chr [1:2] "valley" "valley" .. .. .. ..$ x : num [1:2] 0.315 0.677 .. .. .. ..$ density: num [1:2] 0.522 0.551 .. ..- attr(*, "class")= chr [1:2] "NaiveGenotypeModelFit" "list" Setup up data...done Dropping loci for which TCNs are missing... Number of loci dropped: 12 Dropping loci for which TCNs are missing...done Ordering data along genome... 'data.frame': 14658 obs. of 7 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 554484 730720 782343 878522 916294 ... $ CT : num 1.88 1.8 1.59 1.64 1.53 ... $ betaT : num 0.0646 0.1672 0.9284 0.113 0.7209 ... $ betaTN : num -0.0515 -0.1172 1.0194 0.031 0.8604 ... $ betaN : num 0.116 0.284 0.909 0.082 0.86 ... $ muN : num 0 0 1 0 1 1 1 0 1 0.5 ... Ordering data along genome...done Keeping only current chromosome for 'knownSegments'... Chromosome: 1 Known segments for this chromosome: chromosome start end length 1 1 -Inf 120908858 Inf 2 1 142693888 Inf Inf Keeping only current chromosome for 'knownSegments'...done alphaTCN: 0.009 alphaDH: 0.001 Number of loci: 14658 Calculating DHs... Number of SNPs: 14658 Number of heterozygous SNPs: 4196 (28.63%) Normalized DHs: num [1:14658] NA NA NA NA NA ... Calculating DHs...done Random seed temporarily set (seed=c(48879), kind="L'Ecuyer-CMRG") Produced 2 seeds from this stream for future usage Identification of change points by total copy numbers... Segmenting by CBS... Chromosome: 1 Segmenting multiple segments on current chromosome... Number of segments: 2 Random seed temporarily set (seed=c(10407, 1066287653, -51199871, 161854402, -1995183193, 1503453565, -747102133), kind="L'Ecuyer-CMRG") Produced 2 seeds from this stream for future usage Segmenting by CBS... Chromosome: 1 Random seed temporarily set (seed=c(10407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG") Segmenting by CBS...done Segmenting by CBS... Chromosome: 1 Random seed temporarily set (seed=c(10407, -821273412, -52578226, 1415511586, 721384351, -665928286, 1316562960), kind="L'Ecuyer-CMRG") Segmenting by CBS...done Segmenting multiple segments on current chromosome...done Segmenting by CBS...done List of 4 $ data :'data.frame': 14658 obs. of 4 variables: ..$ chromosome: int [1:14658] 1 1 1 1 1 1 1 1 1 1 ... ..$ x : num [1:14658] 554484 730720 782343 878522 916294 ... ..$ y : num [1:14658] 1.88 1.8 1.59 1.64 1.53 ... ..$ index : int [1:14658] 1 2 3 4 5 6 7 8 9 10 ... $ output :'data.frame': 3 obs. of 6 variables: ..$ sampleName: chr [1:3] NA NA NA ..$ chromosome: int [1:3] 1 1 1 ..$ start : num [1:3] 5.54e+05 1.43e+08 1.85e+08 ..$ end : num [1:3] 1.21e+08 1.85e+08 2.47e+08 ..$ nbrOfLoci : int [1:3] 7586 2681 4391 ..$ mean : num [1:3] 1.39 2.07 2.63 $ segRows:'data.frame': 3 obs. of 2 variables: ..$ startRow: int [1:3] 1 7587 10268 ..$ endRow : int [1:3] 7586 10267 14658 $ params :List of 5 ..$ alpha : num 0.009 ..$ undo : num 0 ..$ joinSegments : logi TRUE ..$ knownSegments:'data.frame': 2 obs. of 3 variables: .. ..$ chromosome: int [1:2] 1 1 .. ..$ start : num [1:2] -Inf 1.43e+08 .. ..$ end : num [1:2] 1.21e+08 Inf ..$ seed : int [1:7] 10407 1066287653 -51199871 161854402 -1995183193 1503453565 -747102133 - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS" - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.24 0 0.23 NA NA ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ... - attr(*, "pkgDetails")= chr "DNAcopy v1.76.0" - attr(*, "randomSeed")= int [1:7] 10407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019 Identification of change points by total copy numbers...done Restructure TCN segmentation results... chromosome tcnStart tcnEnd tcnNbrOfLoci tcnMean 1 1 554484 120908858 7586 1.3853 2 1 142693888 185449813 2681 2.0689 3 1 185449813 247137334 4391 2.6341 Number of TCN segments: 3 Restructure TCN segmentation results...done Total CN segment #1 ([ 554484,1.20909e+08]) of 3... Number of TCN loci in segment: 7586 Locus data for TCN segment: 'data.frame': 7586 obs. of 9 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 554484 730720 782343 878522 916294 ... $ CT : num 1.88 1.8 1.59 1.64 1.53 ... $ betaT : num 0.0646 0.1672 0.9284 0.113 0.7209 ... $ betaTN : num -0.0515 -0.1172 1.0194 0.031 0.8604 ... $ betaN : num 0.116 0.284 0.909 0.082 0.86 ... $ muN : num 0 0 1 0 1 1 1 0 1 0.5 ... $ index : int 1 2 3 4 5 6 7 8 9 10 ... $ rho : num NA NA NA NA NA ... Number of loci: 7586 Number of SNPs: 2108 (27.79%) Number of heterozygous SNPs: 2108 (100.00%) Chromosome: 1 Segmenting DH signals... Segmenting by CBS... Chromosome: 1 Random seed temporarily set (seed=c(10407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG") Segmenting by CBS...done List of 4 $ data :'data.frame': 7586 obs. of 4 variables: ..$ chromosome: int [1:7586] 1 1 1 1 1 1 1 1 1 1 ... ..$ x : num [1:7586] 554484 730720 782343 878522 916294 ... ..$ y : num [1:7586] NA NA NA NA NA ... ..$ index : int [1:7586] 1 2 3 4 5 6 7 8 9 10 ... $ output :'data.frame': 1 obs. of 6 variables: ..$ sampleName: chr NA ..$ chromosome: int 1 ..$ start : num 554484 ..$ end : num 1.21e+08 ..$ nbrOfLoci : int 2108 ..$ mean : num 0.512 $ segRows:'data.frame': 1 obs. of 2 variables: ..$ startRow: int 10 ..$ endRow : int 7574 $ params :List of 5 ..$ alpha : num 0.001 ..$ undo : num 0 ..$ joinSegments : logi TRUE ..$ knownSegments:'data.frame': 1 obs. of 3 variables: .. ..$ chromosome: int 1 .. ..$ start : num 554484 .. ..$ end : num 1.21e+08 ..$ seed : int [1:7] 10407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019 - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS" - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.07 0 0.08 NA NA ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ... - attr(*, "pkgDetails")= chr "DNAcopy v1.76.0" - attr(*, "randomSeed")= int [1:7] 10407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019 DH segmentation (locally-indexed) rows: startRow endRow 1 10 7574 int [1:7586] 1 2 3 4 5 6 7 8 9 10 ... DH segmentation rows: startRow endRow 1 10 7574 Segmenting DH signals...done DH segmentation table: dhStart dhEnd dhNbrOfLoci dhMean 1 554484 120908858 2108 0.5116 startRow endRow 1 10 7574 Rows: [1] 1 TCN segmentation rows: startRow endRow 1 1 7586 TCN and DH segmentation rows: startRow endRow 1 1 7586 startRow endRow 1 10 7574 NULL TCN segmentation (expanded) rows: startRow endRow 1 1 7586 TCN and DH segmentation rows: startRow endRow 1 1 7586 2 7587 10267 3 10268 14658 startRow endRow 1 10 7574 startRow endRow 1 1 7586 Total CN segmentation table (expanded): chromosome tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets 1 1 554484 120908858 7586 1.3853 2108 2108 (TCN,DH) segmentation for one total CN segment: tcnId dhId chromosome tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 120908858 7586 1.3853 2108 tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean 1 2108 554484 120908858 2108 0.5116 Total CN segment #1 ([ 554484,1.20909e+08]) of 3...done Total CN segment #2 ([1.42694e+08,1.8545e+08]) of 3... Number of TCN loci in segment: 2681 Locus data for TCN segment: 'data.frame': 2681 obs. of 9 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 1.43e+08 1.43e+08 1.43e+08 1.43e+08 1.44e+08 ... $ CT : num 2.27 1.55 1.47 1.5 1.81 ... $ betaT : num 0.34 0.55 0.048 0.813 0.575 ... $ betaTN : num 0.441 0.629 -0.05 0.958 0.872 ... $ betaN : num 0.3851 0.3933 0.0981 0.8552 0.7028 ... $ muN : num 0.5 0.5 0 1 1 1 1 0.5 1 1 ... $ index : int 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 ... $ rho : num 0.117 0.258 NA NA NA ... Number of loci: 2681 Number of SNPs: 777 (28.98%) Number of heterozygous SNPs: 777 (100.00%) Chromosome: 1 Segmenting DH signals... Segmenting by CBS... Chromosome: 1 Random seed temporarily set (seed=c(10407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG") Segmenting by CBS...done List of 4 $ data :'data.frame': 2681 obs. of 4 variables: ..$ chromosome: int [1:2681] 1 1 1 1 1 1 1 1 1 1 ... ..$ x : num [1:2681] 1.43e+08 1.43e+08 1.43e+08 1.43e+08 1.44e+08 ... ..$ y : num [1:2681] 0.117 0.258 NA NA NA ... ..$ index : int [1:2681] 1 2 3 4 5 6 7 8 9 10 ... $ output :'data.frame': 1 obs. of 6 variables: ..$ sampleName: chr NA ..$ chromosome: int 1 ..$ start : num 1.43e+08 ..$ end : num 1.85e+08 ..$ nbrOfLoci : int 777 ..$ mean : num 0.0973 $ segRows:'data.frame': 1 obs. of 2 variables: ..$ startRow: int 1 ..$ endRow : int 2677 $ params :List of 5 ..$ alpha : num 0.001 ..$ undo : num 0 ..$ joinSegments : logi TRUE ..$ knownSegments:'data.frame': 1 obs. of 3 variables: .. ..$ chromosome: int 1 .. ..$ start : num 1.43e+08 .. ..$ end : num 1.85e+08 ..$ seed : int [1:7] 10407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019 - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS" - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.02 0 0.02 NA NA ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ... - attr(*, "pkgDetails")= chr "DNAcopy v1.76.0" - attr(*, "randomSeed")= int [1:7] 10407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019 DH segmentation (locally-indexed) rows: startRow endRow 1 1 2677 int [1:2681] 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 ... DH segmentation rows: startRow endRow 1 7587 10263 Segmenting DH signals...done DH segmentation table: dhStart dhEnd dhNbrOfLoci dhMean 1 142693888 185449813 777 0.0973 startRow endRow 1 7587 10263 Rows: [1] 2 TCN segmentation rows: startRow endRow 2 7587 10267 TCN and DH segmentation rows: startRow endRow 2 7587 10267 startRow endRow 1 7587 10263 startRow endRow 1 1 7586 TCN segmentation (expanded) rows: startRow endRow 1 1 7586 2 7587 10267 TCN and DH segmentation rows: startRow endRow 1 1 7586 2 7587 10267 3 10268 14658 startRow endRow 1 10 7574 2 7587 10263 startRow endRow 1 1 7586 2 7587 10267 Total CN segmentation table (expanded): chromosome tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets 2 1 142693888 185449813 2681 2.0689 777 777 (TCN,DH) segmentation for one total CN segment: tcnId dhId chromosome tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 2 2 1 1 142693888 185449813 2681 2.0689 777 tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean 2 777 142693888 185449813 777 0.0973 Total CN segment #2 ([1.42694e+08,1.8545e+08]) of 3...done Total CN segment #3 ([1.8545e+08,2.47137e+08]) of 3... Number of TCN loci in segment: 4391 Locus data for TCN segment: 'data.frame': 4391 obs. of 9 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 1.85e+08 1.85e+08 1.85e+08 1.86e+08 1.86e+08 ... $ CT : num 2.93 2.15 2.82 2.93 2.46 ... $ betaT : num 0.0811 0.5154 0.9473 0.3734 0.7506 ... $ betaTN : num -0.169 0.609 1.028 0.525 0.968 ... $ betaN : num 0.25 0.38 0.919 0.34 0.783 ... $ muN : num 0 0.5 1 0.5 1 1 0 1 0 1 ... $ index : int 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ... $ rho : num NA 0.2186 NA 0.0503 NA ... Number of loci: 4391 Number of SNPs: 1311 (29.86%) Number of heterozygous SNPs: 1311 (100.00%) Chromosome: 1 Segmenting DH signals... Segmenting by CBS... Chromosome: 1 Random seed temporarily set (seed=c(10407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG") Segmenting by CBS...done List of 4 $ data :'data.frame': 4391 obs. of 4 variables: ..$ chromosome: int [1:4391] 1 1 1 1 1 1 1 1 1 1 ... ..$ x : num [1:4391] 1.85e+08 1.85e+08 1.85e+08 1.86e+08 1.86e+08 ... ..$ y : num [1:4391] NA 0.2186 NA 0.0503 NA ... ..$ index : int [1:4391] 1 2 3 4 5 6 7 8 9 10 ... $ output :'data.frame': 1 obs. of 6 variables: ..$ sampleName: chr NA ..$ chromosome: int 1 ..$ start : num 1.85e+08 ..$ end : num 2.47e+08 ..$ nbrOfLoci : int 1311 ..$ mean : num 0.23 $ segRows:'data.frame': 1 obs. of 2 variables: ..$ startRow: int 2 ..$ endRow : int 4388 $ params :List of 5 ..$ alpha : num 0.001 ..$ undo : num 0 ..$ joinSegments : logi TRUE ..$ knownSegments:'data.frame': 1 obs. of 3 variables: .. ..$ chromosome: int 1 .. ..$ start : num 1.85e+08 .. ..$ end : num 2.47e+08 ..$ seed : int [1:7] 10407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019 - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS" - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.03 0 0.03 NA NA ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ... - attr(*, "pkgDetails")= chr "DNAcopy v1.76.0" - attr(*, "randomSeed")= int [1:7] 10407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019 DH segmentation (locally-indexed) rows: startRow endRow 1 2 4388 int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ... DH segmentation rows: startRow endRow 1 10269 14655 Segmenting DH signals...done DH segmentation table: dhStart dhEnd dhNbrOfLoci dhMean 1 185449813 247137334 1311 0.2295 startRow endRow 1 10269 14655 Rows: [1] 3 TCN segmentation rows: startRow endRow 3 10268 14658 TCN and DH segmentation rows: startRow endRow 3 10268 14658 startRow endRow 1 10269 14655 startRow endRow 1 1 7586 2 7587 10267 TCN segmentation (expanded) rows: startRow endRow 1 1 7586 2 7587 10267 3 10268 14658 TCN and DH segmentation rows: startRow endRow 1 1 7586 2 7587 10267 3 10268 14658 startRow endRow 1 10 7574 2 7587 10263 3 10269 14655 startRow endRow 1 1 7586 2 7587 10267 3 10268 14658 Total CN segmentation table (expanded): chromosome tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets 3 1 185449813 247137334 4391 2.6341 1311 1311 (TCN,DH) segmentation for one total CN segment: tcnId dhId chromosome tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 3 3 1 1 185449813 247137334 4391 2.6341 1311 tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean 3 1311 185449813 247137334 1311 0.2295 Total CN segment #3 ([1.8545e+08,2.47137e+08]) of 3...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 120908858 7586 1.3853 2108 2 1 2 1 142693888 185449813 2681 2.0689 777 3 1 3 1 185449813 247137334 4391 2.6341 1311 tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean 1 2108 554484 120908858 2108 0.5116 2 777 142693888 185449813 777 0.0973 3 1311 185449813 247137334 1311 0.2295 Calculating (C1,C2) per segment... Calculating (C1,C2) per segment...done Number of segments: 3 Segmenting paired tumor-normal signals using Paired PSCBS...done Post-segmenting TCNs... Number of segments: 3 Number of chromosomes: 1 [1] 1 Chromosome 1 ('chr01') of 1... Rows: [1] 1 2 3 Number of segments: 3 TCN segment #1 ('1') of 3... Nothing todo. Only one DH segmentation. Skipping. TCN segment #1 ('1') of 3...done TCN segment #2 ('2') of 3... Nothing todo. Only one DH segmentation. Skipping. TCN segment #2 ('2') of 3...done TCN segment #3 ('3') of 3... Nothing todo. Only one DH segmentation. Skipping. TCN segment #3 ('3') of 3...done Chromosome 1 ('chr01') of 1...done Update (C1,C2) per segment... Update (C1,C2) per segment...done Post-segmenting TCNs...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 120908858 7586 1.3853 2108 2 1 2 1 142693888 185449813 2681 2.0689 777 3 1 3 1 185449813 247137334 4391 2.6341 1311 tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean c1Mean c2Mean 1 2108 554484 120908858 2108 0.5116 0.3382903 1.047010 2 777 142693888 185449813 777 0.0973 0.9337980 1.135102 3 1311 185449813 247137334 1311 0.2295 1.0147870 1.619313 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 120908858 7586 1.3853 2108 2 1 2 1 142693888 185449813 2681 2.0689 777 3 1 3 1 185449813 247137334 4391 2.6341 1311 tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean c1Mean c2Mean 1 2108 554484 120908858 2108 0.5116 0.3382903 1.047010 2 777 142693888 185449813 777 0.0973 0.9337980 1.135102 3 1311 185449813 247137334 1311 0.2295 1.0147870 1.619313 > print(fit) chromosome tcnId dhId start end tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 120908858 7586 1.3853 2108 2 1 2 1 142693888 185449813 2681 2.0689 777 3 1 3 1 185449813 247137334 4391 2.6341 1311 tcnNbrOfHets dhNbrOfLoci dhMean c1Mean c2Mean 1 2108 2108 0.5116 0.3382903 1.047010 2 777 777 0.0973 0.9337980 1.135102 3 1311 1311 0.2295 1.0147870 1.619313 > > fit1 <- fit > fit2 <- renameChromosomes(fit1, from=1, to=2) > fit <- c(fit1, fit2) > knownSegments <- tileChromosomes(fit)$params$knownSegments > > segList <- seqOfSegmentsByDP(fit, verbose=-10) Identifying optimal sets of segments via dynamic programming... Shifting TCN levels for every second segment... Split up into non-empty independent regions... Chromosome #1 ('1') of 2... Number of loci on chromosome: 14658 Known segments on chromosome: chromosome start end 1 1 -Inf 120908858 2 1 142693888 Inf Known segment #1 of 2... chromosome start end 1 1 -Inf 120908858 Known segment #1 of 2...done Known segment #2 of 2... chromosome start end 2 1 142693888 Inf Known segment #2 of 2...done Chromosome #1 ('1') of 2...done Chromosome #2 ('2') of 2... Number of loci on chromosome: 14658 Known segments on chromosome: chromosome start end 3 2 -Inf 120908858 4 2 142693888 Inf Known segment #1 of 2... chromosome start end 3 2 -Inf 120908858 Known segment #1 of 2...done Known segment #2 of 2... chromosome start end 4 2 142693888 Inf Known segment #2 of 2...done Chromosome #2 ('2') of 2...done Number of independent non-empty regions: 4 Split up into non-empty independent regions...done Shift every other region... Shift every other region...done Merge... Merge...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 120908858 7586 101.3853 2108 2 1 2 1 142693888 185449813 2681 2.0689 777 3 1 3 1 185449813 247137334 4391 2.6341 1311 4 2 1 1 554484 120908858 7586 101.3853 2108 5 2 2 1 142693888 185449813 2681 2.0689 777 6 2 3 1 185449813 247137334 4391 2.6341 1311 tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean c1Mean c2Mean 1 2108 554484 120908858 2108 0.511612 24.757671 76.627587 2 777 142693888 185449813 777 0.097300 0.933798 1.135102 3 1311 185449813 247137334 1311 0.229500 1.014787 1.619313 4 2108 554484 120908858 2108 0.511612 24.757671 76.627587 5 777 142693888 185449813 777 0.097300 0.933798 1.135102 6 1311 185449813 247137334 1311 0.229500 1.014787 1.619313 Shifting TCN levels for every second segment...done Extracting signals for dynamic programming... CT rho Min. : 0.805 Min. :0.000 1st Qu.: 2.407 1st Qu.:0.139 Median :100.927 Median :0.293 Mean : 53.638 Mean :0.347 3rd Qu.:101.370 3rd Qu.:0.557 Max. :103.080 Max. :1.022 NA's :20924 Extracting signals for dynamic programming...done Dynamic programming... Number of "DP" change points: 5 int [1:5] 7586 10267 14658 22244 24925 List of 4 $ jump :List of 5 ..$ : num 22244 ..$ : num [1:2] 7586 14658 ..$ : num [1:3] 7586 14658 22244 ..$ : num [1:4] 7586 10267 14658 22244 ..$ : num [1:5] 7586 10267 14658 22244 24925 $ rse : num [1:6] 71699116 47249179 35852530 5945 5410 ... $ kbest: num 4 $ V : num [1:6, 1:6] 1114 0 0 0 0 ... Dynamic programming...done Excluding cases where known segments no longer correct... Number of independent non-empty regions: 4 List of 3 $ : num [1:3] 7586 14658 22244 $ : num [1:4] 7586 10267 14658 22244 $ : num [1:5] 7586 10267 14658 22244 24925 Excluding cases where known segments no longer correct...done List of 3 $ :'data.frame': 4 obs. of 3 variables: ..$ chromosome: int [1:4] 1 1 2 2 ..$ start : num [1:4] 5.54e+05 1.43e+08 5.54e+05 1.43e+08 ..$ end : num [1:4] 1.21e+08 2.47e+08 1.21e+08 2.47e+08 $ :'data.frame': 5 obs. of 3 variables: ..$ chromosome: int [1:5] 1 1 1 2 2 ..$ start : num [1:5] 5.54e+05 1.43e+08 1.85e+08 5.54e+05 1.43e+08 ..$ end : num [1:5] 1.21e+08 1.85e+08 2.47e+08 1.21e+08 2.47e+08 $ :'data.frame': 6 obs. of 3 variables: ..$ chromosome: int [1:6] 1 1 1 2 2 2 ..$ start : num [1:6] 5.54e+05 1.43e+08 1.85e+08 5.54e+05 1.43e+08 ... ..$ end : num [1:6] 1.21e+08 1.85e+08 2.47e+08 1.21e+08 1.85e+08 ... Sequence of number of "DP" change points: [1] 3 4 5 Sequence of number of segments: [1] 4 5 6 Sequence of number of "discovered" change points: [1] 0 1 2 Identifying optimal sets of segments via dynamic programming...done > K <- length(segList) > ks <- seq(from=1, to=K, length.out=min(5,K)) > subplots(length(ks), ncol=1, byrow=TRUE) > par(mar=c(2,1,1,1)) > for (kk in ks) { + knownSegmentsKK <- segList[[kk]] + fitKK <- resegment(fit, knownSegments=knownSegmentsKK, undoTCN=+Inf, undoDH=+Inf) + plotTracks(fitKK, tracks="tcn,c1,c2", Clim=c(0,5), add=TRUE) + abline(v=c(knownSegments$start, knownSegments$end)/1e6, lty=3) + stext(side=3, pos=0, sprintf("Number of segments: %d", nrow(knownSegmentsKK))) + } # for (kk ...) > > proc.time() user system elapsed 3.46 0.20 4.12