Learn R Programming

charm (version 2.18.0)

plotDensity: Log-ratio density plot for all probes and control probes

Description

Make density plots of log-ratios for two-color microarray data. Two plots are produced: one for all probes on the array, and a second for the control probes.

Usage

plotDensity(dat, rx = c(-4, 6), controlIndex = NULL, controlProbes=NULL, pdfFile = NULL, main = NULL, lab=NULL, excludeIndex = NULL)

Arguments

dat
a TilingFeatureSet
rx
x-axis range
controlIndex
a vector of non-CpG control probe indices
controlProbes
vector of names used to denote control probes in the 'container' column of the Nimblegen annotation (ndf) file.
pdfFile
name of output pdf file
main
main title
lab
vector of sample labels. If not specified the sample names from dat will be used.
excludeIndex
a numeric vector of probe indices indicating which pm probes to ignore when plotting.

Value

No return value. Called for its side-effect of producing a pdf plot.

Details

This function makes density plots for a) all probes and b) control probes. It is typically called from within methp when a file name is specified for its plotDensity option. The plots are useful for identifying problematic outlier samples.

Examples

Run this code
	if (require(charmData) & require(BSgenome.Hsapiens.UCSC.hg18)) {
		phenodataDir <- system.file("extdata", package="charmData")
		pd <- read.delim(file.path(phenodataDir, "phenodata.txt"))
		# Read in raw data
		dataDir <- system.file("data", package="charmData")
		rawData <- readCharm(path=dataDir, files=pd$filename,
			 sampleKey=pd)
		ctrlIdx <- getControlIndex(rawData, subject=Hsapiens)
                ## Not run:
		#plotDensity(rawData, controlIndex=ctrlIdx, pdfFile="density.pdf")	
	}

Run the code above in your browser using DataLab