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. > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # 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 ... > > # Non-paired / tumor-only data > data <- data[,c("chromosome", "x", "CT", "betaT")] > str(data) 'data.frame': 73346 obs. of 4 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 ... > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Paired PSCBS segmentation > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Drop single-locus outliers > dataS <- dropSegmentationOutliers(data) > > # Speed up example by segmenting fewer loci > dataS <- dataS[seq(from=1, to=nrow(data), by=20),] > > # Fake a second chromosome > dataT <- dataS > dataT$chromosome <- 2L > dataS <- rbind(dataS, dataT) > rm(dataT) > str(dataS) 'data.frame': 7336 obs. of 4 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : int 1145994 4276892 5034491 6266412 8418532 11211748 13928296 14370144 15014887 16589707 ... $ CT : num 1.63 1.16 1.35 1.39 1.55 ... $ betaT : num 0.7574 0.0576 0.8391 0.7917 0.8141 ... > > # Non-Paired PSCBS segmentation > fit <- segmentByNonPairedPSCBS(dataS, avgDH="median", seed=0xBEEF, verbose=-10) Segmenting non-paired tumor signals using Non-paired PSCBS... Number of loci: 7336 Number of SNPs: 7336 Calling "genotypes" from tumor allele B fractions... num [1:7336] 0.7574 0.0576 0.8391 0.7917 0.8141 ... Upper quantile: 0.475631667925522 Symmetric lower quantile: 0.290517384533512 (tauA, tauB) estimates: (%g,%g)0.2094826154664880.790517384533512 Homozygous treshholds: [1] 0.2094826 0.7905174 Inferred germline genotypes (via tumor): num [1:7336] 0.5 0 1 1 1 0 0 0 0.5 1 ... muNx 0 0.5 1 2230 2910 2196 Calling "genotypes" from tumor allele B fractions...done Segmenting non-paired tumor signals using Non-paired PSCBS...done Segment using Paired PSCBS... Segmenting paired tumor-normal signals using Paired PSCBS... Setup up data... 'data.frame': 7336 obs. of 6 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 1145994 4276892 5034491 6266412 8418532 ... $ CT : num 1.63 1.16 1.35 1.39 1.55 ... $ betaT : num 0.7574 0.0576 0.8391 0.7917 0.8141 ... $ betaTN : num 0.7574 0.0576 0.8391 0.7917 0.8141 ... $ muN : num 0.5 0 1 1 1 0 0 0 0.5 1 ... 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': 7324 obs. of 6 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... Ordering data along genome...done Segmenting multiple chromosomes... Number of chromosomes: 2 Random seed temporarily set (seed=c(48879), kind="L'Ecuyer-CMRG") Produced 2 seeds from this stream for future usage Chromosome #1 ('Chr01') of 2... 'data.frame': 3662 obs. of 7 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... $ index : int 1 2 3 4 5 6 7 8 9 10 ... Known segments: [1] chromosome start end <0 rows> (or 0-length row.names) Segmenting paired tumor-normal signals using Paired PSCBS... Setup up data... 'data.frame': 3662 obs. of 6 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... Setup up data...done Ordering data along genome... 'data.frame': 3662 obs. of 6 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... Ordering data along genome...done Keeping only current chromosome for 'knownSegments'... Chromosome: 1 Known segments for this chromosome: [1] chromosome start end <0 rows> (or 0-length row.names) Keeping only current chromosome for 'knownSegments'...done alphaTCN: 0.009 alphaDH: 0.001 Number of loci: 3662 Calculating DHs... Number of SNPs: 3662 Number of heterozygous SNPs: 1451 (39.62%) Normalized DHs: num [1:3662] NA 0.216 0.198 0.515 0.29 ... Calculating DHs...done 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 Identification of change points by total copy numbers... 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': 3662 obs. of 4 variables: ..$ chromosome: int [1:3662] 1 1 1 1 1 1 1 1 1 1 ... ..$ x : num [1:3662] 554484 1031563 1087198 1145994 1176365 ... ..$ y : num [1:3662] 1.88 1.64 1.77 1.63 1.59 ... ..$ index : int [1:3662] 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.44e+08 1.85e+08 ..$ end : num [1:3] 1.44e+08 1.85e+08 2.47e+08 ..$ nbrOfLoci : int [1:3] 1880 671 1111 ..$ mean : num [1:3] 1.39 2.09 2.65 $ segRows:'data.frame': 3 obs. of 2 variables: ..$ startRow: int [1:3] 1 1881 2552 ..$ endRow : int [1:3] 1880 2551 3662 $ params :List of 5 ..$ alpha : num 0.009 ..$ undo : num 0 ..$ joinSegments : logi TRUE ..$ knownSegments:'data.frame': 1 obs. of 3 variables: .. ..$ chromosome: int 1 .. ..$ start : num -Inf .. ..$ end : num Inf ..$ 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.13 0 0.12 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 143663981 1880 1.3916 2 1 143663981 185240536 671 2.0925 3 1 185240536 246679946 1111 2.6545 Number of TCN segments: 3 Restructure TCN segmentation results...done TCN-only segmentation... Total CN segment #1 ([ 554484,1.43664e+08]) of 3... Number of TCN loci in segment: 1880 Locus data for TCN segment: 'data.frame': 1880 obs. of 8 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... $ index : int 1 2 3 4 5 6 7 8 9 10 ... $ rho : num NA 0.216 0.198 0.515 0.29 ... Number of loci: 1880 Number of SNPs: 765 (40.69%) Number of heterozygous SNPs: 765 (100.00%) Total CN segment #1 ([ 554484,1.43664e+08]) of 3...done Total CN segment #2 ([1.43664e+08,1.85241e+08]) of 3... Number of TCN loci in segment: 671 Locus data for TCN segment: 'data.frame': 671 obs. of 8 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 1.44e+08 1.44e+08 1.44e+08 1.44e+08 1.44e+08 ... $ CT : num 2.26 2.1 2.1 1.89 1.97 ... $ betaT : num 0.958 0.19 0.909 0.13 0.141 ... $ betaTN : num 0.958 0.19 0.909 0.13 0.141 ... $ muN : num 1 0 1 0 0 0 0 0.5 0 1 ... $ index : int 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 ... $ rho : num NA NA NA NA NA ... Number of loci: 671 Number of SNPs: 272 (40.54%) Number of heterozygous SNPs: 272 (100.00%) Total CN segment #2 ([1.43664e+08,1.85241e+08]) of 3...done Total CN segment #3 ([1.85241e+08,2.4668e+08]) of 3... Number of TCN loci in segment: 1111 Locus data for TCN segment: 'data.frame': 1111 obs. of 8 variables: $ chromosome: int 1 1 1 1 1 1 1 1 1 1 ... $ x : num 1.85e+08 1.86e+08 1.86e+08 1.86e+08 1.86e+08 ... $ CT : num 2.44 3 2.32 2.76 2.48 ... $ betaT : num 0.0727 0.6845 0.2327 0.8118 0.0746 ... $ betaTN : num 0.0727 0.6845 0.2327 0.8118 0.0746 ... $ muN : num 0 0.5 0.5 1 0 1 0 1 1 0.5 ... $ index : int 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 ... $ rho : num NA 0.369 0.535 NA NA ... Number of loci: 1111 Number of SNPs: 414 (37.26%) Number of heterozygous SNPs: 414 (100.00%) Total CN segment #3 ([1.85241e+08,2.4668e+08]) of 3...done TCN-only segmentation...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.3916 765 2 1 2 1 143663981 185240536 671 2.0925 272 3 1 3 1 185240536 246679946 1111 2.6545 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean 1 765 765 554484 143663981 0.3979122 2 272 272 143663981 185240536 0.2306116 3 414 414 185240536 246679946 0.2798120 Calculating (C1,C2) per segment... Calculating (C1,C2) per segment...done Number of segments: 3 Segmenting paired tumor-normal signals using Paired PSCBS...done Updating mean level using different estimator... TCN estimator: mean DH estimator: median Updating mean level using different estimator...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 Chromosome #1 ('Chr01') of 2...done Chromosome #2 ('Chr02') of 2... 'data.frame': 3662 obs. of 7 variables: $ chromosome: int 2 2 2 2 2 2 2 2 2 2 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... $ index : int 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 ... Known segments: [1] chromosome start end <0 rows> (or 0-length row.names) Segmenting paired tumor-normal signals using Paired PSCBS... Setup up data... 'data.frame': 3662 obs. of 6 variables: $ chromosome: int 2 2 2 2 2 2 2 2 2 2 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... Setup up data...done Ordering data along genome... 'data.frame': 3662 obs. of 6 variables: $ chromosome: int 2 2 2 2 2 2 2 2 2 2 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... Ordering data along genome...done Keeping only current chromosome for 'knownSegments'... Chromosome: 2 Known segments for this chromosome: [1] chromosome start end <0 rows> (or 0-length row.names) Keeping only current chromosome for 'knownSegments'...done alphaTCN: 0.009 alphaDH: 0.001 Number of loci: 3662 Calculating DHs... Number of SNPs: 3662 Number of heterozygous SNPs: 1451 (39.62%) Normalized DHs: num [1:3662] NA 0.216 0.198 0.515 0.29 ... Calculating DHs...done Random seed temporarily set (seed=c(10407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), 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: 2 Random seed temporarily set (seed=c(10407, -821273412, -52578226, 1415511586, 721384351, -665928286, 1316562960), kind="L'Ecuyer-CMRG") Segmenting by CBS...done List of 4 $ data :'data.frame': 3662 obs. of 4 variables: ..$ chromosome: int [1:3662] 2 2 2 2 2 2 2 2 2 2 ... ..$ x : num [1:3662] 554484 1031563 1087198 1145994 1176365 ... ..$ y : num [1:3662] 1.88 1.64 1.77 1.63 1.59 ... ..$ index : int [1:3662] 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] 2 2 2 ..$ start : num [1:3] 5.54e+05 1.44e+08 1.85e+08 ..$ end : num [1:3] 1.44e+08 1.85e+08 2.47e+08 ..$ nbrOfLoci : int [1:3] 1880 671 1111 ..$ mean : num [1:3] 1.39 2.09 2.65 $ segRows:'data.frame': 3 obs. of 2 variables: ..$ startRow: int [1:3] 1 1881 2552 ..$ endRow : int [1:3] 1880 2551 3662 $ params :List of 5 ..$ alpha : num 0.009 ..$ undo : num 0 ..$ joinSegments : logi TRUE ..$ knownSegments:'data.frame': 1 obs. of 3 variables: .. ..$ chromosome: int 2 .. ..$ start : num -Inf .. ..$ end : num Inf ..$ seed : int [1:7] 10407 -821273412 -52578226 1415511586 721384351 -665928286 1316562960 - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS" - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.12 0 0.12 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 -821273412 -52578226 1415511586 721384351 -665928286 1316562960 Identification of change points by total copy numbers...done Restructure TCN segmentation results... chromosome tcnStart tcnEnd tcnNbrOfLoci tcnMean 1 2 554484 143663981 1880 1.3916 2 2 143663981 185240536 671 2.0925 3 2 185240536 246679946 1111 2.6545 Number of TCN segments: 3 Restructure TCN segmentation results...done TCN-only segmentation... Total CN segment #1 ([ 554484,1.43664e+08]) of 3... Number of TCN loci in segment: 1880 Locus data for TCN segment: 'data.frame': 1880 obs. of 8 variables: $ chromosome: int 2 2 2 2 2 2 2 2 2 2 ... $ x : num 554484 1031563 1087198 1145994 1176365 ... $ CT : num 1.88 1.64 1.77 1.63 1.59 ... $ betaT : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ betaTN : num 0.0646 0.6078 0.401 0.7574 0.645 ... $ muN : num 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... $ index : int 1 2 3 4 5 6 7 8 9 10 ... $ rho : num NA 0.216 0.198 0.515 0.29 ... Number of loci: 1880 Number of SNPs: 765 (40.69%) Number of heterozygous SNPs: 765 (100.00%) Total CN segment #1 ([ 554484,1.43664e+08]) of 3...done Total CN segment #2 ([1.43664e+08,1.85241e+08]) of 3... Number of TCN loci in segment: 671 Locus data for TCN segment: 'data.frame': 671 obs. of 8 variables: $ chromosome: int 2 2 2 2 2 2 2 2 2 2 ... $ x : num 1.44e+08 1.44e+08 1.44e+08 1.44e+08 1.44e+08 ... $ CT : num 2.26 2.1 2.1 1.89 1.97 ... $ betaT : num 0.958 0.19 0.909 0.13 0.141 ... $ betaTN : num 0.958 0.19 0.909 0.13 0.141 ... $ muN : num 1 0 1 0 0 0 0 0.5 0 1 ... $ index : int 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 ... $ rho : num NA NA NA NA NA ... Number of loci: 671 Number of SNPs: 272 (40.54%) Number of heterozygous SNPs: 272 (100.00%) Total CN segment #2 ([1.43664e+08,1.85241e+08]) of 3...done Total CN segment #3 ([1.85241e+08,2.4668e+08]) of 3... Number of TCN loci in segment: 1111 Locus data for TCN segment: 'data.frame': 1111 obs. of 8 variables: $ chromosome: int 2 2 2 2 2 2 2 2 2 2 ... $ x : num 1.85e+08 1.86e+08 1.86e+08 1.86e+08 1.86e+08 ... $ CT : num 2.44 3 2.32 2.76 2.48 ... $ betaT : num 0.0727 0.6845 0.2327 0.8118 0.0746 ... $ betaTN : num 0.0727 0.6845 0.2327 0.8118 0.0746 ... $ muN : num 0 0.5 0.5 1 0 1 0 1 1 0.5 ... $ index : int 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 ... $ rho : num NA 0.369 0.535 NA NA ... Number of loci: 1111 Number of SNPs: 414 (37.26%) Number of heterozygous SNPs: 414 (100.00%) Total CN segment #3 ([1.85241e+08,2.4668e+08]) of 3...done TCN-only segmentation...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 2 1 1 554484 143663981 1880 1.3916 765 2 2 2 1 143663981 185240536 671 2.0925 272 3 2 3 1 185240536 246679946 1111 2.6545 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean 1 765 765 554484 143663981 0.3979122 2 272 272 143663981 185240536 0.2306116 3 414 414 185240536 246679946 0.2798120 Calculating (C1,C2) per segment... Calculating (C1,C2) per segment...done Number of segments: 3 Segmenting paired tumor-normal signals using Paired PSCBS...done Updating mean level using different estimator... TCN estimator: mean DH estimator: median Updating mean level using different estimator...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 2 1 1 554484 143663981 1880 1.391608 765 2 2 2 1 143663981 185240536 671 2.092452 272 3 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 2 1 1 554484 143663981 1880 1.391608 765 2 2 2 1 143663981 185240536 671 2.092452 272 3 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 2 1 1 554484 143663981 1880 1.391608 765 2 2 2 1 143663981 185240536 671 2.092452 272 3 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 2 1 1 554484 143663981 1880 1.391608 765 2 2 2 1 143663981 185240536 671 2.092452 272 3 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 Chromosome #2 ('Chr02') of 2...done Merging (independently) segmented chromosome... List of 5 $ data :Classes 'PairedPSCNData' and 'data.frame': 7324 obs. of 7 variables: ..$ chromosome: int [1:7324] 1 1 1 1 1 1 1 1 1 1 ... ..$ x : num [1:7324] 554484 1031563 1087198 1145994 1176365 ... ..$ CT : num [1:7324] 1.88 1.64 1.77 1.63 1.59 ... ..$ betaT : num [1:7324] 0.0646 0.6078 0.401 0.7574 0.645 ... ..$ betaTN : num [1:7324] 0.0646 0.6078 0.401 0.7574 0.645 ... ..$ muN : num [1:7324] 0 0.5 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 ... ..$ rho : num [1:7324] NA 0.216 0.198 0.515 0.29 ... $ output :Classes 'PairedPSCNSegments' and 'data.frame': 7 obs. of 15 variables: ..$ chromosome : int [1:7] 1 1 1 NA 2 2 2 ..$ tcnId : int [1:7] 1 2 3 NA 1 2 3 ..$ dhId : int [1:7] 1 1 1 NA 1 1 1 ..$ tcnStart : num [1:7] 5.54e+05 1.44e+08 1.85e+08 NA 5.54e+05 ... ..$ tcnEnd : num [1:7] 1.44e+08 1.85e+08 2.47e+08 NA 1.44e+08 ... ..$ tcnNbrOfLoci: int [1:7] 1880 671 1111 NA 1880 671 1111 ..$ tcnMean : num [1:7] 1.39 2.09 2.65 NA 1.39 ... ..$ tcnNbrOfSNPs: int [1:7] 765 272 414 NA 765 272 414 ..$ tcnNbrOfHets: int [1:7] 765 272 414 NA 765 272 414 ..$ dhNbrOfLoci : int [1:7] 765 272 414 NA 765 272 414 ..$ dhStart : num [1:7] 5.54e+05 1.44e+08 1.85e+08 NA 5.54e+05 ... ..$ dhEnd : num [1:7] 1.44e+08 1.85e+08 2.47e+08 NA 1.44e+08 ... ..$ dhMean : num [1:7] 0.421 0.176 0.27 NA 0.421 ... ..$ c1Mean : num [1:7] 0.403 0.862 0.969 NA 0.403 ... ..$ c2Mean : num [1:7] 0.988 1.231 1.685 NA 0.988 ... $ tcnSegRows:'data.frame': 7 obs. of 2 variables: ..$ startRow: int [1:7] 1 1881 2552 NA 3663 5543 6214 ..$ endRow : int [1:7] 1880 2551 3662 NA 5542 6213 7324 $ dhSegRows :'data.frame': 7 obs. of 2 variables: ..$ startRow: int [1:7] 2 1888 2553 NA 3664 5550 6215 ..$ endRow : int [1:7] 1876 2548 3659 NA 5538 6210 7321 $ params :List of 8 ..$ alphaTCN : num 0.009 ..$ alphaDH : num 0.001 ..$ flavor : chr "tcn" ..$ tbn : logi FALSE ..$ joinSegments : logi TRUE ..$ knownSegments :'data.frame': 0 obs. of 3 variables: .. ..$ chromosome: int(0) .. ..$ start : int(0) .. ..$ end : int(0) ..$ seed : int [1:7] 10407 1066287653 -51199871 161854402 -1995183193 1503453565 -747102133 ..$ meanEstimators:List of 2 .. ..$ tcn: chr "mean" .. ..$ dh : chr "median" - attr(*, "class")= chr [1:3] "PairedPSCBS" "PSCBS" "AbstractCBS" Merging (independently) segmented chromosome...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 4 NA NA NA NA NA NA NA NA 5 2 1 1 554484 143663981 1880 1.391608 765 6 2 2 1 143663981 185240536 671 2.092452 272 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 4 NA NA NA NA NA NA NA 5 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 6 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 4 NA NA NA NA NA NA NA NA 5 2 1 1 554484 143663981 1880 1.391608 765 6 2 2 1 143663981 185240536 671 2.092452 272 7 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 4 NA NA NA NA NA NA NA 5 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 6 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 7 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 Segmenting multiple chromosomes...done Segmenting paired tumor-normal signals using Paired PSCBS...done Segment using Paired PSCBS...done Coercing to Non-Paired PSCBS results... Coercing to Non-Paired PSCBS results...done chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 4 NA NA NA NA NA NA NA NA 5 2 1 1 554484 143663981 1880 1.391608 765 6 2 2 1 143663981 185240536 671 2.092452 272 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 4 NA NA NA NA NA NA NA 5 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 6 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 4 NA NA NA NA NA NA NA NA 5 2 1 1 554484 143663981 1880 1.391608 765 6 2 2 1 143663981 185240536 671 2.092452 272 7 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 2 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 3 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 4 NA NA NA NA NA NA NA 5 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 6 272 272 143663981 185240536 0.1762428 0.8618360 1.2306156 7 414 414 185240536 246679946 0.2697420 0.9692395 1.6852728 > print(fit) chromosome tcnId dhId start end tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 4 NA NA NA NA NA NA NA NA 5 2 1 1 554484 143663981 1880 1.391608 765 6 2 2 1 143663981 185240536 671 2.092452 272 7 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhMean c1Mean c2Mean 1 765 765 0.4206323 0.4031263 0.9884817 2 272 272 0.1762428 0.8618360 1.2306156 3 414 414 0.2697420 0.9692395 1.6852728 4 NA NA NA NA NA 5 765 765 0.4206323 0.4031263 0.9884817 6 272 272 0.1762428 0.8618360 1.2306156 7 414 414 0.2697420 0.9692395 1.6852728 > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Bootstrap segment level estimates > # (used by the AB caller, which, if skipped here, > # will do it automatically) > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > fit <- bootstrapTCNandDHByRegion(fit, B=100, verbose=-10) Resample (TCN,DH) signals and re-estimate summaries for segment & changepoint... Already done? tcn_2.5% tcn_5% tcn_95% tcn_97.5% dh_2.5% dh_5% dh_95% dh_97.5% FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE c1_2.5% c1_5% c1_95% c1_97.5% c2_2.5% c2_5% c2_95% c2_97.5% FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE Bootstrapping (TCN,DH,C1,C2) segment mean levels... Identifying heterozygous & homozygous SNPs and non-polymorphic loci... Number of loci: 7324 Number of SNPs: 2902 Number of non-SNPs: 4422 Identifying heterozygous & homozygous SNPs and non-polymorphic loci...done num [1:7, 1:100, 1:4] NA NA NA NA NA NA NA NA NA NA ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : NULL ..$ : chr [1:4] "tcn" "dh" "c1" "c2" Segment #1 (chr 1, tcnId=1, dhId=1) of 7... chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 1 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 Number of TCNs: 1880 Number of DHs: 765 int [1:1880] 1 2 3 4 5 6 7 8 9 10 ... int [1:7324] 1 2 3 4 5 6 7 8 9 10 ... int [1:1880] 1 2 3 4 5 6 7 8 9 10 ... Identify loci used to bootstrap DH means... Heterozygous SNPs to resample for DH: int [1:765] 2 3 4 5 6 8 9 10 11 12 ... Identify loci used to bootstrap DH means...done Identify loci used to bootstrap TCN means... SNPs: int [1:765] 2 3 4 5 6 8 9 10 11 12 ... Non-polymorphic loci: int [1:1115] 1 7 15 28 30 32 34 35 36 37 ... Heterozygous SNPs to resample for TCN: int [1:765] 2 3 4 5 6 8 9 10 11 12 ... Homozygous SNPs to resample for TCN: int(0) Non-polymorphic loci to resample for TCN: int [1:1115] 1 7 15 28 30 32 34 35 36 37 ... Heterozygous SNPs with non-DH to resample for TCN: int(0) Loci to resample for TCN: int [1:1880] 1 2 3 4 5 6 7 8 9 10 ... Identify loci used to bootstrap TCN means...done Number of (#hets, #homs, #nonSNPs): (765,0,1115) Bootstrapping while preserving (#hets, #homs, #nonSNPs)... Number of bootstrap samples: 100 Bootstrapping while preserving (#hets, #homs, #nonSNPs)...done Segment #1 (chr 1, tcnId=1, dhId=1) of 7...done Segment #2 (chr 1, tcnId=2, dhId=1) of 7... chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 2 1 2 1 143663981 185240536 671 2.092452 272 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 2 272 272 143663981 185240536 0.1762428 0.861836 1.230616 Number of TCNs: 671 Number of DHs: 272 int [1:671] 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 ... int [1:7324] 1 2 3 4 5 6 7 8 9 10 ... int [1:671] 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 ... Identify loci used to bootstrap DH means... Heterozygous SNPs to resample for DH: int [1:272] 1888 1893 1894 1895 1896 1897 1901 1903 1907 1908 ... Identify loci used to bootstrap DH means...done Identify loci used to bootstrap TCN means... SNPs: int [1:272] 1888 1893 1894 1895 1896 1897 1901 1903 1907 1908 ... Non-polymorphic loci: int [1:399] 1881 1882 1883 1884 1885 1886 1887 1889 1890 1891 ... Heterozygous SNPs to resample for TCN: int [1:272] 1888 1893 1894 1895 1896 1897 1901 1903 1907 1908 ... Homozygous SNPs to resample for TCN: int(0) Non-polymorphic loci to resample for TCN: int [1:399] 1881 1882 1883 1884 1885 1886 1887 1889 1890 1891 ... Heterozygous SNPs with non-DH to resample for TCN: int(0) Loci to resample for TCN: int [1:671] 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 ... Identify loci used to bootstrap TCN means...done Number of (#hets, #homs, #nonSNPs): (272,0,399) Bootstrapping while preserving (#hets, #homs, #nonSNPs)... Number of bootstrap samples: 100 Bootstrapping while preserving (#hets, #homs, #nonSNPs)...done Segment #2 (chr 1, tcnId=2, dhId=1) of 7...done Segment #3 (chr 1, tcnId=3, dhId=1) of 7... chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 3 1 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 3 414 414 185240536 246679946 0.269742 0.9692395 1.685273 Number of TCNs: 1111 Number of DHs: 414 int [1:1111] 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 ... int [1:7324] 1 2 3 4 5 6 7 8 9 10 ... int [1:1111] 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 ... Identify loci used to bootstrap DH means... Heterozygous SNPs to resample for DH: int [1:414] 2553 2554 2561 2562 2563 2568 2569 2572 2573 2574 ... Identify loci used to bootstrap DH means...done Identify loci used to bootstrap TCN means... SNPs: int [1:414] 2553 2554 2561 2562 2563 2568 2569 2572 2573 2574 ... Non-polymorphic loci: int [1:697] 2552 2555 2556 2557 2558 2559 2560 2564 2565 2566 ... Heterozygous SNPs to resample for TCN: int [1:414] 2553 2554 2561 2562 2563 2568 2569 2572 2573 2574 ... Homozygous SNPs to resample for TCN: int(0) Non-polymorphic loci to resample for TCN: int [1:697] 2552 2555 2556 2557 2558 2559 2560 2564 2565 2566 ... Heterozygous SNPs with non-DH to resample for TCN: int(0) Loci to resample for TCN: int [1:1111] 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 ... Identify loci used to bootstrap TCN means...done Number of (#hets, #homs, #nonSNPs): (414,0,697) Bootstrapping while preserving (#hets, #homs, #nonSNPs)... Number of bootstrap samples: 100 Bootstrapping while preserving (#hets, #homs, #nonSNPs)...done Segment #3 (chr 1, tcnId=3, dhId=1) of 7...done Segment #5 (chr 2, tcnId=1, dhId=1) of 7... chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 5 2 1 1 554484 143663981 1880 1.391608 765 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 5 765 765 554484 143663981 0.4206323 0.4031263 0.9884817 Number of TCNs: 1880 Number of DHs: 765 int [1:1880] 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 ... int [1:7324] 1 2 3 4 5 6 7 8 9 10 ... int [1:1880] 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 ... Identify loci used to bootstrap DH means... Heterozygous SNPs to resample for DH: int [1:765] 3664 3665 3666 3667 3668 3670 3671 3672 3673 3674 ... Identify loci used to bootstrap DH means...done Identify loci used to bootstrap TCN means... SNPs: int [1:765] 3664 3665 3666 3667 3668 3670 3671 3672 3673 3674 ... Non-polymorphic loci: int [1:1115] 3663 3669 3677 3690 3692 3694 3696 3697 3698 3699 ... Heterozygous SNPs to resample for TCN: int [1:765] 3664 3665 3666 3667 3668 3670 3671 3672 3673 3674 ... Homozygous SNPs to resample for TCN: int(0) Non-polymorphic loci to resample for TCN: int [1:1115] 3663 3669 3677 3690 3692 3694 3696 3697 3698 3699 ... Heterozygous SNPs with non-DH to resample for TCN: int(0) Loci to resample for TCN: int [1:1880] 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 ... Identify loci used to bootstrap TCN means...done Number of (#hets, #homs, #nonSNPs): (765,0,1115) Bootstrapping while preserving (#hets, #homs, #nonSNPs)... Number of bootstrap samples: 100 Bootstrapping while preserving (#hets, #homs, #nonSNPs)...done Segment #5 (chr 2, tcnId=1, dhId=1) of 7...done Segment #6 (chr 2, tcnId=2, dhId=1) of 7... chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 6 2 2 1 143663981 185240536 671 2.092452 272 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 6 272 272 143663981 185240536 0.1762428 0.861836 1.230616 Number of TCNs: 671 Number of DHs: 272 int [1:671] 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 ... int [1:7324] 1 2 3 4 5 6 7 8 9 10 ... int [1:671] 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 ... Identify loci used to bootstrap DH means... Heterozygous SNPs to resample for DH: int [1:272] 5550 5555 5556 5557 5558 5559 5563 5565 5569 5570 ... Identify loci used to bootstrap DH means...done Identify loci used to bootstrap TCN means... SNPs: int [1:272] 5550 5555 5556 5557 5558 5559 5563 5565 5569 5570 ... Non-polymorphic loci: int [1:399] 5543 5544 5545 5546 5547 5548 5549 5551 5552 5553 ... Heterozygous SNPs to resample for TCN: int [1:272] 5550 5555 5556 5557 5558 5559 5563 5565 5569 5570 ... Homozygous SNPs to resample for TCN: int(0) Non-polymorphic loci to resample for TCN: int [1:399] 5543 5544 5545 5546 5547 5548 5549 5551 5552 5553 ... Heterozygous SNPs with non-DH to resample for TCN: int(0) Loci to resample for TCN: int [1:671] 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 ... Identify loci used to bootstrap TCN means...done Number of (#hets, #homs, #nonSNPs): (272,0,399) Bootstrapping while preserving (#hets, #homs, #nonSNPs)... Number of bootstrap samples: 100 Bootstrapping while preserving (#hets, #homs, #nonSNPs)...done Segment #6 (chr 2, tcnId=2, dhId=1) of 7...done Segment #7 (chr 2, tcnId=3, dhId=1) of 7... chromosome tcnId dhId tcnStart tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs 7 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhStart dhEnd dhMean c1Mean c2Mean 7 414 414 185240536 246679946 0.269742 0.9692395 1.685273 Number of TCNs: 1111 Number of DHs: 414 int [1:1111] 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 ... int [1:7324] 1 2 3 4 5 6 7 8 9 10 ... int [1:1111] 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 ... Identify loci used to bootstrap DH means... Heterozygous SNPs to resample for DH: int [1:414] 6215 6216 6223 6224 6225 6230 6231 6234 6235 6236 ... Identify loci used to bootstrap DH means...done Identify loci used to bootstrap TCN means... SNPs: int [1:414] 6215 6216 6223 6224 6225 6230 6231 6234 6235 6236 ... Non-polymorphic loci: int [1:697] 6214 6217 6218 6219 6220 6221 6222 6226 6227 6228 ... Heterozygous SNPs to resample for TCN: int [1:414] 6215 6216 6223 6224 6225 6230 6231 6234 6235 6236 ... Homozygous SNPs to resample for TCN: int(0) Non-polymorphic loci to resample for TCN: int [1:697] 6214 6217 6218 6219 6220 6221 6222 6226 6227 6228 ... Heterozygous SNPs with non-DH to resample for TCN: int(0) Loci to resample for TCN: int [1:1111] 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 ... Identify loci used to bootstrap TCN means...done Number of (#hets, #homs, #nonSNPs): (414,0,697) Bootstrapping while preserving (#hets, #homs, #nonSNPs)... Number of bootstrap samples: 100 Bootstrapping while preserving (#hets, #homs, #nonSNPs)...done Segment #7 (chr 2, tcnId=3, dhId=1) of 7...done Bootstrapped segment mean levels num [1:7, 1:100, 1:4] 1.4 2.09 2.64 NA 1.39 ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : NULL ..$ : chr [1:4] "tcn" "dh" "c1" "c2" Calculating (C1,C2) mean levels from (TCN,DH) mean levels... num [1:7, 1:100, 1:4] 1.4 2.09 2.64 NA 1.39 ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : NULL ..$ : chr [1:4] "tcn" "dh" "c1" "c2" Calculating (C1,C2) mean levels from (TCN,DH) mean levels...done Calculating polar (alpha,radius,manhattan) for change points... num [1:6, 1:100, 1:2] -0.448 -0.131 NA NA -0.477 ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : NULL ..$ : chr [1:2] "c1" "c2" Bootstrapped change points num [1:6, 1:100, 1:5] -2.65 -1.87 NA NA -2.72 ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : NULL ..$ : chr [1:5] "alpha" "radius" "manhattan" "d1" ... Calculating polar (alpha,radius,manhattan) for change points...done Bootstrapping (TCN,DH,C1,C2) segment mean levels...done Summarizing bootstrapped segment ('tcn', 'dh', 'c1', 'c2') data... num [1:7, 1:4, 1:4] NA NA NA NA NA NA NA NA NA NA ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : chr [1:4] "2.5%" "5%" "95%" "97.5%" ..$ : chr [1:4] "tcn" "dh" "c1" "c2" Field #1 ('tcn') of 4... Segment #1 of 7... Segment #1 of 7...done Segment #2 of 7... Segment #2 of 7...done Segment #3 of 7... Segment #3 of 7...done Segment #4 of 7... Segment #4 of 7...done Segment #5 of 7... Segment #5 of 7...done Segment #6 of 7... Segment #6 of 7...done Segment #7 of 7... Segment #7 of 7...done Field #1 ('tcn') of 4...done Field #2 ('dh') of 4... Segment #1 of 7... Segment #1 of 7...done Segment #2 of 7... Segment #2 of 7...done Segment #3 of 7... Segment #3 of 7...done Segment #4 of 7... Segment #4 of 7...done Segment #5 of 7... Segment #5 of 7...done Segment #6 of 7... Segment #6 of 7...done Segment #7 of 7... Segment #7 of 7...done Field #2 ('dh') of 4...done Field #3 ('c1') of 4... Segment #1 of 7... Segment #1 of 7...done Segment #2 of 7... Segment #2 of 7...done Segment #3 of 7... Segment #3 of 7...done Segment #4 of 7... Segment #4 of 7...done Segment #5 of 7... Segment #5 of 7...done Segment #6 of 7... Segment #6 of 7...done Segment #7 of 7... Segment #7 of 7...done Field #3 ('c1') of 4...done Field #4 ('c2') of 4... Segment #1 of 7... Segment #1 of 7...done Segment #2 of 7... Segment #2 of 7...done Segment #3 of 7... Segment #3 of 7...done Segment #4 of 7... Segment #4 of 7...done Segment #5 of 7... Segment #5 of 7...done Segment #6 of 7... Segment #6 of 7...done Segment #7 of 7... Segment #7 of 7...done Field #4 ('c2') of 4...done Bootstrap statistics num [1:7, 1:4, 1:4] 1.38 2.07 2.63 NA 1.38 ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : chr [1:4] "2.5%" "5%" "95%" "97.5%" ..$ : chr [1:4] "tcn" "dh" "c1" "c2" Statistical sanity checks (iff B >= 100)... Available summaries: 2.5%, 5%, 95%, 97.5% Available quantiles: 0.025, 0.05, 0.95, 0.975 num [1:7, 1:4, 1:4] 1.38 2.07 2.63 NA 1.38 ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : chr [1:4] "2.5%" "5%" "95%" "97.5%" ..$ : chr [1:4] "tcn" "dh" "c1" "c2" Field #1 ('tcn') of 4... Seg 1. mean=1.39161, range=[1.38025,1.40693], n=1880 Seg 2. mean=2.09245, range=[2.06856,2.1165], n=671 Seg 3. mean=2.65451, range=[2.62678,2.6834], n=1111 Seg 4. mean=NA, range=[NA,NA], n=NA Seg 5. mean=1.39161, range=[1.37999,1.40474], n=1880 Seg 6. mean=2.09245, range=[2.06923,2.11747], n=671 Seg 7. mean=2.65451, range=[2.62867,2.68639], n=1111 Field #1 ('tcn') of 4...done Field #2 ('dh') of 4... Seg 1. mean=0.420632, range=[0.406983,0.437756], n=765 Seg 2. mean=0.176243, range=[0.141232,0.202975], n=272 Seg 3. mean=0.269742, range=[0.245337,0.292784], n=414 Seg 4. mean=NA, range=[NA,NA], n=NA Seg 5. mean=0.420632, range=[0.406204,0.436189], n=765 Seg 6. mean=0.176243, range=[0.13696,0.212132], n=272 Seg 7. mean=0.269742, range=[0.230034,0.296763], n=414 Field #2 ('dh') of 4...done Field #3 ('c1') of 4... Seg 1. mean=0.403126, range=[0.391189,0.413437], n=765 Seg 2. mean=0.861836, range=[0.833296,0.900874], n=272 Seg 3. mean=0.969239, range=[0.937437,1.00659], n=414 Seg 4. mean=NA, range=[NA,NA], n=NA Seg 5. mean=0.403126, range=[0.392112,0.414529], n=765 Seg 6. mean=0.861836, range=[0.823193,0.907577], n=272 Seg 7. mean=0.969239, range=[0.931951,1.01968], n=414 Field #3 ('c1') of 4...done Field #4 ('c2') of 4... Seg 1. mean=0.988482, range=[0.974501,1.00244], n=765 Seg 2. mean=1.23062, range=[1.18964,1.26157], n=272 Seg 3. mean=1.68527, range=[1.6481,1.72497], n=414 Seg 4. mean=NA, range=[NA,NA], n=NA Seg 5. mean=0.988482, range=[0.9761,1.00076], n=765 Seg 6. mean=1.23062, range=[1.18936,1.26647], n=272 Seg 7. mean=1.68527, range=[1.63171,1.72526], n=414 Field #4 ('c2') of 4...done Statistical sanity checks (iff B >= 100)...done Summarizing bootstrapped segment ('tcn', 'dh', 'c1', 'c2') data...done Summarizing bootstrapped changepoint ('alpha', 'radius', 'manhattan', 'd1', 'd2') data... num [1:6, 1:4, 1:5] NA NA NA NA NA NA NA NA NA NA ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : chr [1:4] "2.5%" "5%" "95%" "97.5%" ..$ : chr [1:5] "alpha" "radius" "manhattan" "d1" ... Field #1 ('alpha') of 5... Changepoint #1 of 6... Changepoint #1 of 6...done Changepoint #2 of 6... Changepoint #2 of 6...done Changepoint #3 of 6... Changepoint #3 of 6...done Changepoint #4 of 6... Changepoint #4 of 6...done Changepoint #5 of 6... Changepoint #5 of 6...done Changepoint #6 of 6... Changepoint #6 of 6...done Field #1 ('alpha') of 5...done Field #2 ('radius') of 5... Changepoint #1 of 6... Changepoint #1 of 6...done Changepoint #2 of 6... Changepoint #2 of 6...done Changepoint #3 of 6... Changepoint #3 of 6...done Changepoint #4 of 6... Changepoint #4 of 6...done Changepoint #5 of 6... Changepoint #5 of 6...done Changepoint #6 of 6... Changepoint #6 of 6...done Field #2 ('radius') of 5...done Field #3 ('manhattan') of 5... Changepoint #1 of 6... Changepoint #1 of 6...done Changepoint #2 of 6... Changepoint #2 of 6...done Changepoint #3 of 6... Changepoint #3 of 6...done Changepoint #4 of 6... Changepoint #4 of 6...done Changepoint #5 of 6... Changepoint #5 of 6...done Changepoint #6 of 6... Changepoint #6 of 6...done Field #3 ('manhattan') of 5...done Field #4 ('d1') of 5... Changepoint #1 of 6... Changepoint #1 of 6...done Changepoint #2 of 6... Changepoint #2 of 6...done Changepoint #3 of 6... Changepoint #3 of 6...done Changepoint #4 of 6... Changepoint #4 of 6...done Changepoint #5 of 6... Changepoint #5 of 6...done Changepoint #6 of 6... Changepoint #6 of 6...done Field #4 ('d1') of 5...done Field #5 ('d2') of 5... Changepoint #1 of 6... Changepoint #1 of 6...done Changepoint #2 of 6... Changepoint #2 of 6...done Changepoint #3 of 6... Changepoint #3 of 6...done Changepoint #4 of 6... Changepoint #4 of 6...done Changepoint #5 of 6... Changepoint #5 of 6...done Changepoint #6 of 6... Changepoint #6 of 6...done Field #5 ('d2') of 5...done Bootstrap statistics num [1:6, 1:4, 1:5] -2.76 -1.91 NA NA -2.76 ... - attr(*, "dimnames")=List of 3 ..$ : NULL ..$ : chr [1:4] "2.5%" "5%" "95%" "97.5%" ..$ : chr [1:5] "alpha" "radius" "manhattan" "d1" ... Summarizing bootstrapped changepoint ('alpha', 'radius', 'manhattan', 'd1', 'd2') data...done Resample (TCN,DH) signals and re-estimate summaries for segment & changepoint...done > print(fit) chromosome tcnId dhId start end tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 4 NA NA NA NA NA NA NA NA 5 2 1 1 554484 143663981 1880 1.391608 765 6 2 2 1 143663981 185240536 671 2.092452 272 7 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhMean c1Mean c2Mean 1 765 765 0.4206323 0.4031263 0.9884817 2 272 272 0.1762428 0.8618360 1.2306156 3 414 414 0.2697420 0.9692395 1.6852728 4 NA NA NA NA NA 5 765 765 0.4206323 0.4031263 0.9884817 6 272 272 0.1762428 0.8618360 1.2306156 7 414 414 0.2697420 0.9692395 1.6852728 > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Calling segments in allelic balance (AB) > # NOTE: Ideally, this should be done on whole-genome data > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Explicitly estimate the threshold in DH for calling AB > # (which be done by default by the caller, if skipped here) > deltaAB <- estimateDeltaAB(fit, flavor="qq(DH)", verbose=-10) Estimating DH threshold for calling allelic imbalances... flavor: qq(DH) scale: 1 Estimating DH threshold for AB caller... quantile #1: 0.05 Symmetric quantile #2: 0.9 Number of segments: 6 Weighted 5% quantile of DH: 0.199618 Number of segments with small DH: 2 Number of data points: 1342 Number of finite data points: 544 Estimate of (1-0.9):th and 50% quantiles: (0.0289919,0.176243) Estimate of 0.9:th "symmetric" quantile: 0.323494 Estimating DH threshold for AB caller...done Estimated delta: 0.323 Estimating DH threshold for calling allelic imbalances...done > print(deltaAB) [1] 0.3234938 > > fit <- callAB(fit, delta=deltaAB, verbose=-10) Calling segments of allelic balance from one-sided DH bootstrap confidence intervals... delta (offset adjusting for bias in DH): 0.323493772175137 alpha (CI quantile; significance level): 0.05 Calling segments... Number of segments called allelic balance (AB): 4 (57.14%) of 7 Calling segments...done Calling segments of allelic balance from one-sided DH bootstrap confidence intervals...done > print(fit) chromosome tcnId dhId start end tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 4 NA NA NA NA NA NA NA NA 5 2 1 1 554484 143663981 1880 1.391608 765 6 2 2 1 143663981 185240536 671 2.092452 272 7 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhMean c1Mean c2Mean abCall 1 765 765 0.4206323 0.4031263 0.9884817 FALSE 2 272 272 0.1762428 0.8618360 1.2306156 TRUE 3 414 414 0.2697420 0.9692395 1.6852728 TRUE 4 NA NA NA NA NA NA 5 765 765 0.4206323 0.4031263 0.9884817 FALSE 6 272 272 0.1762428 0.8618360 1.2306156 TRUE 7 414 414 0.2697420 0.9692395 1.6852728 TRUE > > > # Even if not explicitly specified, the estimated > # threshold parameter is returned by the caller > stopifnot(fit$params$deltaAB == deltaAB) > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Calling segments in loss-of-heterozygosity (LOH) > # NOTE: Ideally, this should be done on whole-genome data > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Explicitly estimate the threshold in C1 for calling LOH > # (which be done by default by the caller, if skipped here) > deltaLOH <- estimateDeltaLOH(fit, flavor="minC1|nonAB", verbose=-10) Estimating DH threshold for calling LOH... flavor: minC1|nonAB Estimating DH threshold for calling LOH as the midpoint between guessed C1=0 and C1=1... Argument 'midpoint': 0.5 Number of segments: 6 Number of segments in allelic balance: 4 (66.7%) of 6 Number of segments not in allelic balance: 2 (33.3%) of 6 Number of segments in allelic balance and TCN <= 3.00: 4 (66.7%) of 6 C: 2.09, 2.65, 2.09, 2.65 Corrected C1 (=C/2): 1.05, 1.33, 1.05, 1.33 Number of DHs: 272, 414, 272, 414 Weights: 0.198, 0.302, 0.198, 0.302 Weighted median of (corrected) C1 in allelic balance: 1.274 Smallest C1 among segments not in allelic balance: 0.403 There are 2 segments with in total 765 heterozygous SNPs with this level. There are 2 segments with in total 765 heterozygous SNPs with this level. Midpoint between the two: 0.839 Estimating DH threshold for calling LOH as the midpoint between guessed C1=0 and C1=1...done delta: 0.839 Estimating DH threshold for calling LOH...done > print(deltaLOH) [1] 0.838563 > > fit <- callLOH(fit, delta=deltaLOH, verbose=-10) Calling segments of allelic balance from one-sided DH bootstrap confidence intervals... delta (offset adjusting for bias in C1): 0.838562992888546 alpha (CI quantile; significance level): 0.05 Calling segments... Number of segments called low C1 (LowC1, "LOH_C1"): 3 (42.86%) of 7 Calling segments...done Calling segments of allelic balance from one-sided DH bootstrap confidence intervals...done > print(fit) chromosome tcnId dhId start end tcnNbrOfLoci tcnMean tcnNbrOfSNPs 1 1 1 1 554484 143663981 1880 1.391608 765 2 1 2 1 143663981 185240536 671 2.092452 272 3 1 3 1 185240536 246679946 1111 2.654512 414 4 NA NA NA NA NA NA NA NA 5 2 1 1 554484 143663981 1880 1.391608 765 6 2 2 1 143663981 185240536 671 2.092452 272 7 2 3 1 185240536 246679946 1111 2.654512 414 tcnNbrOfHets dhNbrOfLoci dhMean c1Mean c2Mean abCall lohCall 1 765 765 0.4206323 0.4031263 0.9884817 FALSE TRUE 2 272 272 0.1762428 0.8618360 1.2306156 TRUE NA 3 414 414 0.2697420 0.9692395 1.6852728 TRUE FALSE 4 NA NA NA NA NA NA NA 5 765 765 0.4206323 0.4031263 0.9884817 FALSE TRUE 6 272 272 0.1762428 0.8618360 1.2306156 TRUE FALSE 7 414 414 0.2697420 0.9692395 1.6852728 TRUE FALSE > plotTracks(fit) > > # Even if not explicitly specified, the estimated > # threshold parameter is returned by the caller > stopifnot(fit$params$deltaLOH == deltaLOH) > > proc.time() user system elapsed 1.85 0.12 2.42