R: Produce scatterplots of the hybridization, with strongest dye...
dyebias.rgplot
R Documentation
Produce scatterplots of the hybridization, with strongest dye
biases highlighted.
Description
Plots the log_2(R) vs. log_2(G) (or alternatively M vs. A)
signal of one slide, highlighting the reporters with the strongest red
and green dye bias. Two lines indicate two-fold change. See also
Margaritis et al. (2009), Fig. 1
The index of the slide to plot; must be > 1, and < maNsamples(data)
iGSDBs
A data frame with intrinsic gene-specific dye biases,
the same as that used in dyebias.apply.correction,
probably returned by dyebias.estimate.iGSDBs; see
there for documentation.
dyebias.percentile
The percentile of intrinsic gene specific dye biases (iGSDBs) for
which to highlight the reporters.
application.subset
The set of reporters that was eligible for dye bias correction; same
argument as for dyebias.apply.correction.
output
Specifies the output. If NULL, the existing
output device is used; if output is one of "X11",
"windows", "quartz",
a new X11 (Unix)/windows (Windows)/quartz (Mac) device is created.
If output is a string ending in one of ".pdf", ".png",
".eps", ".ps" is given, a file of that name and type is created and
closed afterwards.
xlim,ylim, xticks, yticks,pch,cex,cex.lab
Graphical parameters; see par()
...
Other arguments (such as main etc.) are passed on to plot().
Value
None.
Note
The highlighted spots are all spots with an iGSDB that lies
in the top- or bottom- dyebias.percentile of iGSDBS. That is, not just
the estimator genes are highlighted.
Margaritis, T., Lijnzaad, P., van Leenen, D., Bouwmeester, D.,
Kemmeren, P., van Hooff, S.R and Holstege, F.C.P. (2009).
Adaptable gene-specific dye bias correction for two-channel DNA microarrays.
Molecular Systems Biology, 5:266, 2009. doi: 10.1038/msb.2009.21.
## show both an RG-plot and an MA-plot of the uncorrected data and the
## corrected data next to each other.
slide <- 3 # or any other other, of course
layout(matrix(1:4, nrow=2,ncol=2, byrow=TRUE))
dyebias.rgplot(data=data.norm,
slide=slide,
iGSDBs=iGSDBs.estimated, # from dyebias.estimate.iGSDBs
main=sprintf("RG-plot, uncorrected, slide %d", slide),
output=NULL)
dyebias.rgplot(data=correction$data.corrected,
slide=slide,
iGSDBs=iGSDBs.estimated,
main=sprintf("RG-plot, corrected, slide %d", slide),
output=NULL)
dyebias.maplot(data=data.norm,
slide=slide,
iGSDBs=iGSDBs.estimated,
main=sprintf("MA-plot, uncorrected, slide %d",slide),
output=NULL)
dyebias.maplot(data=correction$data.corrected,
slide=slide,
iGSDBs=iGSDBs.estimated,
main=sprintf("MA-plot, corrected, slide %d",slide),
output=NULL)
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(dyebias)
Loading required package: marray
Loading required package: limma
Loading required package: Biobase
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 object is masked from 'package:limma':
plotMA
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
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/dyebias/dyebias.rgplot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dyebias.rgplot
> ### Title: Produce scatterplots of the hybridization, with strongest dye
> ### biases highlighted.
> ### Aliases: dyebias.rgplot dyebias.maplot
> ### Keywords: hplot misc
>
> ### ** Examples
>
>
> ## Don't show:
> options(stringsAsFactors = FALSE)
>
> library(dyebias)
> library(dyebiasexamples)
Loading required package: GEOquery
Setting options('download.file.method.GEOquery'='auto')
Setting options('GEOquery.inmemory.gpl'=FALSE)
> data(data.raw)
> data(data.norm)
>
> ### obtain estimate for the iGSDBs:
> iGSDBs.estimated <- dyebias.estimate.iGSDBs(data.norm,
+ is.balanced=TRUE,
+ verbose=FALSE)
>
>
> ### choose the estimators and which spots to correct:
> estimator.subset <- dyebias.umcu.proper.estimators(maInfo(maGnames(data.norm)))
>
> application.subset <- maW(data.norm) == 1 & dyebias.application.subset(data.raw=data.raw, use.background=TRUE)
>
> ### do the correction:
> correction <- dyebias.apply.correction(data.norm=data.norm,
+ iGSDBs = iGSDBs.estimated,
+ estimator.subset=estimator.subset,
+ application.subset = application.subset,
+ verbose=FALSE)
>
>
> ## End(Don't show)
>
> ## show both an RG-plot and an MA-plot of the uncorrected data and the
> ## corrected data next to each other.
>
> slide <- 3 # or any other other, of course
>
> layout(matrix(1:4, nrow=2,ncol=2, byrow=TRUE))
>
> dyebias.rgplot(data=data.norm,
+ slide=slide,
+ iGSDBs=iGSDBs.estimated, # from dyebias.estimate.iGSDBs
+ main=sprintf("RG-plot, uncorrected, slide %d", slide),
+ output=NULL)
>
> dyebias.rgplot(data=correction$data.corrected,
+ slide=slide,
+ iGSDBs=iGSDBs.estimated,
+ main=sprintf("RG-plot, corrected, slide %d", slide),
+ output=NULL)
>
>
> dyebias.maplot(data=data.norm,
+ slide=slide,
+ iGSDBs=iGSDBs.estimated,
+ main=sprintf("MA-plot, uncorrected, slide %d",slide),
+ output=NULL)
>
> dyebias.maplot(data=correction$data.corrected,
+ slide=slide,
+ iGSDBs=iGSDBs.estimated,
+ main=sprintf("MA-plot, corrected, slide %d",slide),
+ output=NULL)
>
>
>
>
>
> dev.off()
null device
1
>