Running ‘PairedPSCBS,boot.R’ [3s/5s]
  Running ‘findLargeGaps.R’ [1s/1s]
  Running ‘randomSeed.R’ [1s/1s]
  Running ‘segmentByCBS,calls.R’ [0s/1s]
  Running ‘segmentByCBS,futures.R’ [3s/5s]
  Running ‘segmentByCBS,median.R’ [2s/3s]
  Running ‘segmentByCBS,prune.R’ [2s/2s]
  Running ‘segmentByCBS,report.R’ [0s/1s]
  Running ‘segmentByCBS,shiftTCN.R’ [9s/12s]
  Running ‘segmentByCBS,weights.R’ [3s/5s]
  Running ‘segmentByCBS.R’ [3s/4s]
  Running ‘segmentByNonPairedPSCBS,medianDH.R’ [3s/4s]
  Running ‘segmentByPairedPSCBS,DH.R’ [3s/5s]
  Running ‘segmentByPairedPSCBS,calls.R’ [4s/6s]
  Running ‘segmentByPairedPSCBS,futures.R’ [12s/16s]
  Running ‘segmentByPairedPSCBS,noNormalBAFs.R’ [3s/4s]
  Running ‘segmentByPairedPSCBS,report.R’ [0s/1s]
  Running ‘segmentByPairedPSCBS,seqOfSegmentsByDP.R’ [6s/8s]
  Running ‘segmentByPairedPSCBS.R’ [7s/9s]
Running the tests in ‘tests/segmentByNonPairedPSCBS,medianDH.R’ failed.
Complete output:
  > library("PSCBS")
  PSCBS v0.64.0 successfully loaded. See ?PSCBS for help.
  
  Attaching package: 'PSCBS'
  
  The following objects are masked from 'package:base':
  
      append, load
  
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # 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(407, 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(407, 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] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
         - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
         - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.077 0 0.09 0 0
          ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
         - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
         - attr(*, "randomSeed")= int [1:7] 407 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(407, 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(407, -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] 407 -821273412 -52578226 1415511586 721384351 -665928286 1316562960
         - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
         - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.082 0 0.162 0 0
          ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
         - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
         - attr(*, "randomSeed")= int [1:7] 407 -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] 407 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.07 2.65 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.07 2.65 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.427 -0.119 NA NA -0.45 ...
      - attr(*, "dimnames")=List of 3
       ..$ : NULL
       ..$ : NULL
       ..$ : chr [1:2] "c1" "c2"
     Bootstrapped change points
      num [1:6, 1:100, 1:5] -2.62 -1.82 NA NA -2.62 ...
      - 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.06 2.62 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.06 2.62 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.38127,1.40494], n=1880
      Seg   2. mean=2.09245, range=[2.06383,2.11582], n=671
      Seg   3. mean=2.65451, range=[2.62203,2.6795], n=1111
      Seg   4. mean=NA, range=[NA,NA], n=NA
      Seg   5. mean=1.39161, range=[1.37909,1.40089], n=1880
      Seg   6. mean=2.09245, range=[2.06867,2.12195], n=671
      Seg   7. mean=2.65451, range=[2.63572,2.68241], n=1111
     Field #1 ('tcn') of 4...done
     Field #2 ('dh') of 4...
      Seg   1. mean=0.420632, range=[0.406691,0.436798], n=765
      Seg   2. mean=0.176243, range=[0.142919,0.202799], n=272
      Seg   3. mean=0.269742, range=[0.230241,0.293649], n=414
      Seg   4. mean=NA, range=[NA,NA], n=NA
      Seg   5. mean=0.420632, range=[0.407269,0.441289], n=765
      Seg   6. mean=0.176243, range=[0.137567,0.211402], n=272
      Seg   7. mean=0.269742, range=[0.227549,0.294811], n=414
     Field #2 ('dh') of 4...done
     Field #3 ('c1') of 4...
      Seg   1. mean=0.403126, range=[0.391429,0.412889], n=765
      Seg   2. mean=0.861836, range=[0.830162,0.895059], n=272
      Seg   3. mean=0.969239, range=[0.936018,1.02], n=414
      Seg   4. mean=NA, range=[NA,NA], n=NA
      Seg   5. mean=0.403126, range=[0.389266,0.411318], n=765
      Seg   6. mean=0.861836, range=[0.82819,0.901001], n=272
      Seg   7. mean=0.969239, range=[0.93086,1.02365], n=414
     Field #3 ('c1') of 4...done
     Field #4 ('c2') of 4...
      Seg   1. mean=0.988482, range=[0.975973,1.00233], n=765
      Seg   2. mean=1.23062, range=[1.19627,1.25826], n=272
      Seg   3. mean=1.68527, range=[1.62572,1.71961], n=414
      Seg   4. mean=NA, range=[NA,NA], n=NA
      Seg   5. mean=0.988482, range=[0.974797,1.00243], n=765
      Seg   6. mean=1.23062, range=[1.18867,1.27237], n=272
      Seg   7. mean=1.68527, range=[1.63178,1.7235], 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.74 -1.95 NA NA -2.77 ...
     - 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
  Error in loadNamespace(name) : there is no package called 'Hmisc'
  Calls: estimateDeltaAB ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
   Estimating DH threshold for AB caller...done
  Estimating DH threshold for calling allelic imbalances...done
  Execution halted
Running the tests in ‘tests/segmentByPairedPSCBS,DH.R’ failed.
Complete output:
  > library("PSCBS")
  PSCBS v0.64.0 successfully loaded. See ?PSCBS for help.
  
  Attaching package: 'PSCBS'
  
  The following objects are masked from 'package:base':
  
      append, load
  
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # 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 ...
  > 
  > # Drop single-locus outliers
  > dataS <- dropSegmentationOutliers(data)
  > 
  > # Run light-weight tests
  > # 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
  > 
  > 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)
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Calculate DH
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > muN <- aroma.light::callNaiveGenotypes(betaN, censorAt=c(0,1))
  > # SNPs are identifies as those loci that have non-missing 'betaT' & 'muN'
  > isSnp <- (!is.na(betaT) & !is.na(muN))
  > isHet <- isSnp & (muN == 1/2)
  > rho <- rep(NA_real_, length=length(muN))
  > rho[isHet] <- 2*abs(betaT[isHet]-1/2)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Paired PSCBS segmentation using TCN and DH only
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > fit <- segmentByPairedPSCBS(CT, rho=rho,
  +                             chromosome=chromosome, x=x,
  +                             seed=0xBEEF, verbose=-10)
  Segmenting paired tumor-normal signals using Paired PSCBS...
   Setup up data...
    'data.frame':	14670 obs. of  4 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 ...
     $ rho       : num  NA 0.662 NA NA NA ...
   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  4 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 ...
     $ rho       : num  NA NA NA NA NA ...
   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: 14658
   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
      Random seed temporarily set (seed=c(407, 1066287653, -51199871, 161854402, -1995183193, 1503453565, -747102133), kind="L'Ecuyer-CMRG")
    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.44e+08 1.85e+08
      ..$ end       : num [1:3] 1.44e+08 1.85e+08 2.47e+08
      ..$ nbrOfLoci : int [1:3] 7599 2668 4391
      ..$ mean      : num [1:3] 1.39 2.07 2.63
     $ segRows:'data.frame':	3 obs. of  2 variables:
      ..$ startRow: int [1:3] 1 7600 10268
      ..$ endRow  : int [1:3] 7599 10267 14658
     $ 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] 407 1066287653 -51199871 161854402 -1995183193 1503453565 -747102133
     - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
     - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.465 0 0.496 0 0
      ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
     - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
     - attr(*, "randomSeed")= int [1:7] 407 1066287653 -51199871 161854402 -1995183193 1503453565 -747102133
   Identification of change points by total copy numbers...done
   Restructure TCN segmentation results...
      chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean
    1          1    554484 143926517         7599  1.3859
    2          1 143926517 185449813         2668  2.0704
    3          1 185449813 247137334         4391  2.6341
    Number of TCN segments: 3
   Restructure TCN segmentation results...done
   Total CN segment #1 ([    554484,1.43927e+08]) of 3...
    Number of TCN loci in segment: 7599
    Locus data for TCN segment:
    'data.frame':	7599 obs. of  5 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 ...
     $ rho       : num  NA NA NA NA NA ...
     $ index     : int  1 2 3 4 5 6 7 8 9 10 ...
    Number of loci: 7599
    Number of SNPs: 2111 (27.78%)
    Number of heterozygous SNPs: 2111 (100.00%)
    Chromosome: 1
    Segmenting DH signals...
     Segmenting by CBS...
      Chromosome: 1
       Random seed temporarily set (seed=c(407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG")
     Segmenting by CBS...done
     List of 4
      $ data   :'data.frame':	7599 obs. of  4 variables:
       ..$ chromosome: int [1:7599] 1 1 1 1 1 1 1 1 1 1 ...
       ..$ x         : num [1:7599] 554484 730720 782343 878522 916294 ...
       ..$ y         : num [1:7599] NA NA NA NA NA ...
       ..$ index     : int [1:7599] 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.44e+08
       ..$ nbrOfLoci : int 2111
       ..$ mean      : num 0.524
      $ segRows:'data.frame':	1 obs. of  2 variables:
       ..$ startRow: int 10
       ..$ endRow  : int 7594
      $ 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.44e+08
       ..$ seed         : int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.034 0 0.034 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
     DH segmentation (locally-indexed) rows:
       startRow endRow
     1       10   7594
      int [1:7599] 1 2 3 4 5 6 7 8 9 10 ...
     DH segmentation rows:
       startRow endRow
     1       10   7594
    Segmenting DH signals...done
    DH segmentation table:
      dhStart     dhEnd dhNbrOfLoci dhMean
    1  554484 143926517        2111 0.5237
      startRow endRow
    1       10   7594
    Rows:
    [1] 1
    TCN segmentation rows:
      startRow endRow
    1        1   7599
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7599
      startRow endRow
    1       10   7594
    NULL
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7599
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    3    10268  14658
      startRow endRow
    1       10   7594
      startRow endRow
    1        1   7599
    Total CN segmentation table (expanded):
      chromosome tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets
    1          1   554484 143926517         7599  1.3859         2111         2111
    (TCN,DH) segmentation for one total CN segment:
      tcnId dhId chromosome tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
    1     1    1          1   554484 143926517         7599  1.3859         2111
      tcnNbrOfHets dhStart     dhEnd dhNbrOfLoci dhMean
    1         2111  554484 143926517        2111 0.5237
   Total CN segment #1 ([    554484,1.43927e+08]) of 3...done
   Total CN segment #2 ([1.43927e+08,1.8545e+08]) of 3...
    Number of TCN loci in segment: 2668
    Locus data for TCN segment:
    'data.frame':	2668 obs. of  5 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.1 2.1 2.09 1.8 2.34 ...
     $ rho       : num  NA NA NA NA NA NA NA NA NA NA ...
     $ index     : int  7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
    Number of loci: 2668
    Number of SNPs: 774 (29.01%)
    Number of heterozygous SNPs: 774 (100.00%)
    Chromosome: 1
    Segmenting DH signals...
     Segmenting by CBS...
      Chromosome: 1
       Random seed temporarily set (seed=c(407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG")
     Segmenting by CBS...done
     List of 4
      $ data   :'data.frame':	2668 obs. of  4 variables:
       ..$ chromosome: int [1:2668] 1 1 1 1 1 1 1 1 1 1 ...
       ..$ x         : num [1:2668] 1.44e+08 1.44e+08 1.44e+08 1.44e+08 1.44e+08 ...
       ..$ y         : num [1:2668] NA NA NA NA NA NA NA NA NA NA ...
       ..$ index     : int [1:2668] 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.44e+08
       ..$ end       : num 1.85e+08
       ..$ nbrOfLoci : int 774
       ..$ mean      : num 0.154
      $ segRows:'data.frame':	1 obs. of  2 variables:
       ..$ startRow: int 15
       ..$ endRow  : int 2664
      $ 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.44e+08
       .. ..$ end       : num 1.85e+08
       ..$ seed         : int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.012 0 0.012 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
     DH segmentation (locally-indexed) rows:
       startRow endRow
     1       15   2664
      int [1:2668] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
     DH segmentation rows:
       startRow endRow
     1     7614  10263
    Segmenting DH signals...done
    DH segmentation table:
        dhStart     dhEnd dhNbrOfLoci dhMean
    1 143926517 185449813         774 0.1542
      startRow endRow
    1     7614  10263
    Rows:
    [1] 2
    TCN segmentation rows:
      startRow endRow
    2     7600  10267
    TCN and DH segmentation rows:
      startRow endRow
    2     7600  10267
      startRow endRow
    1     7614  10263
      startRow endRow
    1        1   7599
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    3    10268  14658
      startRow endRow
    1       10   7594
    2     7614  10263
      startRow endRow
    1        1   7599
    2     7600  10267
    Total CN segmentation table (expanded):
      chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets
    2          1 143926517 185449813         2668  2.0704          774          774
    (TCN,DH) segmentation for one total CN segment:
      tcnId dhId chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
    2     2    1          1 143926517 185449813         2668  2.0704          774
      tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean
    2          774 143926517 185449813         774 0.1542
   Total CN segment #2 ([1.43927e+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  5 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 ...
     $ rho       : num  NA 0.0308 NA 0.2533 NA ...
     $ index     : int  10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
    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(407, 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.0308 NA 0.2533 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.251
      $ 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] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.026 0 0.042 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 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.2512
      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   7599
    2     7600  10267
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    3    10268  14658
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    3    10268  14658
      startRow endRow
    1       10   7594
    2     7614  10263
    3    10269  14655
      startRow endRow
    1        1   7599
    2     7600  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.2512
   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 143926517         7599  1.3859         2111
   2          1     2    1 143926517 185449813         2668  2.0704          774
   3          1     3    1 185449813 247137334         4391  2.6341         1311
     tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean
   1         2111    554484 143926517        2111 0.5237
   2          774 143926517 185449813         774 0.1542
   3         1311 185449813 247137334        1311 0.2512
   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 143926517         7599  1.3859         2111
  2          1     2    1 143926517 185449813         2668  2.0704          774
  3          1     3    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2111    554484 143926517        2111 0.5237 0.3300521 1.055848
  2          774 143926517 185449813         774 0.1542 0.8755722 1.194828
  3         1311 185449813 247137334        1311 0.2512 0.9862070 1.647893
    chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
  1          1     1    1    554484 143926517         7599  1.3859         2111
  2          1     2    1 143926517 185449813         2668  2.0704          774
  3          1     3    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2111    554484 143926517        2111 0.5237 0.3300521 1.055848
  2          774 143926517 185449813         774 0.1542 0.8755722 1.194828
  3         1311 185449813 247137334        1311 0.2512 0.9862070 1.647893
  > print(fit)
    chromosome tcnId dhId     start       end tcnNbrOfLoci tcnMean tcnNbrOfSNPs
  1          1     1    1    554484 143926517         7599  1.3859         2111
  2          1     2    1 143926517 185449813         2668  2.0704          774
  3          1     3    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2111        2111 0.5237 0.3300521 1.055848
  2          774         774 0.1542 0.8755722 1.194828
  3         1311        1311 0.2512 0.9862070 1.647893
  > 
  > # Plot results
  > plotTracks(fit)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Bootstrap segment level estimates
  > # (used by the AB caller, which, if skipped here,
  > #  will do it automatically)
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > fit <- bootstrapTCNandDHByRegion(fit, B=B, 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: 14658
     Number of SNPs: 4196
     Number of non-SNPs: 10462
    Identifying heterozygous & homozygous SNPs and non-polymorphic loci...done
     num [1:3, 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 3...
       chromosome tcnId dhId tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     1          1     1    1   554484 143926517         7599  1.3859         2111
       tcnNbrOfHets dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
     1         2111  554484 143926517        2111 0.5237 0.3300521 1.055848
     Number of TCNs: 7599
     Number of DHs: 2111
      int [1:7599] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:7599] 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:2111] 10 12 24 28 31 33 34 39 46 48 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:2111] 10 12 24 28 31 33 34 39 46 48 ...
      Non-polymorphic loci:
       int [1:5488] 1 2 3 4 5 6 7 8 9 11 ...
      Heterozygous SNPs to resample for TCN:
       int [1:2111] 10 12 24 28 31 33 34 39 46 48 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:5488] 1 2 3 4 5 6 7 8 9 11 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:7599] 1 2 3 4 5 6 7 8 9 10 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (2111,0,5488)
     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 3...done
    Segment #2 (chr 1, tcnId=2, dhId=1) of 3...
       chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     2          1     2    1 143926517 185449813         2668  2.0704          774
       tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
     2          774 143926517 185449813         774 0.1542 0.8755722 1.194828
     Number of TCNs: 2668
     Number of DHs: 774
      int [1:2668] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:2668] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
     Identify loci used to bootstrap DH means...
      Heterozygous SNPs to resample for DH:
       int [1:774] 7614 7616 7626 7627 7628 7635 7638 7639 7640 7642 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:774] 7614 7616 7626 7627 7628 7635 7638 7639 7640 7642 ...
      Non-polymorphic loci:
       int [1:1894] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
      Heterozygous SNPs to resample for TCN:
       int [1:774] 7614 7616 7626 7627 7628 7635 7638 7639 7640 7642 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:1894] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:2668] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (774,0,1894)
     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 3...done
    Segment #3 (chr 1, tcnId=3, dhId=1) of 3...
       chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     3          1     3    1 185449813 247137334         4391  2.6341         1311
       tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean   c1Mean   c2Mean
     3         1311 185449813 247137334        1311 0.2512 0.986207 1.647893
     Number of TCNs: 4391
     Number of DHs: 1311
      int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
     Identify loci used to bootstrap DH means...
      Heterozygous SNPs to resample for DH:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
      Non-polymorphic loci:
       int [1:3080] 10268 10270 10272 10273 10274 10275 10276 10277 10278 10279 ...
      Heterozygous SNPs to resample for TCN:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:3080] 10268 10270 10272 10273 10274 10275 10276 10277 10278 10279 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (1311,0,3080)
     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 3...done
    Bootstrapped segment mean levels
     num [1:3, 1:100, 1:4] 1.38 2.07 2.63 1.38 2.06 ...
     - 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:3, 1:100, 1:4] 1.38 2.07 2.63 1.38 2.06 ...
      - 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:2, 1:100, 1:2] -0.54 -0.106 -0.54 -0.119 -0.553 ...
      - attr(*, "dimnames")=List of 3
       ..$ : NULL
       ..$ : NULL
       ..$ : chr [1:2] "c1" "c2"
     Bootstrapped change points
      num [1:2, 1:100, 1:5] -2.88 -1.8 -2.89 -1.83 -2.9 ...
      - 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:3, 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 3...
     Segment #1 of 3...done
     Segment #2 of 3...
     Segment #2 of 3...done
     Segment #3 of 3...
     Segment #3 of 3...done
    Field #1 ('tcn') of 4...done
    Field #2 ('dh') of 4...
     Segment #1 of 3...
     Segment #1 of 3...done
     Segment #2 of 3...
     Segment #2 of 3...done
     Segment #3 of 3...
     Segment #3 of 3...done
    Field #2 ('dh') of 4...done
    Field #3 ('c1') of 4...
     Segment #1 of 3...
     Segment #1 of 3...done
     Segment #2 of 3...
     Segment #2 of 3...done
     Segment #3 of 3...
     Segment #3 of 3...done
    Field #3 ('c1') of 4...done
    Field #4 ('c2') of 4...
     Segment #1 of 3...
     Segment #1 of 3...done
     Segment #2 of 3...
     Segment #2 of 3...done
     Segment #3 of 3...
     Segment #3 of 3...done
    Field #4 ('c2') of 4...done
    Bootstrap statistics
     num [1:3, 1:4, 1:4] 1.38 2.06 2.62 1.38 2.06 ...
     - 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:3, 1:4, 1:4] 1.38 2.06 2.62 1.38 2.06 ...
      - 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.3859, range=[1.37917,1.39124], n=7599
      Seg   2. mean=2.0704, range=[2.05574,2.08428], n=2668
      Seg   3. mean=2.6341, range=[2.6216,2.64601], n=4391
     Field #1 ('tcn') of 4...done
     Field #2 ('dh') of 4...
      Seg   1. mean=0.5237, range=[0.514387,0.531077], n=2111
      Seg   2. mean=0.1542, range=[0.144465,0.164479], n=774
      Seg   3. mean=0.2512, range=[0.244212,0.261573], n=1311
     Field #2 ('dh') of 4...done
     Field #3 ('c1') of 4...
      Seg   1. mean=0.330052, range=[0.324561,0.336795], n=2111
      Seg   2. mean=0.875572, range=[0.863929,0.88549], n=774
      Seg   3. mean=0.986207, range=[0.972325,0.995507], n=1311
     Field #3 ('c1') of 4...done
     Field #4 ('c2') of 4...
      Seg   1. mean=1.05585, range=[1.04886,1.0611], n=2111
      Seg   2. mean=1.19483, range=[1.18254,1.2065], n=774
      Seg   3. mean=1.64789, range=[1.63377,1.66467], n=1311
     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:2, 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 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #1 ('alpha') of 5...done
    Field #2 ('radius') of 5...
     Changepoint #1 of 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #2 ('radius') of 5...done
    Field #3 ('manhattan') of 5...
     Changepoint #1 of 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #3 ('manhattan') of 5...done
    Field #4 ('d1') of 5...
     Changepoint #1 of 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #4 ('d1') of 5...done
    Field #5 ('d2') of 5...
     Changepoint #1 of 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #5 ('d2') of 5...done
    Bootstrap statistics
     num [1:2, 1:4, 1:5] -2.92 -1.85 -2.91 -1.84 -2.87 ...
     - 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 143926517         7599  1.3859         2111
  2          1     2    1 143926517 185449813         2668  2.0704          774
  3          1     3    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2111        2111 0.5237 0.3300521 1.055848
  2          774         774 0.1542 0.8755722 1.194828
  3         1311        1311 0.2512 0.9862070 1.647893
  > plotTracks(fit)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Calling segments in allelic balance (AB) and
  > # in loss-of-heterozygosity (LOH)
  > # NOTE: Ideally, this should be done on whole-genome data
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > fit <- callAB(fit, verbose=-10)
  Error in loadNamespace(name) : there is no package called 'Hmisc'
  Calls: callAB ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
  Execution halted
Running the tests in ‘tests/segmentByPairedPSCBS,calls.R’ failed.
Complete output:
  > library("PSCBS")
  PSCBS v0.64.0 successfully loaded. See ?PSCBS for help.
  
  Attaching package: 'PSCBS'
  
  The following objects are masked from 'package:base':
  
      append, load
  
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # 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)
  > 
  > # Find centromere
  > gaps <- findLargeGaps(dataS, minLength=2e6)
  > knownSegments <- gapsToSegments(gaps)
  > 
  > 
  > # 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 <- 4L
  +   # Number of bootstrap samples (see below)
  +   B <- 100L
  + } else {
  +   # Full tests
  +   nSegs <- 11L
  +   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 ...
  > 
  > # 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   : Factor w/ 2 levels "peak","valley": 1 2 1 2 1
      .. .. ..$ x      : num [1:5] 0.104 0.315 0.499 0.677 0.885
      .. .. ..$ density: num [1:5] 1.48 0.522 1.056 0.552 1.454
      .. ..$ fitValleys         :Classes 'PeaksAndValleys' and 'data.frame':	2 obs. of  3 variables:
      .. .. ..$ type   : Factor w/ 2 levels "peak","valley": 2 2
      .. .. ..$ x      : num [1:2] 0.315 0.677
      .. .. ..$ density: num [1:2] 0.522 0.552
      ..- 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   : Factor w/ 2 levels "peak","valley": 1 2 1 2 1
      .. .. .. .. ..$ x      : num [1:5] 0.104 0.315 0.499 0.677 0.885
      .. .. .. .. ..$ density: num [1:5] 1.48 0.522 1.056 0.552 1.454
      .. .. .. ..$ fitValleys         :Classes 'PeaksAndValleys' and 'data.frame':	2 obs. of  3 variables:
      .. .. .. .. ..$ type   : Factor w/ 2 levels "peak","valley": 2 2
      .. .. .. .. ..$ x      : num [1:2] 0.315 0.677
      .. .. .. .. ..$ density: num [1:2] 0.522 0.552
      .. .. ..- 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  -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  0.315 0.677
      .. .. .. .. ..$ n                  : int 14640
      .. .. .. .. ..$ fit                :Classes 'PeaksAndValleys' and 'data.frame':	5 obs. of  3 variables:
      .. .. .. .. .. ..$ type   : Factor w/ 2 levels "peak","valley": 1 2 1 2 1
      .. .. .. .. .. ..$ x      : num  0.104 0.315 0.499 0.677 0.885
      .. .. .. .. .. ..$ density: num  1.48 0.522 1.056 0.552 1.454
      .. .. .. .. ..$ fitValleys         :Classes 'PeaksAndValleys' and 'data.frame':	2 obs. of  3 variables:
      .. .. .. .. .. ..$ type   : Factor w/ 2 levels "peak","valley": 2 2
      .. .. .. .. .. ..$ x      : num  0.315 0.677
      .. .. .. .. .. ..$ density: num  0.522 0.552
      .. .. .. ..- attr(*, "class")= chr  "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  0.315 0.677
      .. .. ..$ n                  : int 14640
      .. .. ..$ fit                :Classes 'PeaksAndValleys' and 'data.frame':	5 obs. of  3 variables:
      .. .. .. ..$ type   : Factor w/ 2 levels "peak","valley": 1 2 1 2 1
      .. .. .. ..$ x      : num  0.104 0.315 0.499 0.677 0.885
      .. .. .. ..$ density: num  1.48 0.522 1.056 0.552 1.454
      .. .. ..$ fitValleys         :Classes 'PeaksAndValleys' and 'data.frame':	2 obs. of  3 variables:
      .. .. .. ..$ type   : Factor w/ 2 levels "peak","valley": 2 2
      .. .. .. ..$ x      : num  0.315 0.677
      .. .. .. ..$ density: num  0.522 0.552
      .. ..- attr(*, "class")= chr  "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 120992603      Inf
    2          1 120992604 141510002 20517398
    3          1 141510003       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: 3
      Random seed temporarily set (seed=c(407, 1066287653, -51199871, 161854402, -1995183193, 1503453565, -747102133), kind="L'Ecuyer-CMRG")
      Produced 3 seeds from this stream for future usage
       Segmenting by CBS...
        Chromosome: 1
         Random seed temporarily set (seed=c(407, 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(407, -1924040949, -1632234809, -437763632, -1464377300, 676654412, 2080370711), 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':	4 obs. of  6 variables:
      ..$ sampleName: chr [1:4] NA NA NA NA
      ..$ chromosome: int [1:4] 1 1 1 1
      ..$ start     : num [1:4] 5.54e+05 1.21e+08 1.42e+08 1.85e+08
      ..$ end       : num [1:4] 1.21e+08 1.42e+08 1.85e+08 2.47e+08
      ..$ nbrOfLoci : int [1:4] 7586 0 2681 4391
      ..$ mean      : num [1:4] 1.39 NA 2.07 2.63
     $ segRows:'data.frame':	4 obs. of  2 variables:
      ..$ startRow: int [1:4] 1 NA 7587 10268
      ..$ endRow  : int [1:4] 7586 NA 10267 14658
     $ params :List of 5
      ..$ alpha        : num 0.009
      ..$ undo         : num 0
      ..$ joinSegments : logi TRUE
      ..$ knownSegments:'data.frame':	4 obs. of  3 variables:
      .. ..$ chromosome: int [1:4] 1 1 2 1
      .. ..$ start     : num [1:4] -Inf -Inf -Inf 1.42e+08
      .. ..$ end       : num [1:4] 1.21e+08 Inf Inf Inf
      ..$ seed         : int [1:7] 407 1066287653 -51199871 161854402 -1995183193 1503453565 -747102133
     - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
     - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.153 0 0.279 0 0
      ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
     - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
     - attr(*, "randomSeed")= int [1:7] 407 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 120992603         7586  1.3853
    2          1 120992604 141510002            0      NA
    3          1 141510003 185449813         2681  2.0689
    4          1 185449813 247137334         4391  2.6341
    Number of TCN segments: 4
   Restructure TCN segmentation results...done
   Total CN segment #1 ([    554484,1.20993e+08]) of 4...
    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(407, 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] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.046 0 0.047 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 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 120992603        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       NA     NA
    3     7587  10267
    4    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 120992603         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 120992603         7586  1.3853         2108
      tcnNbrOfHets dhStart     dhEnd dhNbrOfLoci dhMean
    1         2108  554484 120992603        2108 0.5116
   Total CN segment #1 ([    554484,1.20993e+08]) of 4...done
   Total CN segment #2 ([1.20993e+08,1.4151e+08]) of 4...
    Number of TCN loci in segment: 0
    Locus data for TCN segment:
    'data.frame':	0 obs. of  9 variables:
     $ chromosome: int 
     $ x         : num 
     $ CT        : num 
     $ betaT     : num 
     $ betaTN    : num 
     $ betaN     : num 
     $ muN       : num 
     $ index     : int 
     $ rho       : num 
    Number of loci: 0
    Number of SNPs: 0 (NaN%)
    Number of heterozygous SNPs: 0 (NaN%)
    Chromosome: 1
    Segmenting DH signals...
     Segmenting by CBS...
      Chromosome: NA
       Random seed temporarily set (seed=c(407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG")
     Segmenting by CBS...done
     List of 4
      $ data   :'data.frame':	0 obs. of  4 variables:
       ..$ chromosome: int(0) 
       ..$ x         : num(0) 
       ..$ y         : num(0) 
       ..$ index     : int(0) 
      $ output :'data.frame':	0 obs. of  6 variables:
       ..$ sampleName: chr(0) 
       ..$ chromosome: num(0) 
       ..$ start     : num(0) 
       ..$ end       : num(0) 
       ..$ nbrOfLoci : int(0) 
       ..$ mean      : num(0) 
      $ segRows:'data.frame':	0 obs. of  2 variables:
       ..$ startRow: int(0) 
       ..$ endRow  : int(0) 
      $ params :List of 5
       ..$ alpha        : num 0.001
       ..$ undo         : num 0
       ..$ joinSegments : logi TRUE
       ..$ knownSegments:'data.frame':	0 obs. of  3 variables:
       .. ..$ chromosome: int(0) 
       .. ..$ start     : num(0) 
       .. ..$ end       : num(0) 
       ..$ seed         : int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.003 0 0.003 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
     DH segmentation (locally-indexed) rows:
     [1] startRow endRow  
     <0 rows> (or 0-length row.names)
      int(0) 
     DH segmentation rows:
     [1] startRow endRow  
     <0 rows> (or 0-length row.names)
    Segmenting DH signals...done
    DH segmentation table:
       dhStart dhEnd dhNbrOfLoci dhMean
    NA      NA    NA          NA     NA
       startRow endRow
    NA       NA     NA
    Rows:
    [1] 2
    TCN segmentation rows:
      startRow endRow
    2       NA     NA
    TCN and DH segmentation rows:
      startRow endRow
    2       NA     NA
       startRow endRow
    NA       NA     NA
      startRow endRow
    1        1   7586
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7586
    2       NA     NA
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7586
    2       NA     NA
    3     7587  10267
    4    10268  14658
      startRow endRow
    1       10   7574
    2       NA     NA
      startRow endRow
    1        1   7586
    2       NA     NA
    Total CN segmentation table (expanded):
      chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets
    2          1 120992604 141510002            0      NA            0            0
    (TCN,DH) segmentation for one total CN segment:
      tcnId dhId chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
    2     2    1          1 120992604 141510002            0      NA            0
      tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean
    2            0      NA    NA          NA     NA
   Total CN segment #2 ([1.20993e+08,1.4151e+08]) of 4...done
   Total CN segment #3 ([1.4151e+08,1.8545e+08]) of 4...
    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(407, 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.42e+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.42e+08
       .. ..$ end       : num 1.85e+08
       ..$ seed         : int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.011 0 0.01 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 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 141510003 185449813         777 0.0973
      startRow endRow
    1     7587  10263
    Rows:
    [1] 3
    TCN segmentation rows:
      startRow endRow
    3     7587  10267
    TCN and DH segmentation rows:
      startRow endRow
    3     7587  10267
      startRow endRow
    1     7587  10263
      startRow endRow
    1        1   7586
    2       NA     NA
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7586
    2       NA     NA
    3     7587  10267
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7586
    2       NA     NA
    3     7587  10267
    4    10268  14658
      startRow endRow
    1       10   7574
    2       NA     NA
    3     7587  10263
      startRow endRow
    1        1   7586
    2       NA     NA
    3     7587  10267
    Total CN segmentation table (expanded):
      chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets
    3          1 141510003 185449813         2681  2.0689          777          777
    (TCN,DH) segmentation for one total CN segment:
      tcnId dhId chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
    3     3    1          1 141510003 185449813         2681  2.0689          777
      tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean
    3          777 141510003 185449813         777 0.0973
   Total CN segment #3 ([1.4151e+08,1.8545e+08]) of 4...done
   Total CN segment #4 ([1.8545e+08,2.47137e+08]) of 4...
    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(407, 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] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.018 0 0.021 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 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] 4
    TCN segmentation rows:
      startRow endRow
    4    10268  14658
    TCN and DH segmentation rows:
      startRow endRow
    4    10268  14658
      startRow endRow
    1    10269  14655
      startRow endRow
    1        1   7586
    2       NA     NA
    3     7587  10267
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7586
    2       NA     NA
    3     7587  10267
    4    10268  14658
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7586
    2       NA     NA
    3     7587  10267
    4    10268  14658
      startRow endRow
    1       10   7574
    2       NA     NA
    3     7587  10263
    4    10269  14655
      startRow endRow
    1        1   7586
    2       NA     NA
    3     7587  10267
    4    10268  14658
    Total CN segmentation table (expanded):
      chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets
    4          1 185449813 247137334         4391  2.6341         1311         1311
    (TCN,DH) segmentation for one total CN segment:
      tcnId dhId chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
    4     4    1          1 185449813 247137334         4391  2.6341         1311
      tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean
    4         1311 185449813 247137334        1311 0.2295
   Total CN segment #4 ([1.8545e+08,2.47137e+08]) of 4...done
     chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
   1          1     1    1    554484 120992603         7586  1.3853         2108
   2          1     2    1 120992604 141510002            0      NA            0
   3          1     3    1 141510003 185449813         2681  2.0689          777
   4          1     4    1 185449813 247137334         4391  2.6341         1311
     tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean
   1         2108    554484 120992603        2108 0.5116
   2            0        NA        NA          NA     NA
   3          777 141510003 185449813         777 0.0973
   4         1311 185449813 247137334        1311 0.2295
   Calculating (C1,C2) per segment...
   Calculating (C1,C2) per segment...done
   Number of segments: 4
  Segmenting paired tumor-normal signals using Paired PSCBS...done
  Post-segmenting TCNs...
   Number of segments: 4
   Number of chromosomes: 1
   [1] 1
   Chromosome 1 ('chr01') of 1...
    Rows:
    [1] 1 2 3 4
    Number of segments: 4
    TCN segment #1 ('1') of 4...
     Nothing todo. Only one DH segmentation. Skipping.
    TCN segment #1 ('1') of 4...done
    TCN segment #2 ('2') of 4...
     Nothing todo. Only one DH segmentation. Skipping.
    TCN segment #2 ('2') of 4...done
    TCN segment #3 ('3') of 4...
     Nothing todo. Only one DH segmentation. Skipping.
    TCN segment #3 ('3') of 4...done
    TCN segment #4 ('4') of 4...
     Nothing todo. Only one DH segmentation. Skipping.
    TCN segment #4 ('4') of 4...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 120992603         7586  1.3853         2108
  2          1     2    1 120992604 141510002            0      NA            0
  3          1     3    1 141510003 185449813         2681  2.0689          777
  4          1     4    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2108    554484 120992603        2108 0.5116 0.3382903 1.047010
  2            0        NA        NA          NA     NA        NA       NA
  3          777 141510003 185449813         777 0.0973 0.9337980 1.135102
  4         1311 185449813 247137334        1311 0.2295 1.0147870 1.619313
    chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
  1          1     1    1    554484 120992603         7586  1.3853         2108
  2          1     2    1 120992604 141510002            0      NA            0
  3          1     3    1 141510003 185449813         2681  2.0689          777
  4          1     4    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2108    554484 120992603        2108 0.5116 0.3382903 1.047010
  2            0        NA        NA          NA     NA        NA       NA
  3          777 141510003 185449813         777 0.0973 0.9337980 1.135102
  4         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 120992603         7586  1.3853         2108
  2          1     2    1 120992604 141510002            0      NA            0
  3          1     3    1 141510003 185449813         2681  2.0689          777
  4          1     4    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2108        2108 0.5116 0.3382903 1.047010
  2            0          NA     NA        NA       NA
  3          777         777 0.0973 0.9337980 1.135102
  4         1311        1311 0.2295 1.0147870 1.619313
  > 
  > # Plot results
  > plotTracks(fit)
  > 
  > # Sanity check
  > stopifnot(nbrOfSegments(fit) == nSegs)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Bootstrap segment level estimates
  > # (used by the AB caller, which, if skipped here,
  > #  will do it automatically)
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > fit <- bootstrapTCNandDHByRegion(fit, B=B, 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: 14658
     Number of SNPs: 4196
     Number of non-SNPs: 10462
    Identifying heterozygous & homozygous SNPs and non-polymorphic loci...done
     num [1:4, 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 4...
       chromosome tcnId dhId tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     1          1     1    1   554484 120992603         7586  1.3853         2108
       tcnNbrOfHets dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean  c2Mean
     1         2108  554484 120992603        2108 0.5116 0.3382903 1.04701
     Number of TCNs: 7586
     Number of DHs: 2108
      int [1:7586] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:7586] 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:2108] 10 12 24 28 31 33 34 39 46 48 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:2108] 10 12 24 28 31 33 34 39 46 48 ...
      Non-polymorphic loci:
       int [1:5478] 1 2 3 4 5 6 7 8 9 11 ...
      Heterozygous SNPs to resample for TCN:
       int [1:2108] 10 12 24 28 31 33 34 39 46 48 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:5478] 1 2 3 4 5 6 7 8 9 11 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:7586] 1 2 3 4 5 6 7 8 9 10 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (2108,0,5478)
     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 4...done
    Segment #2 (chr 1, tcnId=2, dhId=1) of 4...
       chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     2          1     2    1 120992604 141510002            0      NA            0
       tcnNbrOfHets dhStart dhEnd dhNbrOfLoci dhMean c1Mean c2Mean
     2            0      NA    NA           0     NA     NA     NA
     Number of TCNs: 0
     Number of DHs: 0
      int 0
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int(0) 
     Identify loci used to bootstrap DH means...
      Heterozygous SNPs to resample for DH:
       int 0
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int(0) 
      Non-polymorphic loci:
       int(0) 
      Heterozygous SNPs to resample for TCN:
       int(0) 
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int(0) 
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int(0) 
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (0,0,0)
     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 4...done
    Segment #3 (chr 1, tcnId=3, dhId=1) of 4...
       chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     3          1     3    1 141510003 185449813         2681  2.0689          777
       tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean   c1Mean   c2Mean
     3          777 141510003 185449813         777 0.0973 0.933798 1.135102
     Number of TCNs: 2681
     Number of DHs: 777
      int [1:2681] 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:2681] 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 ...
     Identify loci used to bootstrap DH means...
      Heterozygous SNPs to resample for DH:
       int [1:777] 7587 7588 7594 7614 7616 7626 7627 7628 7635 7638 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:777] 7587 7588 7594 7614 7616 7626 7627 7628 7635 7638 ...
      Non-polymorphic loci:
       int [1:1904] 7589 7590 7591 7592 7593 7595 7596 7597 7598 7599 ...
      Heterozygous SNPs to resample for TCN:
       int [1:777] 7587 7588 7594 7614 7616 7626 7627 7628 7635 7638 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:1904] 7589 7590 7591 7592 7593 7595 7596 7597 7598 7599 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:2681] 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (777,0,1904)
     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 4...done
    Segment #4 (chr 1, tcnId=4, dhId=1) of 4...
       chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     4          1     4    1 185449813 247137334         4391  2.6341         1311
       tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean   c1Mean   c2Mean
     4         1311 185449813 247137334        1311 0.2295 1.014787 1.619313
     Number of TCNs: 4391
     Number of DHs: 1311
      int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
     Identify loci used to bootstrap DH means...
      Heterozygous SNPs to resample for DH:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
      Non-polymorphic loci:
       int [1:3080] 10268 10270 10272 10273 10274 10275 10276 10277 10278 10279 ...
      Heterozygous SNPs to resample for TCN:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:3080] 10268 10270 10272 10273 10274 10275 10276 10277 10278 10279 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (1311,0,3080)
     Bootstrapping while preserving (#hets, #homs, #nonSNPs)...
      Number of bootstrap samples: 100
     Bootstrapping while preserving (#hets, #homs, #nonSNPs)...done
    Segment #4 (chr 1, tcnId=4, dhId=1) of 4...done
    Bootstrapped segment mean levels
     num [1:4, 1:100, 1:4] 1.39 NA 2.08 2.63 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:4, 1:100, 1:4] 1.39 NA 2.08 2.63 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:3, 1:100, 1:2] NA NA -0.0739 NA NA ...
      - attr(*, "dimnames")=List of 3
       ..$ : NULL
       ..$ : NULL
       ..$ : chr [1:2] "c1" "c2"
     Bootstrapped change points
      num [1:3, 1:100, 1:5] NA NA -1.72 NA NA ...
      - 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:4, 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 4...
     Segment #1 of 4...done
     Segment #2 of 4...
     Segment #2 of 4...done
     Segment #3 of 4...
     Segment #3 of 4...done
     Segment #4 of 4...
     Segment #4 of 4...done
    Field #1 ('tcn') of 4...done
    Field #2 ('dh') of 4...
     Segment #1 of 4...
     Segment #1 of 4...done
     Segment #2 of 4...
     Segment #2 of 4...done
     Segment #3 of 4...
     Segment #3 of 4...done
     Segment #4 of 4...
     Segment #4 of 4...done
    Field #2 ('dh') of 4...done
    Field #3 ('c1') of 4...
     Segment #1 of 4...
     Segment #1 of 4...done
     Segment #2 of 4...
     Segment #2 of 4...done
     Segment #3 of 4...
     Segment #3 of 4...done
     Segment #4 of 4...
     Segment #4 of 4...done
    Field #3 ('c1') of 4...done
    Field #4 ('c2') of 4...
     Segment #1 of 4...
     Segment #1 of 4...done
     Segment #2 of 4...
     Segment #2 of 4...done
     Segment #3 of 4...
     Segment #3 of 4...done
     Segment #4 of 4...
     Segment #4 of 4...done
    Field #4 ('c2') of 4...done
    Bootstrap statistics
     num [1:4, 1:4, 1:4] 1.38 NA 2.06 2.62 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:4, 1:4, 1:4] 1.38 NA 2.06 2.62 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.3853, range=[1.37974,1.39209], n=7586
      Seg   2. mean=NA, range=[NA,NA], n=0
      Seg   3. mean=2.0689, range=[2.05648,2.08461], n=2681
      Seg   4. mean=2.6341, range=[2.62026,2.64614], n=4391
     Field #1 ('tcn') of 4...done
     Field #2 ('dh') of 4...
      Seg   1. mean=0.5116, range=[0.504048,0.523052], n=2108
      Seg   2. mean=NA, range=[NA,NA], n=NA
      Seg   3. mean=0.0973, range=[0.0897693,0.10716], n=777
      Seg   4. mean=0.2295, range=[0.222468,0.236143], n=1311
     Field #2 ('dh') of 4...done
     Field #3 ('c1') of 4...
      Seg   1. mean=0.33829, range=[0.329979,0.344285], n=2108
      Seg   2. mean=NA, range=[NA,NA], n=NA
      Seg   3. mean=0.933798, range=[0.923195,0.944295], n=777
      Seg   4. mean=1.01479, range=[1.00462,1.02729], n=1311
     Field #3 ('c1') of 4...done
     Field #4 ('c2') of 4...
      Seg   1. mean=1.04701, range=[1.04107,1.05552], n=2108
      Seg   2. mean=NA, range=[NA,NA], n=NA
      Seg   3. mean=1.1351, range=[1.12429,1.14551], n=777
      Seg   4. mean=1.61931, range=[1.60659,1.63024], n=1311
     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:3, 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 3...
     Changepoint #1 of 3...done
     Changepoint #2 of 3...
     Changepoint #2 of 3...done
     Changepoint #3 of 3...
     Changepoint #3 of 3...done
    Field #1 ('alpha') of 5...done
    Field #2 ('radius') of 5...
     Changepoint #1 of 3...
     Changepoint #1 of 3...done
     Changepoint #2 of 3...
     Changepoint #2 of 3...done
     Changepoint #3 of 3...
     Changepoint #3 of 3...done
    Field #2 ('radius') of 5...done
    Field #3 ('manhattan') of 5...
     Changepoint #1 of 3...
     Changepoint #1 of 3...done
     Changepoint #2 of 3...
     Changepoint #2 of 3...done
     Changepoint #3 of 3...
     Changepoint #3 of 3...done
    Field #3 ('manhattan') of 5...done
    Field #4 ('d1') of 5...
     Changepoint #1 of 3...
     Changepoint #1 of 3...done
     Changepoint #2 of 3...
     Changepoint #2 of 3...done
     Changepoint #3 of 3...
     Changepoint #3 of 3...done
    Field #4 ('d1') of 5...done
    Field #5 ('d2') of 5...
     Changepoint #1 of 3...
     Changepoint #1 of 3...done
     Changepoint #2 of 3...
     Changepoint #2 of 3...done
     Changepoint #3 of 3...
     Changepoint #3 of 3...done
    Field #5 ('d2') of 5...done
    Bootstrap statistics
     num [1:3, 1:4, 1:5] NA NA -1.77 NA NA ...
     - 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 120992603         7586  1.3853         2108
  2          1     2    1 120992604 141510002            0      NA            0
  3          1     3    1 141510003 185449813         2681  2.0689          777
  4          1     4    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2108        2108 0.5116 0.3382903 1.047010
  2            0          NA     NA        NA       NA
  3          777         777 0.0973 0.9337980 1.135102
  4         1311        1311 0.2295 1.0147870 1.619313
  > plotTracks(fit)
  > 
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Calling segments with run of homozygosity (ROH)
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > fit <- callROH(fit, verbose=-10)
  Calling ROH...
   Segment #1 of 4...
    Calling ROH for a single segment...
     Number of SNPs: 7586
    Calling ROH for a single segment...done
   Segment #1 of 4...done
   Segment #2 of 4...
    Calling ROH for a single segment...
     Number of SNPs: 0
    Calling ROH for a single segment...done
   Segment #2 of 4...done
   Segment #3 of 4...
    Calling ROH for a single segment...
     Number of SNPs: 2681
    Calling ROH for a single segment...done
   Segment #3 of 4...done
   Segment #4 of 4...
    Calling ROH for a single segment...
     Number of SNPs: 4391
    Calling ROH for a single segment...done
   Segment #4 of 4...done
   ROH calls:
    logi [1:4] FALSE NA FALSE FALSE
      Mode   FALSE    NA's 
   logical       3       1 
  Calling ROH...done
  > print(fit)
    chromosome tcnId dhId     start       end tcnNbrOfLoci tcnMean tcnNbrOfSNPs
  1          1     1    1    554484 120992603         7586  1.3853         2108
  2          1     2    1 120992604 141510002            0      NA            0
  3          1     3    1 141510003 185449813         2681  2.0689          777
  4          1     4    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets dhNbrOfLoci dhMean    c1Mean   c2Mean rohCall
  1         2108        2108 0.5116 0.3382903 1.047010   FALSE
  2            0          NA     NA        NA       NA      NA
  3          777         777 0.0973 0.9337980 1.135102   FALSE
  4         1311        1311 0.2295 1.0147870 1.619313   FALSE
  > plotTracks(fit)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Estimate background
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > kappa <- estimateKappa(fit, verbose=-10)
  Estimate global background (including normal contamination and more)...
   Number of segments: 3
   Estimating threshold Delta0.5 from the empirical density of C1:s...
    adjust: 1
    minDensity: 0.2
    ploidy: 2
    All peaks:
      type         x  density
    1 peak 0.3362194 1.101272
    3 peak 0.9811492 1.065711
    C1=0 and C1=1 peaks:
      type         x  density
    1 peak 0.3362194 1.101272
    3 peak 0.9811492 1.065711
    Estimate of Delta0.5: 0.65868427808456
   Estimating threshold Delta0.5 from the empirical density of C1:s...done
   Number of segments with C1 < Delta0.5: 1
   Estimate of kappa: 0.33829026
  Estimate global background (including normal contamination and more)...done
  > print(kappa)
  [1] 0.3382903
  > ## [1] 0.226011
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # 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: 3
  Error in loadNamespace(name) : there is no package called 'Hmisc'
  Calls: estimateDeltaAB ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
   Estimating DH threshold for AB caller...done
  Estimating DH threshold for calling allelic imbalances...done
  Execution halted
Running the tests in ‘tests/segmentByPairedPSCBS,noNormalBAFs.R’ failed.
Complete output:
  > library("PSCBS")
  PSCBS v0.64.0 successfully loaded. See ?PSCBS for help.
  
  Attaching package: 'PSCBS'
  
  The following objects are masked from 'package:base':
  
      append, load
  
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # 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 ...
  > 
  > # 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 <- 8L
  +   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)
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Simulate that genotypes are known by other means
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > library("aroma.light")
  aroma.light v3.11.2 (2018-09-04) successfully loaded. See ?aroma.light for help.
  > muN <- aroma.light::callNaiveGenotypes(betaN, censorAt=c(0,1))
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Paired PSCBS segmentation
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > fit <- segmentByPairedPSCBS(CT, betaT=betaT, muN=muN, tbn=FALSE,
  +                             chromosome=chromosome, x=x,
  +                             seed=0xBEEF, verbose=-10)
  Segmenting paired tumor-normal signals using Paired PSCBS...
   Setup up data...
    'data.frame':	14670 obs. of  6 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.7574 0.169 0.2357 0.2604 0.0576 ...
     $ 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  0.315 0.677
      .. .. ..$ n                  : int 14640
      .. .. ..$ fit                :Classes 'PeaksAndValleys' and 'data.frame':	5 obs. of  3 variables:
      .. .. .. ..$ type   : Factor w/ 2 levels "peak","valley": 1 2 1 2 1
      .. .. .. ..$ x      : num  0.104 0.315 0.499 0.677 0.885
      .. .. .. ..$ density: num  1.48 0.522 1.056 0.552 1.454
      .. .. ..$ fitValleys         :Classes 'PeaksAndValleys' and 'data.frame':	2 obs. of  3 variables:
      .. .. .. ..$ type   : Factor w/ 2 levels "peak","valley": 2 2
      .. .. .. ..$ x      : num  0.315 0.677
      .. .. .. ..$ density: num  0.522 0.552
      .. ..- attr(*, "class")= chr  "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  6 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.0646 0.1672 0.9284 0.113 0.7209 ...
     $ 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:
    [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: 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
      Random seed temporarily set (seed=c(407, 1066287653, -51199871, 161854402, -1995183193, 1503453565, -747102133), kind="L'Ecuyer-CMRG")
    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.44e+08 1.85e+08
      ..$ end       : num [1:3] 1.44e+08 1.85e+08 2.47e+08
      ..$ nbrOfLoci : int [1:3] 7599 2668 4391
      ..$ mean      : num [1:3] 1.39 2.07 2.63
     $ segRows:'data.frame':	3 obs. of  2 variables:
      ..$ startRow: int [1:3] 1 7600 10268
      ..$ endRow  : int [1:3] 7599 10267 14658
     $ 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] 407 1066287653 -51199871 161854402 -1995183193 1503453565 -747102133
     - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
     - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.445 0.007 0.576 0 0
      ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
     - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
     - attr(*, "randomSeed")= int [1:7] 407 1066287653 -51199871 161854402 -1995183193 1503453565 -747102133
   Identification of change points by total copy numbers...done
   Restructure TCN segmentation results...
      chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean
    1          1    554484 143926517         7599  1.3859
    2          1 143926517 185449813         2668  2.0704
    3          1 185449813 247137334         4391  2.6341
    Number of TCN segments: 3
   Restructure TCN segmentation results...done
   Total CN segment #1 ([    554484,1.43927e+08]) of 3...
    Number of TCN loci in segment: 7599
    Locus data for TCN segment:
    'data.frame':	7599 obs. of  8 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.0646 0.1672 0.9284 0.113 0.7209 ...
     $ 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: 7599
    Number of SNPs: 2111 (27.78%)
    Number of heterozygous SNPs: 2111 (100.00%)
    Chromosome: 1
    Segmenting DH signals...
     Segmenting by CBS...
      Chromosome: 1
       Random seed temporarily set (seed=c(407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG")
     Segmenting by CBS...done
     List of 4
      $ data   :'data.frame':	7599 obs. of  4 variables:
       ..$ chromosome: int [1:7599] 1 1 1 1 1 1 1 1 1 1 ...
       ..$ x         : num [1:7599] 554484 730720 782343 878522 916294 ...
       ..$ y         : num [1:7599] NA NA NA NA NA ...
       ..$ index     : int [1:7599] 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.44e+08
       ..$ nbrOfLoci : int 2111
       ..$ mean      : num 0.524
      $ segRows:'data.frame':	1 obs. of  2 variables:
       ..$ startRow: int 10
       ..$ endRow  : int 7594
      $ 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.44e+08
       ..$ seed         : int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.081 0.011 0.177 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
     DH segmentation (locally-indexed) rows:
       startRow endRow
     1       10   7594
      int [1:7599] 1 2 3 4 5 6 7 8 9 10 ...
     DH segmentation rows:
       startRow endRow
     1       10   7594
    Segmenting DH signals...done
    DH segmentation table:
      dhStart     dhEnd dhNbrOfLoci dhMean
    1  554484 143926517        2111 0.5237
      startRow endRow
    1       10   7594
    Rows:
    [1] 1
    TCN segmentation rows:
      startRow endRow
    1        1   7599
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7599
      startRow endRow
    1       10   7594
    NULL
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7599
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    3    10268  14658
      startRow endRow
    1       10   7594
      startRow endRow
    1        1   7599
    Total CN segmentation table (expanded):
      chromosome tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets
    1          1   554484 143926517         7599  1.3859         2111         2111
    (TCN,DH) segmentation for one total CN segment:
      tcnId dhId chromosome tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
    1     1    1          1   554484 143926517         7599  1.3859         2111
      tcnNbrOfHets dhStart     dhEnd dhNbrOfLoci dhMean
    1         2111  554484 143926517        2111 0.5237
   Total CN segment #1 ([    554484,1.43927e+08]) of 3...done
   Total CN segment #2 ([1.43927e+08,1.8545e+08]) of 3...
    Number of TCN loci in segment: 2668
    Locus data for TCN segment:
    'data.frame':	2668 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.1 2.1 2.09 1.8 2.34 ...
     $ betaT     : num  0.1899 0.909 0.9166 0.1668 0.0308 ...
     $ betaTN    : num  0.1899 0.909 0.9166 0.1668 0.0308 ...
     $ muN       : num  0 1 1 0 0 1 0 0 0 0 ...
     $ index     : int  7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
     $ rho       : num  NA NA NA NA NA NA NA NA NA NA ...
    Number of loci: 2668
    Number of SNPs: 774 (29.01%)
    Number of heterozygous SNPs: 774 (100.00%)
    Chromosome: 1
    Segmenting DH signals...
     Segmenting by CBS...
      Chromosome: 1
       Random seed temporarily set (seed=c(407, 1797822437, 388243314, 91406689, -519578635, -1381924756, 1089253019), kind="L'Ecuyer-CMRG")
     Segmenting by CBS...done
     List of 4
      $ data   :'data.frame':	2668 obs. of  4 variables:
       ..$ chromosome: int [1:2668] 1 1 1 1 1 1 1 1 1 1 ...
       ..$ x         : num [1:2668] 1.44e+08 1.44e+08 1.44e+08 1.44e+08 1.44e+08 ...
       ..$ y         : num [1:2668] NA NA NA NA NA NA NA NA NA NA ...
       ..$ index     : int [1:2668] 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.44e+08
       ..$ end       : num 1.85e+08
       ..$ nbrOfLoci : int 774
       ..$ mean      : num 0.154
      $ segRows:'data.frame':	1 obs. of  2 variables:
       ..$ startRow: int 15
       ..$ endRow  : int 2664
      $ 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.44e+08
       .. ..$ end       : num 1.85e+08
       ..$ seed         : int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.017 0.004 0.021 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
     DH segmentation (locally-indexed) rows:
       startRow endRow
     1       15   2664
      int [1:2668] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
     DH segmentation rows:
       startRow endRow
     1     7614  10263
    Segmenting DH signals...done
    DH segmentation table:
        dhStart     dhEnd dhNbrOfLoci dhMean
    1 143926517 185449813         774 0.1542
      startRow endRow
    1     7614  10263
    Rows:
    [1] 2
    TCN segmentation rows:
      startRow endRow
    2     7600  10267
    TCN and DH segmentation rows:
      startRow endRow
    2     7600  10267
      startRow endRow
    1     7614  10263
      startRow endRow
    1        1   7599
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    3    10268  14658
      startRow endRow
    1       10   7594
    2     7614  10263
      startRow endRow
    1        1   7599
    2     7600  10267
    Total CN segmentation table (expanded):
      chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs tcnNbrOfHets
    2          1 143926517 185449813         2668  2.0704          774          774
    (TCN,DH) segmentation for one total CN segment:
      tcnId dhId chromosome  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
    2     2    1          1 143926517 185449813         2668  2.0704          774
      tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean
    2          774 143926517 185449813         774 0.1542
   Total CN segment #2 ([1.43927e+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  8 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.0811 0.5154 0.9473 0.3734 0.7506 ...
     $ 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.0308 NA 0.2533 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(407, 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.0308 NA 0.2533 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.251
      $ 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] 407 1797822437 388243314 91406689 -519578635 -1381924756 1089253019
      - attr(*, "class")= chr [1:2] "CBS" "AbstractCBS"
      - attr(*, "processingTime")= 'proc_time' Named num [1:5] 0.025 0 0.025 0 0
       ..- attr(*, "names")= chr [1:5] "user.self" "sys.self" "elapsed" "user.child" ...
      - attr(*, "pkgDetails")= chr "DNAcopy v1.55.0"
      - attr(*, "randomSeed")= int [1:7] 407 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.2512
      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   7599
    2     7600  10267
    TCN segmentation (expanded) rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    3    10268  14658
    TCN and DH segmentation rows:
      startRow endRow
    1        1   7599
    2     7600  10267
    3    10268  14658
      startRow endRow
    1       10   7594
    2     7614  10263
    3    10269  14655
      startRow endRow
    1        1   7599
    2     7600  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.2512
   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 143926517         7599  1.3859         2111
   2          1     2    1 143926517 185449813         2668  2.0704          774
   3          1     3    1 185449813 247137334         4391  2.6341         1311
     tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean
   1         2111    554484 143926517        2111 0.5237
   2          774 143926517 185449813         774 0.1542
   3         1311 185449813 247137334        1311 0.2512
   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 143926517         7599  1.3859         2111
  2          1     2    1 143926517 185449813         2668  2.0704          774
  3          1     3    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2111    554484 143926517        2111 0.5237 0.3300521 1.055848
  2          774 143926517 185449813         774 0.1542 0.8755722 1.194828
  3         1311 185449813 247137334        1311 0.2512 0.9862070 1.647893
    chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
  1          1     1    1    554484 143926517         7599  1.3859         2111
  2          1     2    1 143926517 185449813         2668  2.0704          774
  3          1     3    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2111    554484 143926517        2111 0.5237 0.3300521 1.055848
  2          774 143926517 185449813         774 0.1542 0.8755722 1.194828
  3         1311 185449813 247137334        1311 0.2512 0.9862070 1.647893
  > print(fit)
    chromosome tcnId dhId     start       end tcnNbrOfLoci tcnMean tcnNbrOfSNPs
  1          1     1    1    554484 143926517         7599  1.3859         2111
  2          1     2    1 143926517 185449813         2668  2.0704          774
  3          1     3    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2111        2111 0.5237 0.3300521 1.055848
  2          774         774 0.1542 0.8755722 1.194828
  3         1311        1311 0.2512 0.9862070 1.647893
  > 
  > # Plot results
  > plotTracks(fit)
  > 
  > # Sanity check
  > stopifnot(nbrOfSegments(fit) == nSegs)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Bootstrap segment level estimates
  > # (used by the AB caller, which, if skipped here,
  > #  will do it automatically)
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > fit <- bootstrapTCNandDHByRegion(fit, B=B, 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: 14658
     Number of SNPs: 4196
     Number of non-SNPs: 10462
    Identifying heterozygous & homozygous SNPs and non-polymorphic loci...done
     num [1:3, 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 3...
       chromosome tcnId dhId tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     1          1     1    1   554484 143926517         7599  1.3859         2111
       tcnNbrOfHets dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
     1         2111  554484 143926517        2111 0.5237 0.3300521 1.055848
     Number of TCNs: 7599
     Number of DHs: 2111
      int [1:7599] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:7599] 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:2111] 10 12 24 28 31 33 34 39 46 48 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:2111] 10 12 24 28 31 33 34 39 46 48 ...
      Non-polymorphic loci:
       int [1:5488] 1 2 3 4 5 6 7 8 9 11 ...
      Heterozygous SNPs to resample for TCN:
       int [1:2111] 10 12 24 28 31 33 34 39 46 48 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:5488] 1 2 3 4 5 6 7 8 9 11 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:7599] 1 2 3 4 5 6 7 8 9 10 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (2111,0,5488)
     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 3...done
    Segment #2 (chr 1, tcnId=2, dhId=1) of 3...
       chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     2          1     2    1 143926517 185449813         2668  2.0704          774
       tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean    c1Mean   c2Mean
     2          774 143926517 185449813         774 0.1542 0.8755722 1.194828
     Number of TCNs: 2668
     Number of DHs: 774
      int [1:2668] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:2668] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
     Identify loci used to bootstrap DH means...
      Heterozygous SNPs to resample for DH:
       int [1:774] 7614 7616 7626 7627 7628 7635 7638 7639 7640 7642 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:774] 7614 7616 7626 7627 7628 7635 7638 7639 7640 7642 ...
      Non-polymorphic loci:
       int [1:1894] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
      Heterozygous SNPs to resample for TCN:
       int [1:774] 7614 7616 7626 7627 7628 7635 7638 7639 7640 7642 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:1894] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:2668] 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (774,0,1894)
     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 3...done
    Segment #3 (chr 1, tcnId=3, dhId=1) of 3...
       chromosome tcnId dhId  tcnStart    tcnEnd tcnNbrOfLoci tcnMean tcnNbrOfSNPs
     3          1     3    1 185449813 247137334         4391  2.6341         1311
       tcnNbrOfHets   dhStart     dhEnd dhNbrOfLoci dhMean   c1Mean   c2Mean
     3         1311 185449813 247137334        1311 0.2512 0.986207 1.647893
     Number of TCNs: 4391
     Number of DHs: 1311
      int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
      int [1:14658] 1 2 3 4 5 6 7 8 9 10 ...
      int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
     Identify loci used to bootstrap DH means...
      Heterozygous SNPs to resample for DH:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
     Identify loci used to bootstrap DH means...done
     Identify loci used to bootstrap TCN means...
      SNPs:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
      Non-polymorphic loci:
       int [1:3080] 10268 10270 10272 10273 10274 10275 10276 10277 10278 10279 ...
      Heterozygous SNPs to resample for TCN:
       int [1:1311] 10269 10271 10281 10282 10283 10293 10295 10297 10300 10302 ...
      Homozygous SNPs to resample for TCN:
       int(0) 
      Non-polymorphic loci to resample for TCN:
       int [1:3080] 10268 10270 10272 10273 10274 10275 10276 10277 10278 10279 ...
      Heterozygous SNPs with non-DH to resample for TCN:
       int(0) 
      Loci to resample for TCN:
       int [1:4391] 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 ...
     Identify loci used to bootstrap TCN means...done
     Number of (#hets, #homs, #nonSNPs): (1311,0,3080)
     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 3...done
    Bootstrapped segment mean levels
     num [1:3, 1:100, 1:4] 1.38 2.07 2.64 1.38 2.08 ...
     - 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:3, 1:100, 1:4] 1.38 2.07 2.64 1.38 2.08 ...
      - 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:2, 1:100, 1:2] -0.554 -0.103 -0.542 -0.125 -0.546 ...
      - attr(*, "dimnames")=List of 3
       ..$ : NULL
       ..$ : NULL
       ..$ : chr [1:2] "c1" "c2"
     Bootstrapped change points
      num [1:2, 1:100, 1:5] -2.9 -1.79 -2.87 -1.86 -2.89 ...
      - 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:3, 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 3...
     Segment #1 of 3...done
     Segment #2 of 3...
     Segment #2 of 3...done
     Segment #3 of 3...
     Segment #3 of 3...done
    Field #1 ('tcn') of 4...done
    Field #2 ('dh') of 4...
     Segment #1 of 3...
     Segment #1 of 3...done
     Segment #2 of 3...
     Segment #2 of 3...done
     Segment #3 of 3...
     Segment #3 of 3...done
    Field #2 ('dh') of 4...done
    Field #3 ('c1') of 4...
     Segment #1 of 3...
     Segment #1 of 3...done
     Segment #2 of 3...
     Segment #2 of 3...done
     Segment #3 of 3...
     Segment #3 of 3...done
    Field #3 ('c1') of 4...done
    Field #4 ('c2') of 4...
     Segment #1 of 3...
     Segment #1 of 3...done
     Segment #2 of 3...
     Segment #2 of 3...done
     Segment #3 of 3...
     Segment #3 of 3...done
    Field #4 ('c2') of 4...done
    Bootstrap statistics
     num [1:3, 1:4, 1:4] 1.38 2.06 2.62 1.38 2.06 ...
     - 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:3, 1:4, 1:4] 1.38 2.06 2.62 1.38 2.06 ...
      - 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.3859, range=[1.38036,1.39252], n=7599
      Seg   2. mean=2.0704, range=[2.05908,2.08526], n=2668
      Seg   3. mean=2.6341, range=[2.62114,2.65017], n=4391
     Field #1 ('tcn') of 4...done
     Field #2 ('dh') of 4...
      Seg   1. mean=0.5237, range=[0.51506,0.535004], n=2111
      Seg   2. mean=0.1542, range=[0.143236,0.161681], n=774
      Seg   3. mean=0.2512, range=[0.242519,0.262499], n=1311
     Field #2 ('dh') of 4...done
     Field #3 ('c1') of 4...
      Seg   1. mean=0.330052, range=[0.322313,0.336796], n=2111
      Seg   2. mean=0.875572, range=[0.867614,0.889196], n=774
      Seg   3. mean=0.986207, range=[0.971778,0.997869], n=1311
     Field #3 ('c1') of 4...done
     Field #4 ('c2') of 4...
      Seg   1. mean=1.05585, range=[1.04793,1.06446], n=2111
      Seg   2. mean=1.19483, range=[1.1816,1.20663], n=774
      Seg   3. mean=1.64789, range=[1.63616,1.66527], n=1311
     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:2, 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 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #1 ('alpha') of 5...done
    Field #2 ('radius') of 5...
     Changepoint #1 of 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #2 ('radius') of 5...done
    Field #3 ('manhattan') of 5...
     Changepoint #1 of 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #3 ('manhattan') of 5...done
    Field #4 ('d1') of 5...
     Changepoint #1 of 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #4 ('d1') of 5...done
    Field #5 ('d2') of 5...
     Changepoint #1 of 2...
     Changepoint #1 of 2...done
     Changepoint #2 of 2...
     Changepoint #2 of 2...done
    Field #5 ('d2') of 5...done
    Bootstrap statistics
     num [1:2, 1:4, 1:5] -2.92 -1.85 -2.92 -1.84 -2.87 ...
     - 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 143926517         7599  1.3859         2111
  2          1     2    1 143926517 185449813         2668  2.0704          774
  3          1     3    1 185449813 247137334         4391  2.6341         1311
    tcnNbrOfHets dhNbrOfLoci dhMean    c1Mean   c2Mean
  1         2111        2111 0.5237 0.3300521 1.055848
  2          774         774 0.1542 0.8755722 1.194828
  3         1311        1311 0.2512 0.9862070 1.647893
  > plotTracks(fit)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Calling segments in allelic balance (AB) and
  > # in loss-of-heterozygosity (LOH)
  > # NOTE: Ideally, this should be done on whole-genome data
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > fit <- callAB(fit, verbose=-10)
  Error in loadNamespace(name) : there is no package called 'Hmisc'
  Calls: callAB ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
  Execution halted