\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[english]{isodate}
\usepackage[parfill]{parskip}
\usepackage{textcomp}

%----------------------------------------------------------------------------------------
%	BLANK DOCUMENT
%----------------------------------------------------------------------------------------

\begin{document} 

\pagestyle{empty} % Removes page numbers

{
 \raggedleft % Right-align all text
 \vspace*{\baselineskip} % Whitespace at the top of the page
 {\Large by Jo\~ao F. Matias Rodrigues, Thomas S. B. Schmidt, Janko Tackmann, and Christian von Mering\\
 Institute of Molecular Life Sciences\\University of Z\"urich\\Switzerland}\\[0.167\textheight] % Author name
 {\Huge MAPseq v1.1 (April 2017)}\\[\baselineskip] % Main title which draws the focus of the reader
 {\Large \textit{improving speed, accuracy and consistency in metagenomic ribosomal RNA analysis}}\par % Tagline or further description
}
\vfill % Whitespace between the title block and the publisher
\vspace*{3\baselineskip} % Whitespace at the bottom of the page

\newpage

\pagenumbering{Roman}
\tableofcontents
\newpage
\pagenumbering{arabic}

\section{Introduction}

MAPseq is a set of fast and accurate sequence read classification tools designed to classify ribosomal
RNA sequences in terms of their taxonomy and OTU classification. This is done by using a
reference set of full-length ribosomal RNA sequences for which known taxonomies are known,
and for which a set of high quality OTU clusters has been previously generated.
For each read, the best guess and correspoding confidence in the assignment is shown at
each taxonomic and OTU level.
\\
For bugs and more information contact: Joao F. Matias Rodrigues {\textgreater}jfmrod@gmail.com\textless


\section{INSTALLATION}

\subsection{Linux/Unix/MacOSX}

You can get the source code or binary packages at:

http://meringlab.org/software/mapseq/
\\


To install MAPseq on a linux, unix, or MacOSX simply type:

./configure
make
make install

In the directory where you unpacked the package contents.
Alternatively, if you want the program to be installed to another
location instead of the default system wide /usr/local/ directory,
you can change the ./configure command to:

./configure --prefix=\$HOME/usr

This would install the program binaries to a directory usr/bin inside
your home directory (i.e.: \$HOME/usr/bin/mapseq), after you type
the command "make install".



\section{USING MAPseq}

\subsection{Default reference}

MAPseq takes as input a fasta file with raw sequence data which should have been previously
demultiplexed and quality filtered usually from a fastq file produced by the sequencing machine.

If the input sequences can be found in the file "rawseqs.fa". Then to classify the reads
one simply has to run the following command:

mapseq rawseqs.fa \textgreater rawseqs.fa.mseq

This will classify all the sequences found in rawseqs against the standard reference dataset
provided with MAPseq.

You can change the number of threads that MAPseq uses with the -nthreads {\textless}no\_threads\textgreater argument.


\subsection{Custom user-provided reference}

You can use mapseq with your own fasta reference and taxonomy files with the following command:

mapseq rawseqs.fa {\textless}customref.fasta{\textgreater} {\textless}customref.tax\textgreater [customref.tax2 ...] \textgreater rawseqs.fa.mseq

Where customref.fasta is a nucleotide fasta file with your reference set and customref.tax, customref.tax2 are one or more taxonomic assignments for each sequence in the reference.

The taxonomy file should have a header (preceeded with the \# character) with the identity cutoff parameters and description of the taxonomy followed by two tab-separated columns composed of the accession id and the taxonomy. For example:

\#cutoff: 0.00:0.08 0.70:0.35 0.70:0.35 0.70:0.35 0.80:0.25 0.92:0.08 0.95:0.05
\#name: NCBI
\#levels: Kingdom Phylum Class Order Family Genus Species
HE801216:78..1345{\tab}Bacteria;Proteobacteria;Gammaproteobacteria;Methylococcales;...
HE802067:76740..77993{\tab}Bacteria;Actinobacteria;Actinobacteria;Corynebacteriales;...
HE804045:1012175..1013425{\tab}Bacteria;Actinobacteria;Actinobacteria;Pseudonocardiales;...



\section{EXAMPLE OUTPUT}

In the results output, each line indicates a classification of the read.

For example:
SRR044946.347   GQ156763:1..1446        548     0.91985428      505     22      22      1       540     263     800     0.99072355      20              Bacteria        1       1       Firmicutes      0.55452305      1       Clostridia      0.55452305      1       Clostridiales   0.55452305      1       Ruminococcaceae 0.31190208      0.3119020760059357      Ruminococcus    0       0.2104288786649704      Ruminococcus gnavus     0       0.0604640431702137              Bacteria        0.58272612      1       F6159   0.22964814      1       G35588  0       1       S61033  0       0.7381679934055649      SS52094 0       0.2980887881680916

Each field is tab separated and indicates the following:

1       Query sequence id

2       Reference sequence id (highest alignment score)

3       Alignment bitscore

4       Pairwise identity

5       Matches

6       Mismatches

7       Gaps

8       Query start pos

9       Query end pos

10      Reference start pos

11      Reference end pos

12      Strand (+/-)

13      (empty)

After the first empty field the taxonomy classifications and confidences are shown, every taxonomy classification is separated by an empty field.
Although different fasta reference and taxonomy databases can be specified by the user, by default mapseq maps reads to the NCBI taxonomy and to OTU taxonomies

The combined confidence is computed based on a score confidence, used to control misclassification errors, and a identity cutoff confidence, used to ensure that the query isnt misclassified due to the inexistence of a sequence representative in the database of the true classification. The score confidence is
calculated by comparing the identity of the assigned taxonomy to the identity of the first sequence not matching the assigned taxonomy.
The identity cutoff confidence uses preoptimized cutoffs at each taxonomic level to calculate the confidence that the query is not too divergent from the assigned taxonomy.


For further information contact: Jo\~ao F. Matias Rodrigues {\textless}jfmrod@gmail.com\textgreater


\end{document}

