Last data update: 2014.03.03

R: Plot trajectories of specific QC probes (e.g., biotin,...
plotQCCurvesR Documentation

Plot trajectories of specific QC probes (e.g., biotin, cy3_hyb, housekeeping gene probes, low stringency probes, etc.) across arrays

Description

Plot trajectories of specific QC probes (e.g., biotin, cy3_hyb, housekeeping gene probes, low stringency probes, etc.) across arrays

Usage

plotQCCurves(
    esQC, 
    probes = c("biotin", "cy3_hyb", "housekeeping", 
      "low_stringency_hyb", "signal", "p95p05"), 
    labelVariable = "subjID",
    hybName = "Hybridization_Name",
    reporterGroupName = "Reporter_Group_Name",
    requireLog2 = TRUE, 
    projectName = "test", 
    plotOutPutFlag = FALSE, 
    cex = 1, 
    ylim = NULL, 
    xlab = "", 
    ylab = "intensity", 
    lwd = 3, 
    mar = c(10, 4, 4, 2) + 0.1,
    las = 2,
    cex.axis = 1,
    sortFlag = TRUE,
    varSort = c("Batch_Run_Date", "Chip_Barcode", "Chip_Address"), 
    timeFormat = c("%m/%d/%Y", NA, NA),
    ...)

Arguments

esQC

ExpressionSet object of QC probe profiles. fData(esQC) should contains the variable Reporter_Group_Name.

probes

A character vectors of QC probe names. By default, it includes the following probe names “biotin”, “cy3_hyb”, “housekeeping”, “low_stringency_hyb”, “signal”, “p95p05”. For “signal”, trajectories of 5th, 25th, 50th, 75th, and 95th percentiles of the expression levels of all QC probes will be ploted. For “p95p05”, the trajectory of the ratio of 95th percentile to 5th percentile of the expression levels of all QC probes will be ploted.

labelVariable

A character string. The name of a phenotype data variable use to label the arrays in the boxplots. By default, labelVariable = "subjID" which is equivalent to labelVariable = "Hybridization_Name".

hybName

character string. indicating the phenotype variable Hybridization_Name.

reporterGroupName

character string. indicating feature variable Reporter_Group_Name (QC probe's name).

requireLog2

logical. requiredLog2=TRUE indicates probe expression levels will be log2 transformed. Otherwise, no transformation will be performed.

projectName

A character string. Name of the project. The plots will be saved as pdf format files, the names of which have the format projectName_probeName_traj_plot.pdf.

plotOutPutFlag

logical. plotOutPutFlag=TRUE indicates the plots will be output to pdf format files. Otherwise, the plots will not be output to external files.

cex

numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. see par.

ylim

Range of y axis.

xlab

Label of x axis.

ylab

Label of y axis.

lwd

The line width, a _positive_ number, defaulting to '1'. see par.

mar

A numerical vector of the form 'c(bottom, left, top, right)' which gives the number of lines of margin to be specified on the four sides of the plot. The default is 'c(5, 4, 4, 2) + 0.1'. see par.

las

'las' numeric in 0,1,2,3; the style of axis labels. 0 - always parallel to the axis, 1 - always horizontal, 2 - always perpendicular to the axis, or 3 - always vertical.

see par.

cex.axis

The magnification to be used for axis annotation relative to the current setting of cex.

see par.

sortFlag

logical. Indicates if arrays need to be sorted according to Batch_Run_Date, Chip_Barcode, and Chip_Address.

varSort

A vector of phenotype variable names to be used to sort the samples of es.

timeFormat

A vector of time format for the possible time variables in varSort. The length of timeFormat should be the same as that of varSort. For non-time variable, the corresponding time format should be set to be equal to NA.

...

Arguments to be passed to plot.

Value

no return value.

Author(s)

Weiliang Qiu <stwxq@channing.harvard.edu>, Brandon Guo <brandowonder@gmail.com>, Christopher Anderson <christopheranderson84@gmail.com>, Barbara Klanderman <BKLANDERMAN@partners.org>, Vincent Carey <stvjc@channing.harvard.edu>, Benjamin Raby <rebar@channing.harvard.edu>

Examples

    # generate simulated data set from conditional normal distribution
    set.seed(1234567)
    esQC.sim = genSimData.BayesNormal(nCpGs = 10, 
      nCases = 20, nControls = 20,
      mu.n = -2, mu.c = 2,
      d0 = 20, s02 = 0.64, s02.c = 1.5, testPara = "var",
      outlierFlag = FALSE, 
      eps = 1.0e-3, applier = lapply) 

    print(esQC.sim)

    fDat = fData(esQC.sim)
    esQC.sim$Hybridization_Name = sampleNames(esQC.sim)
    fDat$Reporter_Group_Name = c( rep("biotin", 5),
      rep("housekeeping", 5))
    fData(esQC.sim)=fDat

    # plot trajectories of the QC probes
    plotQCCurves(
      esQC = esQC.sim, 
      probes = c("biotin", "housekeeping"), 
      labelVariable = "subjID",
      hybName = "Hybridization_Name",
      reporterGroupName = "Reporter_Group_Name",
      requireLog2 = FALSE, 
      plotOutPutFlag = FALSE, 
      sortFlag = FALSE)

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(iCheck)
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 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")'.

Loading required package: lumi
Setting options('download.file.method.GEOquery'='auto')
Setting options('GEOquery.inmemory.gpl'=FALSE)
Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/iCheck/plotQCCurves.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotQCCurves
> ### Title: Plot trajectories of specific QC probes (e.g., biotin, cy3_hyb,
> ###   housekeeping gene probes, low stringency probes, etc.) across arrays
> ### Aliases: plotQCCurves
> ### Keywords: methods
> 
> ### ** Examples
> 
>     # generate simulated data set from conditional normal distribution
>     set.seed(1234567)
>     esQC.sim = genSimData.BayesNormal(nCpGs = 10, 
+       nCases = 20, nControls = 20,
+       mu.n = -2, mu.c = 2,
+       d0 = 20, s02 = 0.64, s02.c = 1.5, testPara = "var",
+       outlierFlag = FALSE, 
+       eps = 1.0e-3, applier = lapply) 
> 
>     print(esQC.sim)
ExpressionSet (storageMode: lockedEnvironment)
assayData: 10 features, 40 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: subj1 subj2 ... subj40 (40 total)
  varLabels: arrayID memSubj
  varMetadata: labelDescription
featureData
  featureNames: probe1 probe2 ... probe10 (10 total)
  fvarLabels: probe gene chr memGenes
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation:  
> 
>     fDat = fData(esQC.sim)
>     esQC.sim$Hybridization_Name = sampleNames(esQC.sim)
>     fDat$Reporter_Group_Name = c( rep("biotin", 5),
+       rep("housekeeping", 5))
>     fData(esQC.sim)=fDat
> 
>     # plot trajectories of the QC probes
>     plotQCCurves(
+       esQC = esQC.sim, 
+       probes = c("biotin", "housekeeping"), 
+       labelVariable = "subjID",
+       hybName = "Hybridization_Name",
+       reporterGroupName = "Reporter_Group_Name",
+       requireLog2 = FALSE, 
+       plotOutPutFlag = FALSE, 
+       sortFlag = FALSE)
probes>>
[1] "biotin"       "housekeeping"


********** k= 1  *******
QC probe= biotin 

********** k= 2  *******
QC probe= housekeeping 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>