\documentclass[a4paper]{article}
\usepackage{fancyvrb}
\usepackage{pdfpages}
\begin{document}

\newcommand\vitem[1][]{\SaveVerb[% to use verb in description
    aftersave={\item[\textnormal{\UseVerb[#1]{vsave}}]}]{vsave}}

\title{\Huge \texttt{Minia} --- Short manual}

\author{R. Chikhi \& G. Rizk\\
        {\small{rayan.chikhi@ens-cachan.org}}}
\maketitle

\begin{abstract}
\noindent {\normalsize Minia is a software for ultra-low memory DNA sequence assembly. It takes as input a set of short genomic sequences (typically, data produced by the Illumina DNA sequencer). Its output is a set of contigs (assembled sequences), forming an approximation of the expected genome. Minia is based on a succinct representation of the de Bruijn graph. The computational resources required to run Minia are significantly lower than that of other assemblers.}
\end{abstract}

\tableofcontents

\section{Installation}

To install Minia, just type \verb+make+ in the Minia folder.
Minia has been tested on Linux and MacOS systems.
To run Minia, type \verb+./minia+.

\section{Parameters}

The following options need to be specified, in the following order:

\begin{enumerate}

\item \verb+input_file+ -- the input file

\item \verb+kmer_size+  -- k-mer length 

\item \verb+min_abundance+ -- filters out k-mers seen less than the specified number of times

\item \verb+estimated_genome_size+ -- rough estimation of the size of the genome to assemble, in base pairs.

\item \verb+prefix+ -- any prefix string to store unique temporary files for this assembly

\end{enumerate}

Minia now uses the Cascading Bloom filters improvement (http://arxiv.org/abs/1302.7278) by default, thanks to Gustavo Sacomoto for the implementation in Minia. Launch Minia with the \verb!--original! option to revert to the original data structure.


\section{Explanation of parameters}
\begin{description}

\vitem+kmer_size+
The $k$-mer length is the length of the nodes in the de Bruijn graph. It strongly depends on the input dataset. A typical value to try for short Illumina reads (read length above $50$) is 27. For longer Illumina reads ($\approx 100$ bp) with sufficient coverage ($>$ 40x), we had good results with $k=43$.

\vitem+min_abundance+
The \verb+min_abundance+ is used to remove erroneous, low-abundance $k$-mers. This parameter also strongly depends on the dataset. It corresponds to the smallest amount of times a correct $k$-mer appears in the reads. A typical value is $3$. Setting it to $1$ is not recommended\footnote{as no erroneous $k$-mer will be discarded, which will likely result in a very large memory usage}. If the dataset has high coverage, try larger values.

\vitem+estimated_genome_size+
The estimated genome size parameter only controls the memory usage during the first phase of Minia (graph construction). \emph{It has no impact on the assembly}.

\vitem+prefix+
The \verb+prefix+ parameter is any arbitrary file name prefix, for example, \verb+test_assembly+.

\end{description}

\section{Input}

\begin{description}
\item \emph{FASTA/FASTQ}

Minia assembles any type of Illumina reads, given in the FASTA or FASTQ format. Paired or mate-pairs reads are OK, but keep in mind that Minia discards pairing information.
\item \emph{Multipe Files}

 Minia can assemble reads from multiple input files. The list of read files is specified in the input file of Minia (the first parameter), one file name per line. Therefore the input file is either (i) the read file itself (in fasta or fastq) or (ii) a file containing a list of file names.
\item \emph{line format}

 In FASTA files, each read can be split into multiple lines, whereas in FASTQ, each read sequence must be in a single line.

\item \emph{gzip compression}

Minia can direclty read files compressed with gzip. Compressed files should end with '.gz'. Input files of different types can be mixed (i.e. gzipped or not, in FASTA or FASTQ)

\end{description}

\section{Output}

The output of Minia is a set of contigs in the FASTA format, in the file \verb+[prefix].contigs.fa+. 

\section{Memory usage}

We estimate that the memory usage of Minia is roughly $2$ GB of RAM per gigabases in the target genome to assemble. It is independent of the coverage of the input dataset, provided that the \verb!min_abundance! parameter is correctly set. For example, a human genome was assembled in $5.7$ GB of RAM. This was using the original data structure; the current implementation relies on Cascading Bloom filters and should use $\approx 1-2$ GB less memory. A better estimation of the memory usage can be found in the Appendix.

\section{Disk usage}

Minia writes large temporary files during the k-mer counting phase. These files are written in the working directory when you launched Minia. For better performance, run Minia on a local hard drive. 

\section{Larger $k$-mer lengths}

Minia supports arbitrary large $k$-mer lengths. To compile Minia for $k$-mer lengths up to, say, 100, type:
\begin{verbatim}
make clean && make k=100
\end{verbatim}

\section{Appendixes}

The rest of this manual describes the data structure used by Minia.
The first text is from an original research article published at WABI 2012. The second text is an improvement made and implemented by other authors, published at WABI 2013.

\includepdf[pages=-]{../paper/wabi12.pdf}
\includepdf[pages=-]{../paper/cascading-wabi13.pdf}

\end{document}

