# compile the code an run a simple test on your computer
cd minia
sh INSTALL
@@ -31,7 +32,17 @@ c++ compiler; compilation was tested with gcc and g++ version>=4.5 (Linux) and c
Type `minia` without any arguments for usage instructions.
Short manual: http://minia.genouest.org/files/minia.pdf
A more complete manual:
cd doc
pdflatex manual.tex
If you cannot compile it: http://minia.genouest.org/files/minia.pdf
# What is new ? (2018)
Minia version 1 was implementing a rather unusual way to perform the assembly: traverse the graph and attempt to jump over errors and variants. This worked rather okay but not for e.g. repeated regions with many sequencing errors. Minia version 2 also followed the same philosophy, and had major improvements coming from the integration of the GATB library (mostly speed improvements) and cascading Bloom filter. Minia version 3 uses newer techniques and has virtually nothing in common with Minia 1: there is no Bloom filter anymore (the data structure is based on unitigs produced by the BCALM software). The assembly is performed using graph simplifications that are heavily inspired by the SPAdes assembler.
\item\verb+abundance-min+ -- specifies how many times a $k$-mer must be seen in the reads to be considered correct (integer)
\item\verb+prefix+ -- any prefix string to store output contigs as well as 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!-debloom 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. We recommend that you use the KmerGenie software to automatically find the best $k$ for your dataset.
The $k$-mer length is the length of the nodes in the de Bruijn graph. It strongly depends on the input dataset. For proper assembly, we recommend that you use the Minia-pipeline that runs Minia multiple times, with an iterative multi-k algorithm. That way, you won't need to choose k. If you insist on running with a single k value, the KmerGenie software can automatically find the best $k$ for your dataset.
\vitem+abundance-min+
The \verb+abundance-min+ is used to remove erroneous, low-abundance $k$-mers. This parameter also strongly depends on the dataset. Any $k$-mer that appears strictly less than \emph{abundance-min} times in the reads will be discarded. A typical value is $3$. It is also called "coverage cut-off" in other software (e.g. Velvet).
KmerGenie has an experimental feature (in the output of the command, not in the HTML report) that reports an optimal coverage cut-off (synonymous to abundance) parameter that exactly corresponds to the abundance-min parameter of Minia.
The \verb+abundance-min+ is a hard cut-off to remove likely erroneous, low-abundance $k$-mers. In Minia 3, it is recommended to set it to 2 unless you have a good reason not to. Minia 3 also implements other ways to remove erroneous k-mers, using a more adequate relative cut-off, in the graph simplifications step.
\textbf{Setting \emph{abundance-min} to $1$ is not recommended}, as no erroneous $k$-mer will be discarded, which will likely result in a very large memory usage. In particular, if KmerGenie tells you to set abundance to 1, then still, set it to 2. If the dataset has high coverage, try larger values.
Setting \emph{abundance-min} to $1$ is not recommended, as too many erroneous $k$-mer will be kept, which will likely result in a very large memory usage. If the dataset has high coverage, it may be worth it to try larger values.
\vitem+prefix+
The \verb+prefix+ parameter is any arbitrary file name prefix, for example, \verb+test_assembly+.
The \verb+prefix+ parameter is any arbitrary output files name, for example, \verb+test_assembly+.
\end{description}
These are the main two parameters that control the quality of assembly. Minia command line has a few more parameters but they are either for advanced usage, or just minor tweaks. Some are described in the rest of this manual.
\section{Input}
\begin{description}
\item\emph{Larger $k$-mer lengths}
Minia supports arbitrary large $k$-mer lengths. To compile Minia from the source, to support $k$-mer lengths up to, say, 160, type this in the build folder:
Minia supports arbitrary large $k$-mer lengths. To compile Minia from the source, to support $k$-mer lengths up to, say, 320, type this in the build folder:
The list of kmers should only contain multiples of 32. Intermediate values are used to create optimized code for k values that are shorter than the max. The last k value specifies the highest kmer size that can effectively be used in this compiled version of Minia. Apart from that, whatever k values are in this list do not affect the assembly quality in any way.
\item\emph{FASTA/FASTQ}
Minia assembles any type of Illumina reads, given in the FASTA or FASTQ format. Giving paired or mate-pairs reads as input is OK, but keep in mind that Minia won't use pairing information.
@@ -110,10 +109,6 @@ Minia assembles any type of Illumina reads, given in the FASTA or FASTQ format.
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)
\item\emph{Graph input}
Minia can take as input a graph in the HDF5 format, constructed using the dbgh5 program, or a different GATB tool, or from a previous run of Minia (useful when one wants to tweak assembly parameters). Use the \verb+-graph+ parameter to specify the graph, instead of the \verb+-in+ parameter.
\end{description}
\section{Output}
@@ -122,21 +117,48 @@ The output of Minia is a set of contigs in the FASTA format, in the file \verb+[
\subsection*{Creating unitigs}
Minia supports the creation of unitigs. Use the following command line:
Minia will also output unitigs in the FASTA format. Those are non-branching paths in the de Bruijn graph prior to any graph simplification. File: \verb+[prefix].unitigs.fa+.
The \verb+-starter simple+ option is to turn off Minia's heuristics for starting node selection (which avoid starting inside a bubble).
Note that there is a known bug in the \verb+-starter simple+ behavior: some of the unitigs of length k won't be returned (technically: the branching nodes which are neighbors of branching nodes are not returned).
\section{Selection of graph simplification steps}
By default, Minia performs 3 types of graph simplifications: tip removal, bulges removal, and erroneous connections removal. Those are similar to SPAdes. You can selectively ask to not perform any (or all) of those operation through those command line arguments: \verb+-no-tip-removal+, \verb+-no-bulge-removal+, \verb+-no-ec-removal+.
\section{Fine-tuning of graph simplification steps}
Most of the graph simplification steps are highly inspired by the SPAdes assembler.
A regular user needs not modify any of the graph simplifications parameters.
Yet, for advanced users, it is possible to do so in order to increase or reduce the aggresiveness of variant/error removal.
Tip removal implements two modes: "short tips" removal and "longer tips" removal. Short tips are removed no matter what their coverage is. By default, a tip is considered short if it is of length $\leq3.5k$. Longer tips are of length $\leq10k$. They are removed if their coverage is smaller than the average coverage of the neighbor unitigs, multiplied by a constant factor.
To make tip clipping more conservative, I would recommend specifying a high \verb+-tip-rctc-cutoff+ cutoff, such as \verb+-tip-rctc-cutoff 20+. This will make sure that the coverage of a tip is at least 20 times smaller than the coverage of its neighbors.
Explanation all the other simplifications steps would make this manual a bit longer. For now you can try to guess using slide 11 of \url{http://cristal.univ-lille.fr/~chikhi/pdf/2017-august-3-biata.pdf}. Some information can also be found in the SPAdes paper, where the term \emph{bulge} is defined.
\section{Memory usage}
We estimate that the memory usage of Minia is roughly$1$ 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!abundance-min! 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 uses $\approx4$ GB. A better estimation of the memory usage can be found in the Minia article.
We estimate that the memory usage of Minia is in the order of$1$ 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!abundance-min! parameter is not too low.
\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.
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, SSD, or (very large) ram disk, around 2-3x time the space of the input.
\section{Reproducibility}
Default Minia parameters do not ensure a deterministic execution: due to e.g. multi-threading, the results may change a little bit between executions (but should still give more or less the same assembly).
To make sure that results are perfectly identical between runs on the same data and the same parameters, run with these options:
\verb!-nb-cores 1 -nb-glue-partitions 200!. Also make sure that the same compiler version was used.
\section{Influences}
This version of Minia could not exist without inspiration taken from these great pieces of software and methods: