Learn R Programming

beadarrayMSV (version 1.0.3)

readBeadSummaryOutput: Read bead-summary intensities from two colour Illumina (Infinium) scanner

Description

Reads text-files with bead summary output for each array and arranges the data in a "BeadSetIllumina" object

Usage

readBeadSummaryOutput(arrayNames = NULL, path = ".",
    pattern = "beadTypeFile.txt", recursive = FALSE, sep = ",",
    fullPaths = NULL, sepchar = "_")

Arguments

arrayNames
Character vector containing names of arrays to be read. If fullPaths is specified, arrayNames searches only among these, otherwise it searches in current working directory. More commonly arrayNames is
path
Character string specifying the data-directory
pattern
Character string specifying the file-name ending of the files to be read
recursive
If fullPaths is not specified, the logical recursive regulates whether or not the function should look for files recursively
sep
Delimiter in text-files
fullPaths
Character vector containing the names of the files of interest, including the directories in which they are found (from the working directory path). Typically on a form similar to /__. Useful
sepchar
Character used to bind togeher different parts of the file-names (_ in the above example)

Value

  • "BeadSetIllumina" object, with the assayData entries
  • RMean red signal ("Mean RED")
  • se.RStandard error of the mean red signal ("Dev RED"/sqrt("N"))
  • GMean green signal ("Mean GRN")
  • se.GStandard error of the mean green signal ("Dev GRN"/sqrt("N"))
  • no.beadsNumber of detected beads

Details

The scanner protocol must be set to save bead-summary data. The function expects the following data-fields in each file: Illumicode, N, Mean GRN, Dev GRN, Mean RED, Dev RED (in that order). The first two are the bead-type ID and the number of detected beads. The rest contain a robust bead-type mean and the standard deviation of the signal for each channel.

Much of the functionality is adapted from the beadarray package (Dunning et al., 2007). This package is an excellent resource for loading and analysing raw Illumina BeadArray data, including images.

References

M. J. Dunning et al. (2007) beadarray: R classes and methods for Illumina bead-based data. Bioinformatics 23(16):2183-4

See Also

BeadSetIllumina, scatterArrays, preprocessBeadSet, createAlleleSet

Examples

Run this code
#Read a BeadSetIllumina object using files in example data directory
rPath <- system.file("extdata", package="beadarrayMSV")
BSDataRaw <- readBeadSummaryOutput(path=rPath,recursive=TRUE)

#Print information from object
BSDataRaw
pData(BSDataRaw)
varMetadata(BSDataRaw)

#Alternatively:
sampleFile <- paste(rPath,'sampleData.txt',sep='/')
sampleInfo <- read.table(sampleFile,skip=8,sep='\t',header=TRUE,
    colClasses='character')
rownames(sampleInfo) <- make.names(paste(sampleInfo$chip,
    sampleInfo$row,sep='_'))
pattern <- 'beadTypeFile.txt'
fullPaths <- paste(sampleInfo$chip,'/',sampleInfo$chip,'_',
    sampleInfo$row,'_',pattern,sep='')
BSDataRaw <- readBeadSummaryOutput(fullPaths=fullPaths[1:4],
    path=rPath,pattern=pattern)

## Plot G vs. R
dev.new()
scatterArrays(BSDataRaw,smooth=FALSE)

Run the code above in your browser using DataLab