Skip to content

Instantly share code, notes, and snippets.

@stephenturner
Last active August 31, 2018 04:20
Show Gist options
  • Save stephenturner/4165059 to your computer and use it in GitHub Desktop.
Save stephenturner/4165059 to your computer and use it in GitHub Desktop.
Create ExpressionSet object in R from Illumina Beadarray Data
## Stephen Turner
## University of Virginia Bioinformatics Core
## November 28, 2012
## Useful references:
# http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1002276
# http://www.bioconductor.org/help/course-materials/2007/BioC2007/labs/beadarray/BioC2007_beadarray_slides.pdf
# http://www.bioconductor.org/help/course-materials/2007/BioC2007/labs/beadarray/beadarrayBioc07.pdf
## Instructions:
#
# This is a description of how to get Illumina array data from genome studio to R
# using GenomeStudio.
#
# The raw data comes in a directory which includes two subdirectories: “DeCode
# Data” and “Image Directory”.
#
# First open genome studio and create a new Gene Expression project. The dialog
# that pops-up asks for a specification of the gene expression assay type.
# Selected Direct Hyb. You are then asked to define the path to the projects
# repository directory and the project name. Select the Image Directory of your
# data as a repository. You can select the samples you are interested in from the
# array list. Note that you can group samples into groups of replicates, but I
# skip this part, i.e, I leave them ungrouped (do this later in limma). Finish by
# generating the summaries. Note that according to the beadarray vignette you
# should select no background correction.
#
# First we create the “SampleProbeProfile.txt” as follows:
#
# Select the Sample Probe Profile Tab and use the Column Chooser to select the
# ProbeID column and the following columns: AVG_Signal, BEAD_STDERR, Avg_NBEADS,
# Detection Pval. Save the file as “SampleProbeProfile.txt”.
#
# Follow the same procedure on the Control Probe Profile tab (lower left panel)
# and save the output file as: “ControlProbeProfile.txt”.
#
# Now we have the data we need to use the beadarray package.
library(annotate)
library(beadarray)
library(limma)
library(illuminaMousev2.db)
## The data file from GenomeStudio
dataFile="/path/to/SampleProbeProfile.txt"
## The control file from GenomeStudio
qcFile="/path/to//ControlProbeProfile.txt"
## Reading in the file and creating ExpressionSetIllumina object
eset=readBeadSummaryData(dataFile=dataFile, qcFile=qcFile,
ProbeID="PROBE_ID", controlID="ProbeID",
skip=0, qc.skip=0,
annoCols=c("TargetID", "PROBE_ID","SYMBOL"))
## Now continue on with your normal analysis with limma package and annotation with annotate package
@itsyogeshd
Copy link

Hi,

I am facing some problems creating expression set object from bead array. I am doing exactly the same thing but it is giving me the following error.

Error in row.names<-.data.frame(*tmp*, value = value) :
invalid 'row.names' length

Do you have some idea how this can be solved?

Thanks,

Yogesh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment