R Under development (unstable) (2024-02-16 r85931 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This test script calls a report generator which requires > # the 'ggplot2' package, which in turn will require packages > # 'colorspace', 'dichromat', 'munsell', 'reshape2' and 'scales'. > > # Only run this test in full testing mode > if (Sys.getenv("_R_CHECK_FULL_") != "") { + library("PSCBS") + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Load SNP microarray data + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + data <- PSCBS::exampleData("paired.chr01") + str(data) + + data <- data.frame(chromosome=data$chromosome, x=data$x, y=data$CT) + + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # CBS segmentation + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Drop single-locus outliers + dataS <- dropSegmentationOutliers(data) + + # Speed up example by segmenting fewer loci + dataS <- dataS[seq(from=1, to=nrow(data), by=5),] + + str(dataS) + + gaps <- findLargeGaps(dataS, minLength=2e6) + knownSegments <- gapsToSegments(gaps) + + # CBS segmentation + fit <- segmentByCBS(dataS, knownSegments=knownSegments, + seed=0xBEEF, verbose=-10) + signalType(fit) <- "ratio" + + # Fake a multi-chromosome segmentation + fit1 <- fit + fit2 <- renameChromosomes(fit, from=1, to=2) + fit <- c(fit1, fit2) + + report(fit, sampleName="CBS", studyName="CBS-Ex", verbose=-10) + + } # if (Sys.getenv("_R_CHECK_FULL_")) > > proc.time() user system elapsed 0.12 0.01 0.14