Last data update: 2014.03.03
R: CNV.fit
CNV.fit
Description
Normalize query sample intensities by fitting intensities to reference set using a linear regression model.
Usage
CNV.fit(query, ref, anno, ...)
## S4 method for signature 'CNV.data,CNV.data,CNV.anno'
CNV.fit(query, ref, anno, name = NULL,
intercept = TRUE)
Arguments
query
CNV.data
object of query sample (single sample).
ref
CNV.data
object of reference set.
anno
CNV.anno
object. Use CNV.create_anno
do create.
...
Additional parameters (CNV.fit
generic, currently not used).
name
character. Optional parameter to set query sample name.
intercept
logical. Should intercept be considered? Defaults to TRUE
.
Details
The log2 ratio of query intensities versus a linear combination of reference set intensities that best reflects query intensities is calculated (as determined by linear regression). The annotations provided to CNV.fit
are saved within the returned CNV.analysis
object and used for subsequent analysis steps.
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.fit.Rd_%03d_medium.png", width=480, height=480)
> ### Name: CNV.fit
> ### Title: CNV.fit
> ### Aliases: CNV.fit CNV.fit,CNV.data,CNV.data,CNV.anno-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:05:07 2016
@name : GroupB_1
@anno : 22 chromosomes, 470870 probes, 15833 bins
@fit : available (noise: 0.237)
@bin : unavailable, run CNV.bin
@detail : unavailable, run CNV.detail
@seg : unavailable, run CNV.segment
> show(x)
CNV analysis object
created : Wed Jul 6 14:05:07 2016
@name : GroupB_1
@anno : 22 chromosomes, 470870 probes, 15833 bins
@fit : available (noise: 0.237)
@bin : unavailable, run CNV.bin
@detail : unavailable, run CNV.detail
@seg : unavailable, run CNV.segment
>
> # 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
>