%\VignetteIndexEntry{Overview of Valection}
%\VignetteKeywords{Verification Candidate Selection}
%\VignettePackage{valection}

%------------------------------------------------------------
% setup document
%------------------------------------------------------------

\documentclass{article}
\usepackage[margin=2cm,nohead]{geometry}
\usepackage{color}
% \usepackage{cite}
\usepackage{caption}
\definecolor{darkblue}{rgb}{0.0,0.0,0.75}
\usepackage[%
baseurl={http://cran.r-project.org/},%
pdftitle={Overview of Valection},%
pdfauthor={Chris Cooper \& Dorota Sendorek},%
pdfsubject={Valection},%
pdfkeywords={Verification Candidate Selection},%
pagebackref,bookmarks,colorlinks,linkcolor=darkblue,citecolor=darkblue,%
pagecolor=darkblue,raiselinks,plainpages,pdftex]{hyperref}

\SweaveOpts{keep.source=TRUE,eps=FALSE,include=FALSE,width=5,height=5} 

\newcommand{\Robject}[1]{\texttt{#1}}
\newcommand{\Rpackage}[1]{\textit{#1}}
\newcommand{\Rclass}[1]{\textit{#1}}
\newcommand{\Rfunction}[1]{{\small\texttt{#1}}}

\captionsetup[figure]{labelfont=bf}

%------------------------------------------------------------
% start document
%------------------------------------------------------------

\begin{document}
%---------------------------------------------------------------------------------------------
\title{Overview of Valection}
\author{Chris Cooper \& Dorota Sendorek}
%---------------------------------------------------------------------------------------------
\maketitle
\tableofcontents
%\listoffigures
\clearpage
%------------------------------------------------------------
% set R defaults
%------------------------------------------------------------

<<setup, echo=FALSE,results=hide>>=
options(width=100, signif=3, digits=3)
set.seed(0xdada)
@

%------------------------------------------------------------
\section{Overview}\label{sec:overview}
%------------------------------------------------------------ 
\subsection{Description}
Valection contains a variety of algorithms for choosing verification candidates from competing tools or parameterizations, to fairly assess their performance against each other.
\\\\
\noindent This software requires the valection package (http://labs.oicr.on.ca/boutros-lab/software/valection).

\subsection{Synopsis}
There are six selection methods available through six functions. They all take the following arguments:

\begin{itemize}
	\item{**budget**: an integer specifying how many candidates to select}
	\item{**infile**: a path to a file which contains the calls from all callers}
	\item{**outfile**: a path to a filename where the calls should be outputted}
	\item{**seed** (optional): an integer to seed the random number generator with (used to randomize sampling)}
\end{itemize}

\subsubsection{Formatting the infile}
\noindent The infile should be formatted with a tab separating the caller and call on each line:\\
	\indent caller1 name\textbackslash ta call this caller made\\
	\indent caller2 name\textbackslash ta call this caller made\\
\\
\noindent e.g.\\
	\indent magnifying glass\indent chr1 576834\\
	\indent magnifying glass\indent chr1 6878924\\
	\indent eye dropper\indent chr1 496267\\
	\indent eye dropper\indent chr1 6878924\\
\\
\noindent Note that the call can contain a tab, but the caller may not.

\subsection{Functions}
The functions are named as follows:

\begin{itemize}
	\item{run.directed.sampling}
	\item{run.random.sampling}
	\item{run.equal.per.caller}
	\item{run.equal.per.overlap}
	\item{run.increasing.with.overlap}
	\item{run.decreasing.with.overlap}
\end{itemize}

\subsection{Usage}
<<eg.run.valection, eval = FALSE>>=
require('valection');
 
# run the sampling to select 10 candidates
run.equal.per.caller(
	budget = 10,
	infile = "/home/me/calls.valec",
	outfile = "/home/me/selections.txt",
	seed = 50
	);
@

\subsection{Acknowledgements}
\begin{itemize}
	\item{Paul Boutros, PhD, PI - Boutros Lab}
	\item{The Ontario Institute for Cancer Research}
\end{itemize}

\subsection{Copyright}
This software is copyright (c) 2015 by the Ontario Institute for Cancer Research.

% \pagebreak

% \begin{thebibliography}{9}
% 	\bibitem{}
% \end{thebibliography}

\end{document}
