SNPMaP-class {SNPMaP} | R Documentation |
A class of objects for SNP Microarrays and Pooling using Affymetrix arrays.
## 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], ...)
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. |
snpdata
:SNPMaPdata
, either
a matrix
or a FileDoubleMatrix
with probe intensities or Relative Allele Score
(RAS) estimates from the SNPMaP experiment.mismatch
:snpdata
. Contains mismatch probe intensities if they are
present on the microarray and required for analysis.useMM
:logical
, if TRUE
then the mismatch probe intensities
will be subtracted from the perfect match probe intensities during the analysis. Defaults to FALSE
.normalize
:logical
, if TRUE
then the probe intensities will
be quantile normalised across arrays during the analysis. Defaults to FALSE
.logInt
: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
: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
: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
: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
:character
. Gives the current format of the snpdata
.
May be (in order) 'empty', 'raw', 'long', 'short', 'ras' or 'rasS'.chiptype
: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
: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
: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
:character
. A vector of the SNPs being analysed in the
current SNPMaP
object.chps
:character
. A vector of the CEL files in the current analysis.
Defaults to all the files ending '.CEL' in the working directory.cols
:character
. A vector identifying the columns of the snpdata
and mismatch
slots of the current SNPMaP
object.width
:numeric
. The number of quartets per SNP in the current group
of probesets.transformation
:character
. A vector to record transformations carried out
on the data.experiment
:factor
. A factor identifying the experimental group each array
belongs to. Not used at present.annotation
:list
. A slot to hold annotation to be used in the
analysis. Not used at present.created
:character
; the date and time when this SNPMaP
object
was created.version
:character
; the version number of the SNPMaP
package that created this object.majorHistory
:list
. A record of the major functions carried out
on this SNPMaP
object, along with the date and time they were called.signature(x="SNPMaP")
: returns the contents of the snpdata
slot as a matrix
, or, if mm=TRUE
, returns the contents of the mismatch
slot.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
.signature(x="SNPMaP")
: box plot for each array in the snpdata
slot.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.signature(con="SNPMaP")
: if the data in the SNPMaP
object is stored on disk, open a connection.signature(con="SNPMaP")
: if the data is on disk, close the connection.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.signature(.Object="SNPMaP")
: default initialize method.
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.
## 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)