Last data update: 2014.03.03

R: CNV.segment
CNV.segmentR Documentation

CNV.segment

Description

Segment bin values (wrapper of DNAcopy package).

Usage

CNV.segment(object, ...)

## S4 method for signature 'CNV.analysis'
CNV.segment(object, alpha = 0.001, nperm = 50000,
  min.width = 5, undo.splits = "sdundo", undo.SD = 2.2, verbose = 0,
  ...)

Arguments

object

CNV.analysis object.

...

Additional parameters supplied to the segment method of the DNAcopy package.

alpha

See details. Defaults to 0.001.

nperm

See details. Defaults to 50000.

min.width

See details. Defaults to 5.

undo.splits

See details. Defaults to 'sdundo'.

undo.SD

See details. Defaults to 2.2.

verbose

See details. Defaults to 0.

Details

This method is a wrapper of the CNA, segment, segments.summary and segments.p methods of the DNAcopy package. Please refer to the respective man pages for more detailed information. The default parameters of CNV.segment override some of the default parameters of segment and are optimized for 450k data CNV analysis.

Value

CNV.analysis object.

Author(s)

Volker Hovestadt conumee@hovestadt.bio

Examples

# prepare
library(minfiData)
data(MsetEx)
d <- CNV.load(MsetEx)
data(detail_regions)
anno <- CNV.create_anno(detail_regions = detail_regions)

# create object
x <- CNV.fit(query = d['GroupB_1'], ref = d[c('GroupA_1', 'GroupA_2', 'GroupA_3')], anno)

# modify object
x <- CNV.bin(x)
x <- CNV.detail(x)
x <- CNV.segment(x)

# general information
x
show(x)

# coefficients of linear regression
coef(x)

# show or replace sample name
names(x)
names(x) <- 'Sample 1'

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

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(conumee)
Loading required package: minfi
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: lattice
Loading required package: GenomicRanges
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: Biostrings
Loading required package: XVector
Loading required package: bumphunter
Loading required package: foreach
Loading required package: iterators
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Setting options('download.file.method.GEOquery'='auto')
Setting options('GEOquery.inmemory.gpl'=FALSE)
Loading required package: IlluminaHumanMethylation450kmanifest
Loading required package: IlluminaHumanMethylation450kanno.ilmn12.hg19
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/conumee/CNV.segment.Rd_%03d_medium.png", width=480, height=480)
> ### Name: CNV.segment
> ### Title: CNV.segment
> ### Aliases: CNV.segment CNV.segment,CNV.analysis-method
> 
> ### ** Examples
> 
> # prepare
> library(minfiData)
> data(MsetEx)
> d <- CNV.load(MsetEx)
> data(detail_regions)
> anno <- CNV.create_anno(detail_regions = detail_regions)
using genome annotations from UCSC
getting 450k annotations
 - 470870 probes used
importing regions for detailed analysis
creating bins
 - 53918 bins created
merging bins
 - 15833 bins remaining
> 
> # create object
> x <- CNV.fit(query = d['GroupB_1'], ref = d[c('GroupA_1', 'GroupA_2', 'GroupA_3')], anno)
> 
> # modify object
> x <- CNV.bin(x)
> x <- CNV.detail(x)
> x <- CNV.segment(x)
> 
> # general information
> x
CNV analysis object
   created   : Wed Jul  6 14:06:46 2016
  @name      : GroupB_1
  @anno      : 22 chromosomes, 470870 probes, 15833 bins
  @fit       : available (noise: 0.237)
  @bin       : available (shift: -0.016)
  @detail    : available (20 regions)
  @seg       : available (48 segments)
> show(x)
CNV analysis object
   created   : Wed Jul  6 14:06:46 2016
  @name      : GroupB_1
  @anno      : 22 chromosomes, 470870 probes, 15833 bins
  @fit       : available (noise: 0.237)
  @bin       : available (shift: -0.016)
  @detail    : available (20 regions)
  @seg       : available (48 segments)
> 
> # coefficients of linear regression
> coef(x)
(Intercept)  X.GroupA_1  X.GroupA_2  X.GroupA_3 
-2.34456162  0.88820679  0.08472329 -0.02813503 
> 
> # show or replace sample name
> names(x)
[1] "GroupB_1"
> names(x) <- 'Sample 1'
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>