Commits

Sean Davis  committed f2266c1

First commit

  • Participants

Comments (0)

Files changed (21)

+Package: CheungSubsetCelData
+Type: Package
+Title: Container for a few .CEL files from Cheung 2005
+Version: 1.0
+Date: 2013-06-22
+Author: Sean Davis 
+Maintainer: Sean Davis <sdavis2@mail.nih.gov>
+Description: This packages exists to contain a subset of .CEL files
+ 	     from Cheung et al., 2005, for data preprocessing exercises.
+License: GPL-2
+exportPattern("^[[:alpha:]]+")

File data/samples.rda

Binary file added.

File inst/doc/.#Cheung.Rnw

+sdavis@nci-01856172-ml.home.65190

File inst/doc/Cheung.Rnw

+\documentclass{article}
+\usepackage{hyperref}
+
+\author{Sean Davis}
+\title{Working with Affymetrix Expression Array Data}
+\date{\today}
+
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+Our tasks in this tutorial are to:
+
+\begin{itemize}
+  \item{Load affymetrix data from raw .cel files}
+  \item{Use exploratory data analysis to examine the raw data}
+  \item{Process the array data to produce normalized data that can be used for further analysis (differential expression)}
+  \item{Examine the effects of different normalization approaches}
+\end{itemize}
+
+We are going to be loading the affymetrix .CEL files from an old paper described by the abstract:
+
+\begin{quote}
+  Natural variation in gene expression is extensive in humans and other organisms, and variation in the baseline expression level of many genes has a heritable component. To localize the genetic determinants of these quantitative traits (expression phenotypes) in humans, we used microarrays to measure gene expression levels and performed genome-wide linkage analysis for expression levels of 3,554 genes in 14 large families. For approximately 1,000 expression phenotypes, there was significant evidence of linkage to specific chromosomal regions. Both cis- and trans-acting loci regulate variation in the expression levels of genes, although most act in trans. Many gene expression phenotypes are influenced by several genetic determinants. Furthermore, we found hotspots of transcriptional regulation where significant evidence of linkage for several expression phenotypes (up to 31) coincides, and expression levels of many genes that share the same regulatory region are significantly correlated. The combination of microarray techniques for phenotyping and linkage analysis for quantitative traits allows the genetic mapping of determinants that contribute to variation in human gene expression. \cite{morley}
+\end{quote}
+
+
+\subsection{Installation of the CheungSubsetCelData Package}
+
+This tutorial package can be installed into R using the following command (paste into R)
+
+<<eval=FALSE>>=
+install.packages('CheungSubsetCelData',
+  contriburl=contrib.url('http://watson.nci.nih.gov/~sdavis/software/R',
+  type='source'),type='source')
+@ 
+
+
+\section{Getting Started}
+
+We are going to be using one of several packages for dealing with affymetrix data, the \texttt{affy} package.  This package is applicable to 3'-biased arrays we will be using here.  Other packages dealing with affymetrix arrays can be found at this url: \url{http://www.bioconductor.org/help/workflows/arrays/}.
+
+\subsection{Install the affy package}
+
+Affymetrix data are stored on the disk in a single file per sample in a format called .CEL.  This format can be either binary or text.  Thankfully, there is a Bioconductor package, the \texttt{affy} package \cite{gautier}, that knows all about .CEL files and how to load them.  We will be installing the \texttt{affy} package as a first step.
+
+<<installaffy,eval=false>>=
+library(BiocInstaller)
+biocLite('affy')
+@ 
+
+Remember that if you have not installed Bioconductor base packages first, the above command may fail.  If that happens, head back to the Bioconductor website and start there.
+
+<<loadaffy>>=
+library(affy)
+@ 
+
+To get an overview of the affy package, use:
+
+<<helpaffy,eval=false>>=
+help(package='affy')
+@ 
+
+\subsection{Finding the .CEL files}
+
+The .CEL files for this tutorial are stored in the ``CheungSubsetCelData'' package; packages like this one that contain mainly data and not functionality are called ``data packages'' and are a nice way to simplify management for R.
+
+Once an R package is installed, R can find files in the package using the \texttt{system.file()} function.  Use the R help system to read a bit about \texttt{system.file}, but the directory that stores the .CEL files is here:
+
+<<getdir>>=
+celfilepath = system.file('extdata',package='CheungSubsetCelData')
+celfilepath
+@ 
+
+The \texttt{celfilepath} is the directory on the disk where the .CEL files are located.  Use the \texttt{list.celfiles} function to list the .CEL files in that directory.
+
+<<listcelfiles>>=
+list.celfiles(celfilepath)
+@ 
+
+Read the help page for the \texttt{ReadAffy} function and apply it to the .CEL files in the \texttt{celfilepath} location.
+
+<<readcelfiles>>=
+abatch = ReadAffy(filenames=list.celfiles(celfilepath),
+    celfile.path=celfilepath,compress=TRUE)
+@ 
+
+In order to interpret the array features, the affy package needs to gain access to the ``content design file'' or CDF.  Bioconductor has data packages available for many array types that encapsulate the design information.  As soon as the affy package needs some information from the data package, it will automatically download it.  
+
+<<lookataffybatch>>=
+abatch
+@ 
+
+The \texttt{annotation} accessor function is used to determine the array type after loading affy data into R.  In this case, the array type is the ``hgfocus'' array.
+
+\section{Exploratory Data Analysis}
+
+The first step after loading microarray data is to do some data exploration.  
+
+\textbf{Exercise 1}:  Read the help for ``AffyBatch'' to find an accessor to give you the ``pm'' (perfect match) intensities.  Make a text summary of the resulting matrix.
+
+<<exercise1,echo=false,results=hide>>=
+summary(pm(abatch))
+@ 
+
+\section{histograms}
+
+\textbf{Exercise 2}:  Create a matrix of the \texttt{pm} intensities.  Then, make a histogram of the intensities for the first array.  Is this plot useful to you?  How could you improve it?  (Hint: you might want to transform the data before plotting).
+
+<<exercise2,results=hide,echo=false>>=
+pmmat = pm(abatch)
+hist(pmmat[,1])
+hist(log2(pmmat[,1]))
+@ 
+
+\textbf{Exercise 3}:  Instead of a histogram, make a density plot.  You may want to apply the same trick you applied above.
+
+<<exercise3,results=hide,echo=false>>=
+pmmat = pm(abatch)
+hist(pmmat[,1])
+hist(log2(pmmat[,1]))
+@ 
+
+
+<<results=hide,echo=false>>=
+pmmat = pm(abatch)
+plot(density(pmmat[,1]))
+@ 
+
+\textbf{Exercise 4}:  
+
+\begin{thebibliography}{1}
+
+\bibitem{morley} Morley M, Molony CM, Weber TM, Devlin JL, Ewens KG, Spielman RS, Cheung VG.
+Genetic analysis of genome-wide variation in human gene expression. Nature. 2004 
+Aug 12;430(7001):743-7. PubMed PMID: 15269782.
+
+\bibitem{gautier}   Gautier, L., Cope, L., Bolstad, B. M., and Irizarry, R. A. 2004.
+  affy---analysis of Affymetrix GeneChip data at the probe level.
+  Bioinformatics 20, 3 (Feb. 2004), 307-315.
+
+
+\end{thebibliography}
+
+\end{document}

File inst/extdata/GSM25349.CEL.gz

Binary file added.

File inst/extdata/GSM25350.CEL.gz

Binary file added.

File inst/extdata/GSM25351.CEL.gz

Binary file added.

File inst/extdata/GSM25352.CEL.gz

Binary file added.

File inst/extdata/GSM25353.CEL.gz

Binary file added.

File inst/extdata/GSM25355.CEL.gz

Binary file added.

File inst/extdata/GSM25356.CEL.gz

Binary file added.

File inst/extdata/GSM25357.CEL.gz

Binary file added.

File inst/extdata/GSM25358.CEL.gz

Binary file added.

File inst/extdata/GSM25359.CEL.gz

Binary file added.

File inst/extdata/GSM25360.CEL.gz

Binary file added.

File inst/extdata/GSM25361.CEL.gz

Binary file added.

File inst/extdata/GSM25362.CEL.gz

Binary file added.

File inst/extdata/GSM25363.CEL.gz

Binary file added.

File man/CheungSubsetCelData-package.Rd

+\name{CheungSubsetCelData-package}
+\alias{CheungSubsetCelData-package}
+\alias{CheungSubsetCelData}
+\docType{package}
+\title{
+Simple container for Cheung et al., 2005 .CEL files.
+}
+\description{
+Simple container for Cheung et al., 2005 .CEL files.
+}
+\details{
+\tabular{ll}{
+Package: \tab CheungSubsetCelData\cr
+Type: \tab Package\cr
+Version: \tab 1.0\cr
+Date: \tab 2013-06-22\cr
+}
+}
+\author{
+Sean Davis
+
+Maintainer: Sean Davis <sdavis2@mail.nih.gov>
+}
+\references{
+Morley M, Molony CM, Weber TM, Devlin JL, Ewens KG, Spielman RS, Cheung VG
+Nature. 2004 Aug 12; 430(7001): 743-7
+}
+\keyword{ package }

File man/samples.Rd

+\name{samples}
+\alias{samples}
+\docType{data}
+\title{
+Sample phenodata for Cheung samples.
+}
+\description{
+A simple data.frame describing the Cheung samples.
+}
+\usage{data(samples)}
+\source{
+Data are derived from GSE1485.
+}
+\examples{
+data(samples)
+head(samples)
+}
+\keyword{datasets}