Last data update: 2014.03.03

R: Plot mean expression levels and error bars for one or more...
plotErrorBarsR Documentation

Plot mean expression levels and error bars for one or more probesets

Description

This produces plots of probesets of interest.

Usage

plotErrorBars(
	eset
,	probesets = if(dim(exprs(eset))[1] <= 12) 1:dim(exprs(eset))[1] else 1
,	arrays = 1:dim(pData(eset))[1] # default is to use all
,	xlab = paste(colnames(pData(eset))[1:numOfFactorsToUse(eset)], collapse=":")
,	ylab = "Expression Estimate"
,	xLabels = apply(
                  as.matrix(pData(eset)[arrays,1:numOfFactorsToUse(eset)])
                , 1
                , function(mat){paste(mat, collapse=":")}
                )
,	ylim = NA
,	numOfSEs = qnorm(0.975)
,	globalYlim = FALSE # Not yet implemented!
,	plot_cols = NA
,	plot_rows = NA
,	featureNames = NA
,	showGeneNames = FALSE
,	showErrorBars = if(
					length(assayDataElement(eset,"se.exprs"))==0 ||
					length(assayDataElement(eset,"se.exprs")) == sum(is.na(assayDataElement(eset,"se.exprs")))
					) FALSE else TRUE
,	plotColours = FALSE
,	log.it = if(max(exprs(eset)) > 32) TRUE else FALSE
,	eset_comb = NULL
,	jitterWidth = NA
,	qtpcrData = NULL
, ...
)

Arguments

eset

An object of class ExpressionSet. This is the main object being plotted.

probesets

A vector of integers indicating the probesets to be plotted. These integers refer to the row numbers of the eset.

arrays

A vector of integers indicating the arrays to be shown on plots.

xlab

Character string of title to appear on x-axis

ylab

Character string of title to appear on y-axis

xLabels

Vector of strings for labels of individual points on x-axis.

ylim

2-element numeric vector showing minimum and maximum values for y-axis.

numOfSEs

Numeric indicating the scaling for the error bars. The default value give error bars that include 95% of expected values.

globalYlim

Not yet implemented!

plot_cols

Integer specifying number of columns for multi-figure plot.

plot_rows

Integer specifying number of rows for multi-figure plot.

featureNames

A vector of strings for featureNames (Affy IDs). This is an alternative (to the probesets argument) way of specifying probe sets.

showGeneNames

Boolean indicating whether to use Affy IDs as titles for each plot.

showErrorBars

Boolean indicating whether error bars should be shown on plots.

plotColours

A vector of colours to plot.

log.it

Boolean indicating whether expression values should be logged.

eset_comb

An object of class ExpressionSet. This is a secondary object to be plotted on the same charts as eset. This should be an object created using pumaComb and pumaCombImproved which holds the values created by combining information from the replicates of each condition.

jitterWidth

Numeric indicating the x-axis distance between replicates of the same condition.

qtpcrData

A 2-column matrix of qRT-PCR values (or other data to be plotted on the same charts).

...

Additional arguments to be passed to plot.

Value

This function has no return value. The output is the plot created.

Author(s)

Richard D. Pearson

Examples

	#	Next 4 lines commented out to save time in package checks, and saved version used
    # if (require(affydata)) {
	#	data(Dilution)
	#	eset_mmgmos <- mmgmos(Dilution)
	# }
	data(eset_mmgmos)
	plotErrorBars(eset_mmgmos)
	plotErrorBars(eset_mmgmos,1:6)

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(puma)
Loading required package: oligo
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: oligoClasses
Welcome to oligoClasses version 1.34.0
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: Biostrings
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: XVector
================================================================================
Welcome to oligo version 1.36.1
================================================================================
Loading required package: mclust
Package 'mclust' version 5.2
Type 'citation("mclust")' for citing this R package in publications.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/puma/plotErrorBars.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotErrorBars
> ### Title: Plot mean expression levels and error bars for one or more
> ###   probesets
> ### Aliases: plotErrorBars
> ### Keywords: hplot
> 
> ### ** Examples
> 
> 	#	Next 4 lines commented out to save time in package checks, and saved version used
>     # if (require(affydata)) {
> 	#	data(Dilution)
> 	#	eset_mmgmos <- mmgmos(Dilution)
> 	# }
> 	data(eset_mmgmos)
> 	plotErrorBars(eset_mmgmos)
> 	plotErrorBars(eset_mmgmos,1:6)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>