%\VignetteDepends{}
%\VignetteIndexEntry{The Bioconductor Project}
%\VignettePackage{IWB2011}

\documentclass{beamer}

\usepackage{BioconductorSlides}
\SweaveOpts{keep.source=TRUE, eval=TRUE}

\title{The Bioconductor Project for Reproducible Analysis of High
  Throughput Genomic Data}
\author{Martin Morgan
  (\href{mailto:mtmorgan@fhcrc.org}{mtmorgan@fhcrc.org}) \\ 
  Fred Hutchinson Cancer Research Center}
\date{19-21 January, 2011}

\begin{document}

<<setup, echo=FALSE>>=
options(width = 40)
@ 

\frame{\titlepage}

\begin{frame}{Analysis and Comprehension of High Throughput Genomic Data}
  Hallmarks of effective computational software
  \begin{enumerate}
  \item Extensive: data, annotation
  \item Statistical: volume, technology, experimental design
  \item Reproducible: long-term, multi-participant science
  \item Leading edge: novel, technology-driven
  \item Accessible: affordable, transparent, usable
  \end{enumerate}
\end{frame}

\section{Extensive}

\begin{frame}{1. Extensive Data and Annotation}
  Data
  \begin{itemize}
  \item Expression, tiling, methylation, custom arrays.
  \item Sequence analysis, e.g., ChIP-, RNA-seq
  \item Other high-throughput assays, e.g., flow cytometry, mass
    spec., imaging
  \item Public repositories, e.g., GEO, ArrayExpress
  \end{itemize}
  Annotation, e.g.,
  \begin{itemize}
  \item Well-curated: NCBI, Biomart, UCSC, MsigDB, GO, KEGG
  \item Loosely curated: emerging, specialized, \& lab-based
  \item Consortium: HapMap, 1000 genomes, TCGA
  \end{itemize}
  %% Research questions, e.g.,
  %% \begin{itemize}
  %% \item Gene expression in cancer vs.\ normal samples
  %% \item Regulatory elements: miRNA microarrays; ChIP-seq
  %% \end{itemize}
\end{frame}

%% \begin{frame}{Extensive Data and Annotation: Examples}
%%   \begin{columns}
%%     \column{.5\textwidth}
%%     \textbf<1>{Data types}
%%     \begin{itemize}
%%     \item Expression micro-arrays
%%     \item High-throughput sequencing
%%     \end{itemize}
%%     \textbf<2>{Research questions}
%%     \begin{itemize}
%%     \item Gene expression in cancer vs.\ normal samples
%%     \item Regulatory elements: miRNA microarrays; ChIP-seq
%%     \end{itemize}
%%     \column{.5\textwidth}
%%     %% Data
%%     \only<1>{
%%       \includegraphics[width=\textwidth,height=!]{Solexa-bridge-pcr.jpg}
%%       \par
%%       Bentley et al., 2008, Nature 456: \href{http://www.ncbi.nlm.nih.gov/pubmed/18987734}{53-9}
%%     }
%%     %% Research questions
%%     \only<2>{
%%       \includegraphics[width=\textwidth,height=!]{chip.pdf}
%%       \par Park, 2009, Nat Rev Genet 10: \href{http://www.nature.com/nrg/journal/v10/n10/abs/nrg2641.html}{669-80}
%%     }
%%   \end{columns}
%% \end{frame}

\begin{frame}{\Bioconductor}
  \begin{description}
  \item[Goal] Help biologists understand their data
  \item[Focus]
    \begin{itemize}
    \item Expression and other microarray; flow cytometry
    \item High-throughput sequencing
    \end{itemize}
  \item[Themes]
    \begin{itemize}
    \item Contributions from `core' members and (primarily academic)
      user community
    \item Based on the \R{} programming language -- statistics,
      visualization, interoperability
    \item Reproducible -- scripts, \emph{vignettes}, packages
    \item Open source / open development
    \end{itemize}
  \item[Success] $>400$ packages; publications; 8,000 web visits /
    week; 75,000 unique IP downloads / year; very active mailing list;
    annual conferences; courses; \ldots
  \end{description}
\end{frame}

\begin{frame}[fragile]{\Bioconductor: Sample Work Flow}

<<comprehensive, eval=FALSE>>=
## 
## Pre-processing
library(affy)
eset <- just.rma()
## 
## Quality assessment
library(arrayQualityMetrics)
arrayQualityMetrics(eset)
## 
## Differential expression
library(limma)
status <- 
  c("Trt", "Trt", "Trt", "Ctrl", "Ctrl", "Ctrl")
design <- model.matrix( ~status )
fit <- eBayes(lmFit(eset, design))
topTable(fit, coef=2)
@     
  
\end{frame}

%% Example: genes -> GO; at end

\section{Statistical}

\begin{frame}{\only<1>{2. }Statistical}
  \begin{columns}
    \column{.5\textwidth}
    \textbf<2>{Technology}
    \begin{itemize}
    \item Acknowledging artifacts and biases
    \item Accomodate using statistical models, e.g., RMA
    \end{itemize}
    \textbf<3-4>{Volume of data}
    \begin{itemize}
    \item Data reduction essential
    \end{itemize}
    \textbf<5>{Experimental design}
    \begin{itemize}
    \item Exploratory analysis
    \item Hypothesis-driven; designed experiments
    \item Cost-effective, but not too clever
    \end{itemize}
    \column{.5\textwidth}
    \begin{overprint}
      %% Technology
      \only<1>{
        \includegraphics[width=\textwidth,height=!]{Affymetrix1}

        \par\noindent Expression array. Pseudocolors represent
        hybridisation intensities of RNA to features. Source:
        \href{http://www.cancersciences.bham.ac.uk/services/Affymetrix.shtml}{url}

      }
      \only<2>{
        \includegraphics[width=\textwidth,height=!]{R_bioc_intro-boxplotgcc}
        \par\noindent Measured intensity increases with GC content;
        Chronic Lymphocytic Leukemia (CLL) dataset.
      }
      \only<3>{
        \includegraphics[width=\textwidth,height=!]{distplot}
        \par\noindent Heatmap summarizing distance between CLL arrays
      }
      \only<4>{
        \includegraphics[width=\textwidth,height=!]{NUSE}
        \par\noindent Normalized unscaled standard error (NUSE)
        suggests array CLL1 is an outlier.
      }
      %% Experimental design
      \only<5>{
        \includegraphics[width=\textwidth,height=!]{volcano2}

        \par\noindent `Progressive' vs.\ `stable' status. $\log P$
        vs.\ $\log$-fold change, CLL data set. Probe sets with extreme
        differentiation highlighted.

      }
    \end{overprint}
  \end{columns}
\end{frame}

\section{Reproducible}

\begin{frame}{3. Reproducible Research}
  Long-term
  \begin{itemize}
  \item Returning to analysis after days, weeks, months of other
    activity
  \end{itemize}
  Multi-participant: communicating with\ldots
  \begin{itemize}
  \item Other statisticians / bioinformaticians
  \item Biologists and others without specialized statistical
    knowledge
  \end{itemize}
  Science: reproducibility\ldots
  \begin{itemize}
  \item Facilitates third-party verification
  \item Allows critical assessment
  \item Challenging, even in high-profile journals requiring archived
    raw data (Ioannidis \emph{et al.}, 2009, Nat Genet 41:
    \href{http://www.nature.com/ng/journal/v41/n2/abs/ng.295.html}{149-155}).
  \end{itemize}
\end{frame}

\begin{frame}{Reproducible Research: Case Study}
  \begin{columns}

    \column{.5\textwidth}
    Original research
    \begin{itemize}
    \item Potti \emph{et al.}, 2006; Hsu \emph{et al.}, 2007
    \item \textbf<2>{NCI60 cell line drug sensitivity signature}
    \item Clinical trial allocation
    \end{itemize}
    Reproducibility
    \begin{itemize}
    \item Baggerly \& Coombes, 2009
    \item \textbf<3-5>{Off-by-one cisplatin gene signature}
    \item Four `interesting' genes not supported by analysis (two not
      on array)
    \end{itemize}

    \column{.5\textwidth}
    \begin{overprint}
      \only<1>{
        References
        \begin{itemize}
        \item Potti \emph{et al.} 2006 Nat Med 12:
          \href{http://www.nature.com/nm/journal/v12/n11/abs/nm1491.html}{1294-1300};
          (\href{http://www.nature.com/nm/journal/v17/n1/full/nm0111-135.html}{retracted})
          %% \item Gy\"orffy et al., 2006, Int J Cancer 117: \href{http://onlinelibrary.wiley.com/doi/10.1002/ijc.21570/full}{1699-1712}.
        \item Hsu \emph{et al.} 2007 J Clin Oncol 25:
          \href{http://jco.ascopubs.org/content/25/28/4350.abstract}{4350-4357}.
          (\href{http://jco.ascopubs.org/content/28/35/5229.long}{retracted})
        \item Baggerly \& Coombes 2009 Ann Appl Stat
          \href{http://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.aoas/1267453942}{3:
            1309-1334}
        \end{itemize}
      }
      \only<2>{
        \includegraphics[width=\textwidth,height=!]{HsuEtAl-F1-large-a.jpg}
        \par Hsu \emph{et al.}, cisplatin, fig.~1a
      }
      \only<3>{
        \includegraphics[width=\textwidth,height=!]{BaggerlyCoombes2009-fig2a.jpg}
        \par Baggerly \& Coombes, fig.~2a
      }
      \only<4>{
        \includegraphics[width=\textwidth,height=!]{BaggerlyCoombes2009-fig2b.jpg}
        \par Baggerly \& Coombes, fig.~2b
      }
      \only<5>{
        \includegraphics[width=\textwidth,height=!]{BaggerlyCoombes2009-fig2d.jpg}
        \par Baggerly \& Coombes, fig.~2d
      }
      \only<6>{
        \begin{quotation}
          \noindent \ldots results incorporate several simple errors
          that may be putting patients at risk. One theme that emerges
          is that the most common errors are simple (e.g., row or
          column offsets); conversely, it is our experience that the
          most simple errors are common -- Baggerly \& Coombes, 2009
        \end{quotation} 
      }
    \end{overprint}
  \end{columns}
\end{frame}

\begin{frame}{Reproducible Research: \Bioconductor}
  \begin{description}
  \item[Script-based] Data transformations \emph{necessarily}
    documented
  \item[`Literate programming'] Text documents embed scripts, scripts
    \emph{evaluated} when text document processed
  \item[Versioned software and repositories] Record which package
    versions used, and retrieve from \Bioconductor{} archives
  \item[Integrated data containers] Sample descriptions and expression
    data in a single object. Subsetting expression data automatically
    subsets sample descriptions
  \end{description}
\end{frame}

\begin{frame}[fragile]{The ALL dataset}
<<ALL-output>>=
library(ALL); data(ALL); ALL
@ 
\end{frame}

\section{Leading edge}

\begin{frame}{4. Leading Edge}
  Technological innovations
  \begin{itemize}
  \item E.g., SNP, miRNA arrays
  \item E.g., lab sequencing platforms; novel protocols
  \end{itemize}
  Fast-changing
  \begin{itemize}
  \item Commercial software products not yet developed, or already
    out-of-date
  \item Research questions require novel solutions
  \end{itemize}
\end{frame}

\begin{frame}{Leading Edge: Illustration}
  \begin{columns}
    \column{.5\textwidth}
    Sequencing technologies
    \begin{itemize}
    \item \textbf<2-3>{Historically} (e.g., 2 years ago): short reads,
      low 'tail' quality, tail base call bias, data volume
    \item \textbf<3-4>{Current}: count models, read bias, designed
      experiments, variant representations, annotation
    \end{itemize}
    \column{.5\textwidth}
    \begin{overprint}
      \only<1>{
        \includegraphics[width=\textwidth,height=!]{Solexa-bridge-pcr.jpg}
        \par
        Bentley et al., 2008, Nature 456: \href{http://www.ncbi.nlm.nih.gov/pubmed/18987734}{53-9}
      }
      \only<2>{
        \includegraphics[width=\textwidth,height=!]{lane5errs.pdf}
      }
      \only<3>{
        \includegraphics[width=\textwidth,height=!]{ecdf.pdf}
      }
      \only<4>{
        \includegraphics[width=\textwidth,height=!]{DESeq-mean-var-crop}

        \par\noindent Poisson (purple) and negative binomial (orange)
        fit to RNA-seq data. Anders \& Huber, 2010, Genome Biol,
        11:\href{http://genomebiology.com/2010/11/10/R106/abstract}{R106}

      }
    \end{overprint}
  \end{columns}
\end{frame}

\section{Accessible}

\begin{frame}{5. Accessible}
  Affordable
  \begin{itemize}
  \item Purchase / licensing; time
  \end{itemize}
  Transparent
  \begin{itemize}
  \item Algorithms, e.g., RMA
  \item Code reuse
  \end{itemize}
  Challenges and solutions
  \begin{itemize}
  \item Research questions requiring `one-off' solutions
  \item Software bugs
  \end{itemize}
  Usable
  \begin{itemize}
  \item Documentation
  \item Training, such as today!
  \end{itemize}
\end{frame}

\begin{frame}{Accessible}
  \begin{columns}
    \column{.5\textwidth}
    Affordable
    \begin{itemize}
    \item Purchase / licensing; time
    \end{itemize}
    Transparent
    \begin{itemize}
    \item Algorithms, e.g., RMA
    \item Code reuse
    \end{itemize}
    Challenges and solutions
    \begin{itemize}
    \item Research questions requiring `one-off' solutions
    \item Software bugs
    \end{itemize}
    \textbf<1>{Usable}
    \begin{itemize}
    \item Documentation
    \item Training, such as today!
    \end{itemize}

    \column{.5\textwidth}
    \par\noindent Documentation
    \begin{itemize}
    \item Help pages
    \item Vignettes
    \item Archived course and conference material
    \item Mailing list
    \end{itemize}
    BioC2011
    \begin{itemize}
    \item Annual conference -- user and scientific presentations,
      workshops, poster session
    \item Seattle July 27-29
    \end{itemize}
  \end{columns}
\end{frame}

\begin{frame}{Analysis and Comprehension of High Throughput Genomic Data}
  Hallmarks of effective computational software
  \begin{enumerate}
  \item Extensive: data, annotation
  \item Statistical: volume, technology, experimental design
  \item Reproducible: long-term, multi-participant science
  \item Leading edge: novel, technology-driven
  \item Accessible: affordable, transparent, usable
  \end{enumerate}
\end{frame}

\section{Acknowledgments}

\begin{frame}{Acknowledgments}
  \begin{columns}[t]
    \column{.5\textwidth}
    \begin{itemize}
    \item Vince Carey (Brigham \& Womens, Harvard), Wolfgang Huber
      (EBI), Rafael Irizzary (JHU), Robert Gentleman (Genentec)
    \item Herv\'e Pag\`es, Marc Carlson, Nishant Gopalakrishnan, Chao-Jen
      Wong, Dan Tenenbaum, Valerie Obenchain
    \end{itemize}
    \column{.5\textwidth}
    \begin{itemize}
    \item Patrick Aboyoun, Seth Falcon, Michael Lawrence, Deepayan
      Sarkar, Florian Hahne
    \item Sean Davis, James MacDondald
    \end{itemize}
  \end{columns}
\end{frame}

\end{document}

%% Local Variables:
%% compile-command: "R CMD make -f devmakefile Feature-Address.pdf"
%% End:
