\subsubsection*{Dependencies}


\begin{DoxyItemize}
\item \href{http://www.htslib.org/download/}{\tt H\+T\+Slib}
\item \href{https://gcc.gnu.org/}{\tt G\+CC} 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}{\tt 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}{}\section{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}{\tt miniconda} package. After intalling conda please add the following channels,


\begin{DoxyCode}
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
\end{DoxyCode}


To install i\+Var,


\begin{DoxyCode}
conda install ivar
\end{DoxyCode}
\hypertarget{installpage_autotoc_md1}{}\subsection{Installing via homebrew}\label{installpage_autotoc_md1}
i\+Var can be installed using \href{https://brew.sh/}{\tt Homebrew}.


\begin{DoxyCode}
brew install brewsci/bio/ivar
\end{DoxyCode}
\hypertarget{installpage_autotoc_md2}{}\section{Installing on Mac}\label{installpage_autotoc_md2}
\hypertarget{installpage_autotoc_md3}{}\subsection{Installing build tools}\label{installpage_autotoc_md3}
\href{https://developer.apple.com/xcode/}{\tt 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}
xcode-select --install
\end{DoxyCode}


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

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


\begin{DoxyCode}
brew install autoconf automake libtool
\end{DoxyCode}
\hypertarget{installpage_autotoc_md4}{}\subsection{H\+T\+Slib installed using conda}\label{installpage_autotoc_md4}
H\+T\+Slib can be installed with \href{https://conda.io/docs/}{\tt conda} using the command,


\begin{DoxyCode}
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}
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 \$\+L\+D\+\_\+\+L\+I\+B\+R\+A\+R\+Y\+\_\+\+P\+A\+TH 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}
export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:/opt/conda/lib
\end{DoxyCode}
\hypertarget{installpage_autotoc_md5}{}\subsection{H\+T\+Slib installed from source}\label{installpage_autotoc_md5}
Installation instructions and downloads for H\+T\+Slib can be found at \href{http://www.htslib.org/download/}{\tt http\+://www.\+htslib.\+org/download/}.

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


\begin{DoxyCode}
export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:/path/to/hts/lib/folder
\end{DoxyCode}
\hypertarget{installpage_autotoc_md6}{}\subsection{Installing i\+Var}\label{installpage_autotoc_md6}
To install i\+Var, run the following commands.


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


If H\+T\+Slib 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}
./autogen.sh
./configure --with-hts=/prefix/to/bin/folder/with/HTSlib
make
make install
\end{DoxyCode}


If H\+T\+Slib was installed in a non standard location, please run the following commands,


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


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


\begin{DoxyCode}
iVar version 1.0

Please raise issues and bug reports at https://github.com/andersen-lab/ivar/
\end{DoxyCode}
\hypertarget{installpage_autotoc_md7}{}\section{Installing on Linux}\label{installpage_autotoc_md7}
\hypertarget{installpage_autotoc_md8}{}\subsection{Installing build tools}\label{installpage_autotoc_md8}
\href{https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html#Autotools-Introduction}{\tt G\+NU Autotools} is required to compile i\+Var from source.

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


\begin{DoxyCode}
apt-get install autotools-dev
\end{DoxyCode}
\hypertarget{installpage_autotoc_md9}{}\subsection{H\+T\+Slib installed using conda}\label{installpage_autotoc_md9}
H\+T\+Slib can be installed with \href{https://conda.io/docs/}{\tt conda} using the command,


\begin{DoxyCode}
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}
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 \$\+L\+D\+\_\+\+L\+I\+B\+R\+A\+R\+Y\+\_\+\+P\+A\+TH 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}
export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:/opt/conda/lib
\end{DoxyCode}
\hypertarget{installpage_autotoc_md10}{}\subsection{H\+T\+Slib installed from source}\label{installpage_autotoc_md10}
Installation instructions and downloads for H\+T\+Slib can be found at \href{http://www.htslib.org/download/}{\tt http\+://www.\+htslib.\+org/download/}.

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


\begin{DoxyCode}
export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:/path/to/hts/lib/folder
\end{DoxyCode}
\hypertarget{installpage_autotoc_md11}{}\subsection{Installing i\+Var}\label{installpage_autotoc_md11}
To install i\+Var, run the following commands.


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


If H\+T\+Slib 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}
./autogen.sh
./configure --with-hts=/prefix/to/bin/folder/with/HTSlib
make
make install
\end{DoxyCode}


If H\+T\+Slib was installed in a non standard location, please run the following commands,


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


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


\begin{DoxyCode}
iVar version 1.0

Please raise issues and bug reports at https://github.com/andersen-lab/ivar/
\end{DoxyCode}
\hypertarget{installpage_autotoc_md12}{}\section{Running from Docker}\label{installpage_autotoc_md12}
i\+Var can also be run via \href{https://www.docker.com/}{\tt Docker}. Pull the docker image from \href{https://hub.docker.com/}{\tt Docker Hub} using the following command,


\begin{DoxyCode}
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/}{\tt Docker docs}.

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