\label{installpage_md_docs_INSTALLATION}%
\Hypertarget{installpage_md_docs_INSTALLATION}%


\doxysubsection*{Dependencies}


\begin{DoxyItemize}
\item \href{http://www.htslib.org/download/}{\texttt{ HTSlib}}
\item \href{https://gcc.gnu.org/}{\texttt{ GCC}} any version after v5.\+0. Support for c++11 standard required.
\end{DoxyItemize}

Note\+:
\begin{DoxyItemize}
\item It is highly recommended that \href{https://github.com/samtools/samtools}{\texttt{ samtools}} also be installed alongside i\+Var. i\+Var uses the output of samtools mpileup to call variants and generate consensus sequences. In addition, samtools {\ttfamily sort} and {\ttfamily index} commands are very useful to setup a pipeline using i\+Var.
\end{DoxyItemize}\hypertarget{installpage_autotoc_md0}{}\doxysection{Installing via conda}\label{installpage_autotoc_md0}
i\+Var is available on bioconda. To install conda, please use the \href{https://conda.io/miniconda.html}{\texttt{ miniconda}} package. After intalling conda please add the following channels,


\begin{DoxyCode}{0}
\DoxyCodeLine{conda config -\/-\/add channels defaults}
\DoxyCodeLine{conda config -\/-\/add channels bioconda}
\DoxyCodeLine{conda config -\/-\/add channels conda-\/forge}

\end{DoxyCode}


To install i\+Var,


\begin{DoxyCode}{0}
\DoxyCodeLine{conda install ivar}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md1}{}\doxysubsection{Installing via homebrew}\label{installpage_autotoc_md1}
i\+Var can be installed using \href{https://brew.sh/}{\texttt{ Homebrew}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{brew install brewsci/bio/ivar}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md2}{}\doxysection{Installing on Mac}\label{installpage_autotoc_md2}
\hypertarget{installpage_autotoc_md3}{}\doxysubsection{Installing build tools}\label{installpage_autotoc_md3}
\href{https://developer.apple.com/xcode/}{\texttt{ Xcode}} from Apple is required to compile i\+Var (and other tools) from source. If you don\textquotesingle{}t want to install the full Xcode package from the App\+Store, you can install the Xcode command line tools,


\begin{DoxyCode}{0}
\DoxyCodeLine{xcode-\/select -\/-\/install}

\end{DoxyCode}


\href{https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html\#Autotools-Introduction}{\texttt{ GNU Autotools}} is required to compile i\+Var from source.

To install Autotools using \href{https://brew.sh/}{\texttt{ homebrew}} please use the command below,


\begin{DoxyCode}{0}
\DoxyCodeLine{brew install autoconf automake libtool}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md4}{}\doxysubsection{HTSlib installed using conda}\label{installpage_autotoc_md4}
HTSlib can be installed with \href{https://conda.io/docs/}{\texttt{ conda}} using the command,


\begin{DoxyCode}{0}
\DoxyCodeLine{conda install -\/c bioconda htslib}

\end{DoxyCode}


The conda binary is by default installed at /opt/. You can check the installation location by running the following command,


\begin{DoxyCode}{0}
\DoxyCodeLine{which conda}

\end{DoxyCode}


The output of the command will be in this format -\/ /opt/conda/bin/conda or /opt/anaconda2/bin/conda or /opt/anaconda3/bin/conda depending on whether you installed miniconda or anaconda.

If the output is for example, /opt/conda/bin/conda, then you can add the path to the lib folder to \$\+LD\+\_\+\+LIBRARY\+\_\+\+PATH using the command below. You can add this to your $\sim$/.bash\+\_\+profile or $\sim$/.bashrc to avoid rerunning the command everytime a new bash session starts.


\begin{DoxyCode}{0}
\DoxyCodeLine{export LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/opt/conda/lib}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md5}{}\doxysubsection{HTSlib installed from source}\label{installpage_autotoc_md5}
Installation instructions and downloads for HTSlib can be found at \href{http://www.htslib.org/download/}{\texttt{ http\+://www.\+htslib.\+org/download/}}.

If HTSlib is installed in a non standard location, please add the following to your .bash\+\_\+profile so that i\+Var can find HTSlib dynamic libraries during runtime.


\begin{DoxyCode}{0}
\DoxyCodeLine{export LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/path/to/hts/lib/folder}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md6}{}\doxysubsection{Installing i\+Var}\label{installpage_autotoc_md6}
To install i\+Var, run the following commands.


\begin{DoxyCode}{0}
\DoxyCodeLine{./autogen.sh}
\DoxyCodeLine{./configure}
\DoxyCodeLine{make}
\DoxyCodeLine{make install}

\end{DoxyCode}


If HTSlib was installed using conda, please run the following commands by supplying the prefix to the bin folder of the conda binary.

The prefix to the bin folder can be found using the command {\ttfamily which conda}. The output of the command will be in this format -\/ /opt/conda/bin/conda or /opt/anaconda2/bin/conda or /opt/anaconda3/bin/conda depending on whether you installed miniconda or anaconda. For example, if the output of the command is /opt/conda/bin/conda, the prefix to the htslib bin folder will be /opt/conda. This can be supplied to ./configure --with-\/hts=/opt/conda.


\begin{DoxyCode}{0}
\DoxyCodeLine{./autogen.sh}
\DoxyCodeLine{./configure -\/-\/with-\/hts=/prefix/to/bin/folder/with/HTSlib}
\DoxyCodeLine{make}
\DoxyCodeLine{make install}

\end{DoxyCode}


If HTSlib was installed in a non standard location, please run the following commands,


\begin{DoxyCode}{0}
\DoxyCodeLine{./autogen.sh}
\DoxyCodeLine{./configure -\/-\/with-\/hts=/prefix/to/bin/folder/with/HTSlib}
\DoxyCodeLine{make}
\DoxyCodeLine{make install}

\end{DoxyCode}


To test installation just run, {\ttfamily ivar version} and you should get the following output,


\begin{DoxyCode}{0}
\DoxyCodeLine{iVar version 1.0}
\DoxyCodeLine{}
\DoxyCodeLine{Please raise issues and bug reports at https://github.com/andersen-\/lab/ivar/}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md7}{}\doxysection{Installing on Linux}\label{installpage_autotoc_md7}
\hypertarget{installpage_autotoc_md8}{}\doxysubsection{Installing build tools}\label{installpage_autotoc_md8}
\href{https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html\#Autotools-Introduction}{\texttt{ GNU Autotools}} is required to compile i\+Var from source.

To install Autotools using \href{https://help.ubuntu.com/lts/serverguide/apt.html}{\texttt{ APT}} please use the command below,


\begin{DoxyCode}{0}
\DoxyCodeLine{apt-\/get install autotools-\/dev}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md9}{}\doxysubsection{HTSlib installed using conda}\label{installpage_autotoc_md9}
HTSlib can be installed with \href{https://conda.io/docs/}{\texttt{ conda}} using the command,


\begin{DoxyCode}{0}
\DoxyCodeLine{conda install -\/c bioconda htslib}

\end{DoxyCode}


The conda binary is by default installed at /opt/. You can check the installation location by running the following command,


\begin{DoxyCode}{0}
\DoxyCodeLine{which conda}

\end{DoxyCode}


The output of the command will be in this format -\/ /opt/conda/bin/conda or /opt/anaconda2/bin/conda or /opt/anaconda3/bin/conda depending on whether you installed miniconda or anaconda.

If the output is for example, /opt/conda/bin/conda, then you can add the path to the lib folder to \$\+LD\+\_\+\+LIBRARY\+\_\+\+PATH using the command below. You can add this to your $\sim$/.bash\+\_\+profile or $\sim$/.bashrc to avoid rerunning the command everytime a new bash session starts.


\begin{DoxyCode}{0}
\DoxyCodeLine{export LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/opt/conda/lib}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md10}{}\doxysubsection{HTSlib installed from source}\label{installpage_autotoc_md10}
Installation instructions and downloads for HTSlib can be found at \href{http://www.htslib.org/download/}{\texttt{ http\+://www.\+htslib.\+org/download/}}.

If HTSlib is installed in a non standard location, please add the following to your .bash\+\_\+profile so that i\+Var can find HTSlib dynamic libraries during runtime.


\begin{DoxyCode}{0}
\DoxyCodeLine{export LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/path/to/hts/lib/folder}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md11}{}\doxysubsection{Installing i\+Var}\label{installpage_autotoc_md11}
To install i\+Var, run the following commands.


\begin{DoxyCode}{0}
\DoxyCodeLine{./autogen.sh}
\DoxyCodeLine{./configure}
\DoxyCodeLine{make}
\DoxyCodeLine{make install}

\end{DoxyCode}


If HTSlib was installed using conda, please run the following commands by supplying the prefix to the bin folder of the conda binary.

The prefix to the bin folder can be found using the command {\ttfamily which conda}. The output of the command will be in this format -\/ /opt/conda/bin/conda or /opt/anaconda2/bin/conda or /opt/anaconda3/bin/conda depending on whether you installed miniconda or anaconda. For example, if the output of the command is /opt/conda/bin/conda, the prefix to the htslib bin folder will be /opt/conda. This can be supplied to ./configure --with-\/hts=/opt/conda.


\begin{DoxyCode}{0}
\DoxyCodeLine{./autogen.sh}
\DoxyCodeLine{./configure -\/-\/with-\/hts=/prefix/to/bin/folder/with/HTSlib}
\DoxyCodeLine{make}
\DoxyCodeLine{make install}

\end{DoxyCode}


If HTSlib was installed in a non standard location, please run the following commands,


\begin{DoxyCode}{0}
\DoxyCodeLine{./autogen.sh}
\DoxyCodeLine{./configure -\/-\/with-\/hts=/prefix/to/bin/folder/with/HTSlib}
\DoxyCodeLine{make}
\DoxyCodeLine{make install}

\end{DoxyCode}


To test installation just run, {\ttfamily ivar version} and you should get the following output,


\begin{DoxyCode}{0}
\DoxyCodeLine{iVar version 1.0}
\DoxyCodeLine{}
\DoxyCodeLine{Please raise issues and bug reports at https://github.com/andersen-\/lab/ivar/}

\end{DoxyCode}
\hypertarget{installpage_autotoc_md12}{}\doxysection{Running from Docker}\label{installpage_autotoc_md12}
i\+Var can also be run via \href{https://www.docker.com/}{\texttt{ Docker}}. Pull the docker image from \href{https://hub.docker.com/}{\texttt{ Docker Hub}} using the following command,


\begin{DoxyCode}{0}
\DoxyCodeLine{docker pull andersenlabapps/ivar}

\end{DoxyCode}


This docker image contains all the required dependencies to run i\+Var and the \mbox{\hyperlink{cookbookpage}{pipelines}} developed using i\+Var. You will have to attach a docker volume to get data into the docker container. Instructions to do so are in the \href{https://docs.docker.com/storage/volumes/}{\texttt{ Docker docs}}.

\href{https://hub.docker.com/r/andersenlabapps/ivar/}{\texttt{ i\+Var on Docker Hub}}\hypertarget{installpage_autotoc_md13}{}\doxysection{Contact}\label{installpage_autotoc_md13}
For bug reports please email gkarthik\mbox{[}at\mbox{]}scripps.\+edu or raise an issue on Github. 