readIllumina {beadarray} | R Documentation |
Uses csv or txt and image files (where available) to load information about each array used in a BeadChip or SAM experiment.
readIllumina(arrayNames=NULL, path=".", textType=".txt", annoPkg="illuminaProbeIDs", beadInfo=NULL, useImages=TRUE, singleChannel=TRUE, targets=NULL, imageManipulation="sharpen", backgroundSize=17, storeXY=TRUE, sepchar="_", dec=".", metrics=FALSE, metricsFile="Metrics.txt", backgroundMethod="subtract", offset=0, normalizeMethod="none", ...)
arrayNames |
character vector containing names of arrays to be read in (if present) |
path |
character string specifying the location of files to be read by the function |
textType |
character string specifiying the extension of the
files which store the bead information (ID, x, y, intensities).
Typically ".txt" or ".csv" . |
annoPkg |
character string specifying the annotation package
for the arrays being read in (only available for certain
expression arrays at present). Default value is
"illuminaProbeIDs" which is not an annotation package, and
indicates that Illumina bead IDs have been used to identify each bead. |
beadInfo |
data.frame specifying bead information, such as probe sequence, Illumina ID, etc. |
useImages |
logical. If TRUE, the foregound and background values are retrieved from the tif images. When FALSE, the intensity values in the text files are used. Note that background values will not be available (set to 0) when FALSE, as the current option in BeadScan is to store background subtracted signals |
singleChannel |
logical. Set to TRUE if the data is single channel (Green) or FALSE for two-colour (both Green and Red data) |
targets |
data.frame containing sample information |
imageManipulation |
Currently the only options here are "none" or "sharpen", which indicates the Illumina sharpening mask will be used prior to foreground averages being calculated |
backgroundSize |
numeric value which defines the size of the n x n box we will use to calculate local background values |
storeXY |
logical scalar, indicating whether the xy coordinates should be stored |
sepchar |
character string which separates row and column in file
name (default value is "_" ) |
dec |
character used in the files for decimal points. The default
value is "." |
metrics |
logical scalar, indicating whether the scanner metrics
file metricsFile is to be read in |
metricsFile |
name of the scanner metrics file |
backgroundMethod |
method to use for background correcting the
data. Options are "none" , "subtract" , "half" ,
"minimum" , "edwards" , "normexp" or "rma" |
offset |
numeric value to add to intensities |
normalizeMethod |
method to use to normalize the background
corrected bead-level data. Options are "none" ,
"quantile" and "vsn" . Note that the normalization occurs
at the bead-level and is only available for two-colour data at this
stage |
... |
other arguments |
This function can be used to read in bead level information using the
raw ./tif and csv ot txt files output by the scanner.
Where sample information is available, the targets
data.frame can
be read in using 'read.table'.
The annoFile
contains information on each bead type on the array.
The csv or txt files are used to specify the location and identity of each bead on the array and must contain columns for the $x$ and $y$ postion of each bead as well as a ProbeID. For two-colour arrays, this information is required for each channel.
The foreground and background intensities of each bead are then calculated and stored separately. For foreground calculations the sharpening mask used by Illumina is used prior to an averaging over the 9 pixels in a 3 x 3 square closest to the bead centre (we can choose to calculate the values obtained without this mask). For the background intensity we look at the pixels in a 17 x 17 square and calculate the mean of the 5 lowest values inside this square. If a bead is particularly close to the edge of the image then it isn't possible to take a 17 x 17 square for sampling. In this case the background value is taken as the mean of all the previous background values and the user is informed that this has been done.
The function creates an BeadLevelList containing foreground and background intensities for each bead on each array.
BeadLevelList object
Mark Dunning, Mike Smith
#BLData = readIllumina() #targets = read.table("targets.txt", header=T) #targets #May take a while to run #BLData.s = readIllumina(arrayNames=target$Institute.Sample.Label, targets=targets) #Create foreground intensities without using sharpening. Should take less time #BLData.ns = readIllumina(arrayNames=targets$Institute.Sample.Label, targets=targets, sharpen=FALSE) #Use a 9 x 9 are around each bead to calculate the background #BLData.ns.9 = readBeadImages(arrayNames=target$Institute.Sample.Label, targets=targets, sharpen=FALSE, backgroundSize=9)