%\VignetteIndexEntry{OrganismDbi: A meta framework for Annotation Packages} %\VignetteDepends{Homo.sapiens} \documentclass[11pt]{article} \usepackage{Sweave} \usepackage[usenames,dvipsnames]{color} \usepackage{graphics} \usepackage{latexsym, amsmath, amssymb} \usepackage{authblk} \usepackage[colorlinks=true, linkcolor=Blue, urlcolor=Blue, citecolor=Blue]{hyperref} %% Simple macros \newcommand{\code}[1]{{\texttt{#1}}} \newcommand{\file}[1]{{\texttt{#1}}} \newcommand{\software}[1]{\textsl{#1}} \newcommand\R{\textsl{R}} \newcommand\Bioconductor{\textsl{Bioconductor}} \newcommand\Rpackage[1]{{\textsl{#1}\index{#1 (package)}}} \newcommand\Biocpkg[1]{% {\href{http://bioconductor.org/packages/devel/bioc/html/#1.html}% {\textsl{#1}}}% \index{#1 (package)}} \newcommand\Rpkg[1]{% {\href{http://cran.fhcrc.org/web/devel/#1/index.html}% {\textsl{#1}}}% \index{#1 (package)}} \newcommand\Biocdatapkg[1]{% {\href{http://bioconductor.org/packages/devel/data/experiment/html/#1.html}% {\textsl{#1}}}% \index{#1 (package)}} \newcommand\Robject[1]{{\small\texttt{#1}}} \newcommand\Rclass[1]{{\textit{#1}\index{#1 (class)}}} \newcommand\Rfunction[1]{{{\small\texttt{#1}}\index{#1 (function)}}} \newcommand\Rmethod[1]{{\texttt{#1}}} \newcommand\Rfunarg[1]{{\small\texttt{#1}}} \newcommand\Rcode[1]{{\small\texttt{#1}}} %% Question, Exercise, Solution \usepackage{theorem} \theoremstyle{break} \newtheorem{Ext}{Exercise} \newtheorem{Question}{Question} \newenvironment{Exercise}{ \renewcommand{\labelenumi}{\alph{enumi}.}\begin{Ext}% }{\end{Ext}} \newenvironment{Solution}{% \noindent\textbf{Solution:}\renewcommand{\labelenumi}{\alph{enumi}.}% }{\bigskip} \title{OrganismDbi: A meta framework for Annotation Packages} \author{Marc Carlson} \SweaveOpts{keep.source=TRUE} \begin{document} \maketitle OrganismDbi is a software package that helps tie together different annotation resources. It is expected that users may have previously made seen packages like \Rpackage{org.Hs.eg.db} and \Rpackage{TxDb.Hsapiens.UCSC.hg19.knownGene}. Packages like these two are very different and contain very different kinds of information, but are still about the same organism: Homo sapiens. The \Rpackage{OrganismDbi} package allows us to combine resources like these together into a single package resource, which can represent ALL of these resources at the same time. An example of this is the \Rpackage{homo.sapiens} package, which combines access to the two resources above along with others. This is made possible because the packages that are represented by \Rpackage{homo.sapiens} are related to each other via foreign keys. \begin{figure}[ht] \centering \includegraphics[width=.6\textwidth]{databaseTypes.pdf} \caption{Relationships between Annotation packages} \label{fig:dbtypes} \end{figure} \section{Getting started with OrganismDbi} Usage of a package like this has been deliberately kept very simple. The methods supported are the same ones that work for all the packages based on \Rclass{AnnotationDb} objects. The methods that can be applied to these new packages are \Rmethod{columns}, \Rmethod{keys}, \Rmethod{keytypes} and \Rmethod{select}. So to learn which kinds of data can be retrieved from a package like this we would simply load the package and then call the \Rmethod{columns} method. <>= library(Homo.sapiens) columns(Homo.sapiens) @ To learn which of those kinds of data can be used as keys to extract data, we use the \Rmethod{keytypes} method. <>= keytypes(Homo.sapiens) @ To extract specific keys, we need to use the \Rmethod{keys} method, and also provide it a legitimate keytype: <>= head(keys(Homo.sapiens, keytype="ENTREZID")) @ And to extract data, we can use the \Rmethod{select} method. The select method depends on the values from the previous three methods to specify what it will extract. Here is an example that will extract, UCSC transcript names, and gene symbols using Entrez Gene IDs as keys. <