SNPMaP-class {SNPMaP}R Documentation

Class SNPMaP

Description

A class of objects for SNP Microarrays and Pooling using Affymetrix arrays.

Usage

## S4 method for signature 'SNPMaP':
as.matrix(x, mm=FALSE, ...)
## S4 method for signature 'SNPMaP, missing':
plot(x, FUN=function(x){x}, xlim=c(loX, hiX), ylim=c(0, hiY), xlab="guess",
                ylab="Density", main=x@table, col=rainbow(length(x@chps)),
                legend.position="left", legend.bty="n", lty=1:length(x@chps),
                zero.line=TRUE, ...)
## S4 method for signature 'SNPMaP':
boxplot(x, FUN=function(x){x}, ylab="guess", main=x@table, ...)
## S4 method for signature 'SNPMaP':
image(x, chips=x@chps, prompt=FALSE, FUN=log, col=grey(seq(0,1,0.01)), fastRender=4,
                                rows=x@celDim[1], cols=x@celDim[2], ...)

Arguments

x object of class SNPMaP.
mm logical indicating whether the data in the mismatch slot should be returned instead.
FUN function specifying how each data point should be transformed before plotting. Try log for probe intensity data.
xlim the x limits (x1, x2) of the plot. Note that x1 > x2 is allowed and leads to a 'reversed axis'.
ylim the y limits of the plot.
xlab character; a label for the x axis, defaults to a description of x.
ylab character; a label for the y axis, defaults to a description of y.
main character; a main title for the plot.
col the colours for the lines.
legend.position position of the legend in the pane to the right of the graph.
legend.bty the type of box to be drawn around the legend. The allowed values are "o" and "n".
lty the line type.
zero.line logical; if TRUE, add a base line at y = 0
chips character or numeric; the arrays to be imaged from the chps slot.
prompt logical indicating whether the user should be asked before moving on to the next image.
fastRender numeric n indicating 1/n rows and columns should be imaged.
rows numeric; the number of rows of probes on the array.
cols numeric; the number of columns of probes on the array.
... additional arguments passed to methods.

Slots

snpdata:
Object of class SNPMaPdata, either a matrix or a FileDoubleMatrix with probe intensities or Relative Allele Score (RAS) estimates from the SNPMaP experiment.
mismatch:
As snpdata. Contains mismatch probe intensities if they are present on the microarray and required for analysis.
useMM:
Object of class logical, if TRUE then the mismatch probe intensities will be subtracted from the perfect match probe intensities during the analysis. Defaults to FALSE.
normalize:
Object of class logical, if TRUE then the probe intensities will be quantile normalised across arrays during the analysis. Defaults to FALSE.
logInt:
Object of class logical, if TRUE then the raw probe intensities from the array will be replaced with the natural log of the intensities during the analysis. Defaults to FALSE.
summary:
Object of class function, the function that will be used to summarise the vector of RAS scores from all the quartets corresponding to a single SNP within an array into a single statistic per SNP per array. Should accept a numeric vector comprising doubles between 0 and 1 and NA and return a single value. Defaults to qcMean.
lowMemory:
Object of class logical, if TRUE then the analysis will attempt to minimise the amount of RAM used by storing the snpdata and mismatch matricies as objects of class FileDoubleMatrix (see the link[R.huge:R.huge-package]{R.huge} package) on disk at the location named in the tempDir slot. Defaults to TRUE.
tempDir:
Object of class character. Names the location of a writable directory where lowMemory versions of the snpdata and mismatch matricies may be stored. Defaults to '.' (ie the working directory).
table:
Object of class character. Gives the current format of the snpdata. May be (in order) 'empty', 'raw', 'long', 'short', 'ras' or 'rasS'.
chiptype:
Object of class character naming the type of array involved in this analysis ('Mapping250K_Sty', for example). The arrays in a SNPMaP object must be of a single chiptype.
celDim:
Object of class numeric vector of two giving the number of rows and columns of probes on the chip. Read from the CEL header by cel2raw(), used for pseudo images of arrays.
set:
Object of class numeric. Several of the Affymetrix chips have groups of probesets with different numbers of quartets. For example, the Mapping250K_Sty array has probesets comprising 6 or 10 quartets. set specifies which group of probes are to be included in the current SNPMaP object. It defaults to 1, which corresponds to the largest group of probes on the array (ie those with 6 quartets on the Mapping250K_Sty). Further groups can be accessed by setting set to 2 or higher. For more information, see SNPMaP.cdm-package.
snps:
Object of class character. A vector of the SNPs being analysed in the current SNPMaP object.
chps:
Object of class character. A vector of the CEL files in the current analysis. Defaults to all the files ending '.CEL' in the working directory.
cols:
Object of class character. A vector identifying the columns of the snpdata and mismatch slots of the current SNPMaP object.
width:
Object of class numeric. The number of quartets per SNP in the current group of probesets.
transformation:
Object of class character. A vector to record transformations carried out on the data.
experiment:
Object of class factor. A factor identifying the experimental group each array belongs to. Not used at present.
annotation:
Object of class list. A slot to hold annotation to be used in the analysis. Not used at present.
created:
Object of class character; the date and time when this SNPMaP object was created.
version:
Object of class character; the version number of the SNPMaP package that created this object.
majorHistory:
Object of class list. A record of the major functions carried out on this SNPMaP object, along with the date and time they were called.

Methods

as.matrix
signature(x="SNPMaP"): returns the contents of the snpdata slot as a matrix, or, if mm=TRUE, returns the contents of the mismatch slot.
plot
signature(x="SNPMaP", y="missing"): plots the density of the contents of the snpdata slot, with each array represented by a single line identified in a legend. Uses layout.
boxplot
signature(x="SNPMaP"): box plot for each array in the snpdata slot.
image
signature(x="SNPMaP"): if the object is in 'raw' format, draws a pseudo image of the array as it was scanned to check for artefacts.
open
signature(con="SNPMaP"): if the data in the SNPMaP object is stored on disk, open a connection.
close
signature(con="SNPMaP"): if the data is on disk, close the connection.
summary
signature(object="SNPMaP"): summary of the SNPMaP object.
[
signature(x="SNPMaP", i="missing", j="missing"): Extract subsets of the data contained in the snpdata slot of the SNPMaP object. Using a single index ([] rather than [,]) returns rows.
[
signature(x="SNPMaP", i="ANY", j="missing"): see above.
[
signature(x="SNPMaP", i="missing", j="ANY"): see above.
[
signature(x="SNPMaP", i="ANY", j="ANY"): see above.
initialize
signature(.Object="SNPMaP"): default initialize method.

See Also

SNPMaP-package.
SNPMaP.cdm-package.
snpmap() to set up a SNPMaP analysis.
disk2memory() to transfer SNPMaP objects between disk and memory.
cel2ras() for workflow functions.
cloneSNPMaP() to copy a SNPMaP object on disk.
writeSNPMaP() to write SNPMaP objects to text files.

Examples

## Not run: 
 ## Getting started
 ## Creates the 'raw' SNPMaP object x on disk with mismatch probes included
 x<-snpmap(useMM=TRUE, RUN='cel2raw', lowMemory=TRUE)
 ## Print a summary of the SNPMaP object
 summary(x)
 ## Add a comment (prints in the summary)
 comment(x)<-'High and low extreme pools from January'
 ## View pseudo image to screen for artefacts
 image(x)
 ## Plot probe intensities
 plot(x, FUN=log)
 boxplot(x, FUN=log)
 ## tidy=TRUE removes the FileDoubleMatrix from the old x to keep the disk tidy
 x<-raw2ras(x, tidy=TRUE)
 ## Plot Relative Allele Scores
 plot(x)
 ## Default tidy=FALSE does not remove the original FileDoubleMatrix from disk
 ## Useful if you want to keep x (no side effects)
 y<-ras2rasS(x)
 ## View the first ten rows
 as.matrix(y[1:10,])
 ## View a set of SNPs
 as.matrix(y[c("SNP_A-4192909", "SNP_A-4192918"),])
 ## Transfer the SNPMaP object from disk to memory
 y<-disk2memory(y, tidy=TRUE)
 ## Run the analysis again from CEL files to RAS summaries without viewing intermediate stages
 ## This time in memory (may require a lot of RAM)
 z<-snpmap(useMM=TRUE, RUN='cel2rasS', lowMemory=FALSE)
 plot(z)
 ## Get the RAS summary scores as a standard matrix
 rasSummaries<-as.matrix(z)
 ## Read all the sets into a list
 allSets<-msnpmap(set=0)
## End(Not run)

[Package SNPMaP version 1.0.2 Index]