\documentclass[a4paper]{article} 
\usepackage[utf8]{inputenc}
\usepackage{color, pdfcolmk}
\usepackage{hyperref}
\title{Annotated data sets contained in the \code{acnr} package}
\author{M. Pierre-Jean, P. Neuvial}

\newcommand{\code}[1]{\texttt{#1}}


\begin{document}
% \VignetteIndexEntry{Parent-Specifc copy number segmentation}
% \VignetteIndexEntry{PSSeg}
\DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom = {\color[rgb]{0, 0, 0.56}}} 
\SweaveOpts{eps=FALSE, pdf=FALSE, png=TRUE, width=5, height=5} 
\setkeys{Gin}{width=0.8\textwidth}
\maketitle
\begin{abstract}
This vignette describes the annotated data sets contained in the \code{acnr} package.
\end{abstract}

<<>>=
library(acnr)
@

\section{Description of the annotated data sets}
\label{sec:descr-annot-data}

<<echo=TRUE, results=tex>>=
tf <- .5
dataSets <- c("GSE29172", "GSE11976")

regList <- lapply(dataSets, FUN=function(ds) {
    regDat <- loadCnRegionData(dataSet=ds, tumorFraction=tf) 
    regs <- regDat[["region"]]
})
names(regList) <- dataSets

allregs <- unique(unlist(regList))
tab <- sapply(allregs, FUN=function(reg) {
    sapply(regList, FUN=function(rr) sum(rr==reg))
})
cap <- paste("Size of annotated copy-number regions for each of the", 
            length(dataSets), "data sets.")
if (require(xtable)) {
    print(xtable(tab, caption=cap, label="tab:regData",
                table.placement="!h", caption.placement="bottom"))
}
@

\section{Session information}
<<>>=
sessionInfo()
@ 
\end{document}
