R Under development (unstable) (2024-02-16 r85931 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("aroma.cn") Loading required package: R.utils Loading required package: R.oo Loading required package: R.methodsS3 R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help. R.oo v1.26.0 (2024-01-24 05:12:50 UTC) successfully loaded. See ?R.oo for help. Attaching package: 'R.oo' The following object is masked from 'package:R.methodsS3': throw The following objects are masked from 'package:methods': getClasses, getMethods The following objects are masked from 'package:base': attach, detach, load, save R.utils v2.12.3 (2023-11-18 01:00:02 UTC) successfully loaded. See ?R.utils for help. Attaching package: 'R.utils' The following object is masked from 'package:utils': timestamp The following objects are masked from 'package:base': cat, commandArgs, getOption, isOpen, nullfile, parse, use, warnings Loading required package: aroma.core Loading required package: R.filesets R.filesets v2.15.1 (2024-01-24 17:22:49 UTC) successfully loaded. See ?R.filesets for help. Attaching package: 'R.filesets' The following object is masked from 'package:R.utils': validate The following objects are masked from 'package:base': append, readLines Loading required package: R.devices R.devices v2.17.2 (2024-01-29 13:30:11 UTC) successfully loaded. See ?R.devices for help. aroma.core v3.3.0 (2022-11-15 18:30:13 UTC) successfully loaded. See ?aroma.core for help. Attaching package: 'aroma.core' The following objects are masked from 'package:base': .Machine, colMeans, colSums, library, require, write Loading required package: aroma.light aroma.light v3.32.0 (2023-10-24) successfully loaded. See ?aroma.light for help. Attaching package: 'aroma.light' The following objects are masked from 'package:aroma.core': callNaiveGenotypes, normalizeTumorBoost aroma.cn v1.7.1 successfully loaded. See ?aroma.cn for help. > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Build up a tumor CN profile > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > pT <- cnr(1,1000, 2) + + cnr(400,500) + + cnr(600,800) + + cnr(600,700) + + cnr(100,200) - cnr(850,900) > print(pT) CopyNumberRegions: Number of regions: 10 > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Simulate CN signals from this profile > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > cn <- simulateRawCopyNumbers(pT, n=2000, sd=1/2) > print(cn) RawCopyNumbers: Name: Number of rows: 2000 Number of columns: 3 Columns: chromosome [numeric], x [numeric], cn [numeric] Chromosomes: 1 [1] Number of loci: 2000 Position range: [1e+06,1e+09] Mean distance between loci: 499750 > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Plot > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > plot(cn, col="#aaaaaa", ylim=c(0,5)) > drawLevels(pT, col="#ff0000", lwd=3) > > proc.time() user system elapsed 0.68 0.14 0.81