%\VignetteDepends{}
%\VignetteIndexEntry{High-Throughput Sequence Annotation}
%\VignettePackage{IWB2011}

\documentclass{beamer}

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

\title{Annotation}
\author{Martin Morgan \\ Fred Hutchinson Cancer Research Center}
\date{19-21 January, 2011}

\begin{document}

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

\frame{\titlepage}

\section{Gene annotation}

\begin{frame}{Annotation Resources -- Genes and Genomes}
  \Biocpkg{AnnotationDbi}
  \begin{itemize}
  \item Chip, `org', GO, KEGG, homology
  \item Curated from NCBI, GO, other sources for each \Bioconductor{}
    release.
  \item SQL `under the hood'
  \end{itemize}
  \Biocpkg{biomaRt}
  \begin{itemize}
  \item Large online annotation collection
  \item Curated by OICR / EMBL-EBI
  \end{itemize}
  \Biocpkg{BSgenome}
  \begin{itemize}
  \item Genome sequences -- try \Rfunction{available.genomes}
  \end{itemize}
\end{frame}

\begin{frame}{\Biocpkg{AnnotationDbi}}
    Demo
\end{frame}

\begin{frame}{\Biocpkg{biomaRt}}
    Demo
\end{frame}

\section{Sequence annotation}

\begin{frame}{Work Flow: Sequence Analysis}
  Prior to analysis
  \begin{itemize}
  \item Biological experimental design -- treatments, replication,
    etc.
  \item Sequencing preparation -- library preparation, manufacturer
    protocol, etc.
  \end{itemize}
  Analysis
  \begin{enumerate}
  \item Pre-processing (sequencing, alignment, quality assessment)
  \item Count, e.g., reads per transcript -- ChIP-seq; RNA-seq; novel
    transcript identification; microbiome; \ldots
  \item Differential representation / ChIP-seq / SNP / \ldots
  \item Annotation
  \item \ldots
  \end{enumerate}
  \url{http://bioconductor.org/workflows} for common analyses.
\end{frame}

\begin{frame}{Bridge PCR}
  \begin{center}
    \includegraphics[width=.6\textwidth,height=!]{Solexa-bridge-pcr.jpg}
    \par
    Bentley et al., 2008, Nature 456: \href{http://www.ncbi.nlm.nih.gov/pubmed/18987734}{53-9}
  \end{center}
\end{frame}

\section{Bioconductor}

\begin{frame}{\Bioconductor{} entry points}
  \begin{itemize}
  \item Quality assessment.
  \item Preliminary read processing, e.g., demultiplexing, remediation
  \item Specialized alignment, e.g., \Rfunction{matchPDict} in
    \Biocpkg{Biostrings}.
  \item `Upstream' domain-specific work flows, e.g., ChIP-seq peak
    calling (\Biocpkg{chipseq}), RNA-seq reads per transcript
    (\Biocpkg{GenomicRanges} / \Biocpkg{IRanges} / \ldots)
  \item Statistical analysis of designed experiments, e.g.,
    \Biocpkg{edgeR}, \Biocpkg{DESeq}
  \item Specialized analysis, e.g., microbiome sequence processing and
    ecological analysis (\Rpackage{vegan}, \Rpackage{ape}, \ldots)
  \end{itemize}
\end{frame}

\begin{frame}{Representing Sequence Information}
  \Rclass{DNAStringSet}
  \begin{itemize}
  \item Collections of DNA sequences, e.g., microarry probes, Illumina
    reads
  \item Quality scores
  \end{itemize}
  \Rclass{GRanges}
  \begin{itemize}
  \item Genome coordinates -- reference sequence name, start and end
    coordinates, strand; e.g., aligned reads
  \item \Rclass{GRangesList} -- hierarchical structure, e.g., exons
    within transcripts
  \end{itemize}
  Additional classes: \Rclass{AlignedRead}, \Rclass{GappedAlignment},
  \ldots
\end{frame}

\begin{frame}{\Rclass{DNAStringSet}}
  Demo
\end{frame}

\begin{frame}{\Rclass{GRanges}}
  Demo
\end{frame}

\begin{frame}{\Rclass{AlignedRead} and \Rclass{GappedAlignment}}
  Demo
  %% - CIGAR
\end{frame}

\begin{frame}{Sequence Annotations}
  \begin{itemize}
  \item Existing infrastructure for gene-level annotation
  \end{itemize}
  \Biocpkg{GenomicFeatures}
  \begin{itemize}
  \item Idea: retrieve annotations from common sources, e.g., UCSC
    genome browser `known genes' track; save as a local data base.
  \item Query for regions of interest, e.g., exons per transcript
  \end{itemize}
\end{frame}

\begin{frame}{\Rpackage{GenomicFeatures}}
  Demo
\end{frame}

\section{Lab activity}

\begin{frame}{Lab activity}
  Goal: Explore sequences and their annotation
  \begin{enumerate}
  \item Data input and exploration
  \item Gapped alignments
  \item Transcript annotations
  \item Counting reads aligned to regions
  \item (Differential representation)
  \item Annotation to biological function
  \end{enumerate}
\end{frame}


\begin{frame}{Example Data}
  Nagalakshmi et al., 2008. The transcriptional
  landscape of the yeast genome defined by RNA sequencing,
  \emph{Science} 320: 1344--1349~\cite{pmid18451266}.
  \begin{itemize}
  \item Original `RNA-seq' experiment
  \item Two different primers to generate DNA from poly(A) RNA: 
    \begin{description}
    \item [RH] Random hexamer
    \item [dT] oligo(dT)
    \end{description}
  \item Biological and technical replicates
  \item Illumina GAI -- relatively small number (<5 million / lane) of
    short (33bp) reads; poor trailing base quality.
  \end{itemize}
\end{frame}

\end{document}

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