| 1 |
\chapter{Installation} |
| 2 |
\hypertarget{installpage}{}\label{installpage}\index{Installation@{Installation}} |
| 3 |
\label{installpage_md_docs_2_i_n_s_t_a_l_l_a_t_i_o_n}% |
| 4 |
\Hypertarget{installpage_md_docs_2_i_n_s_t_a_l_l_a_t_i_o_n}% |
| 5 |
|
| 6 |
|
| 7 |
\doxysubsection*{Dependencies} |
| 8 |
|
| 9 |
|
| 10 |
\begin{DoxyItemize} |
| 11 |
\item \href{http://www.htslib.org/download/}{\texttt{ HTSlib}} |
| 12 |
\item \href{https://gcc.gnu.org/}{\texttt{ GCC}} any version after v5.\+0. Support for c++11 standard required. |
| 13 |
\end{DoxyItemize} |
| 14 |
|
| 15 |
Note\+: |
| 16 |
\begin{DoxyItemize} |
| 17 |
\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. |
| 18 |
\end{DoxyItemize}\hypertarget{installpage_autotoc_md0}{}\doxysection{\texorpdfstring{Installing via conda}{Installing via conda}}\label{installpage_autotoc_md0} |
| 19 |
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, |
| 20 |
|
| 21 |
|
| 22 |
\begin{DoxyCode}{0} |
| 23 |
\DoxyCodeLine{conda\ config\ -\/-\/add\ channels\ defaults} |
| 24 |
\DoxyCodeLine{conda\ config\ -\/-\/add\ channels\ bioconda} |
| 25 |
\DoxyCodeLine{conda\ config\ -\/-\/add\ channels\ conda-\/forge} |
| 26 |
|
| 27 |
\end{DoxyCode} |
| 28 |
|
| 29 |
|
| 30 |
To install i\+Var, |
| 31 |
|
| 32 |
|
| 33 |
\begin{DoxyCode}{0} |
| 34 |
\DoxyCodeLine{conda\ install\ ivar} |
| 35 |
|
| 36 |
\end{DoxyCode} |
| 37 |
\hypertarget{installpage_autotoc_md1}{}\doxysubsection{\texorpdfstring{Installing via homebrew}{Installing via homebrew}}\label{installpage_autotoc_md1} |
| 38 |
i\+Var can be installed using \href{https://brew.sh/}{\texttt{ Homebrew}}. |
| 39 |
|
| 40 |
|
| 41 |
\begin{DoxyCode}{0} |
| 42 |
\DoxyCodeLine{brew\ install\ brewsci/bio/ivar} |
| 43 |
|
| 44 |
\end{DoxyCode} |
| 45 |
\hypertarget{installpage_autotoc_md2}{}\doxysection{\texorpdfstring{Installing on Mac}{Installing on Mac}}\label{installpage_autotoc_md2} |
| 46 |
\hypertarget{installpage_autotoc_md3}{}\doxysubsection{\texorpdfstring{Installing build tools}{Installing build tools}}\label{installpage_autotoc_md3} |
| 47 |
\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, |
| 48 |
|
| 49 |
|
| 50 |
\begin{DoxyCode}{0} |
| 51 |
\DoxyCodeLine{xcode-\/select\ -\/-\/install} |
| 52 |
|
| 53 |
\end{DoxyCode} |
| 54 |
|
| 55 |
|
| 56 |
\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. |
| 57 |
|
| 58 |
To install Autotools using \href{https://brew.sh/}{\texttt{ homebrew}} please use the command below, |
| 59 |
|
| 60 |
|
| 61 |
\begin{DoxyCode}{0} |
| 62 |
\DoxyCodeLine{brew\ install\ autoconf\ automake\ libtool} |
| 63 |
|
| 64 |
\end{DoxyCode} |
| 65 |
\hypertarget{installpage_autotoc_md4}{}\doxysubsection{\texorpdfstring{HTSlib installed using conda}{HTSlib installed using conda}}\label{installpage_autotoc_md4} |
| 66 |
HTSlib can be installed with \href{https://conda.io/docs/}{\texttt{ conda}} using the command, |
| 67 |
|
| 68 |
|
| 69 |
\begin{DoxyCode}{0} |
| 70 |
\DoxyCodeLine{conda\ install\ -\/c\ bioconda\ htslib} |
| 71 |
|
| 72 |
\end{DoxyCode} |
| 73 |
|
| 74 |
|
| 75 |
The conda binary is by default installed at /opt/. You can check the installation location by running the following command, |
| 76 |
|
| 77 |
|
| 78 |
\begin{DoxyCode}{0} |
| 79 |
\DoxyCodeLine{which\ conda} |
| 80 |
|
| 81 |
\end{DoxyCode} |
| 82 |
|
| 83 |
|
| 84 |
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. |
| 85 |
|
| 86 |
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 \texorpdfstring{$\sim$}{\string~}/.bash\+\_\+profile or \texorpdfstring{$\sim$}{\string~}/.bashrc to avoid rerunning the command everytime a new bash session starts. |
| 87 |
|
| 88 |
|
| 89 |
\begin{DoxyCode}{0} |
| 90 |
\DoxyCodeLine{export\ LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/opt/conda/lib} |
| 91 |
|
| 92 |
\end{DoxyCode} |
| 93 |
\hypertarget{installpage_autotoc_md5}{}\doxysubsection{\texorpdfstring{HTSlib installed from source}{HTSlib installed from source}}\label{installpage_autotoc_md5} |
| 94 |
Installation instructions and downloads for HTSlib can be found at \href{http://www.htslib.org/download/}{\texttt{ http\+://www.\+htslib.\+org/download/}}. |
| 95 |
|
| 96 |
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. |
| 97 |
|
| 98 |
|
| 99 |
\begin{DoxyCode}{0} |
| 100 |
\DoxyCodeLine{export\ LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/path/to/hts/lib/folder} |
| 101 |
|
| 102 |
\end{DoxyCode} |
| 103 |
\hypertarget{installpage_autotoc_md6}{}\doxysubsection{\texorpdfstring{Installing i\+Var}{Installing i\+Var}}\label{installpage_autotoc_md6} |
| 104 |
To install i\+Var, run the following commands. |
| 105 |
|
| 106 |
|
| 107 |
\begin{DoxyCode}{0} |
| 108 |
\DoxyCodeLine{./autogen.sh} |
| 109 |
\DoxyCodeLine{./configure} |
| 110 |
\DoxyCodeLine{make} |
| 111 |
\DoxyCodeLine{make\ install} |
| 112 |
|
| 113 |
\end{DoxyCode} |
| 114 |
|
| 115 |
|
| 116 |
If HTSlib was installed using conda, please run the following commands by supplying the prefix to the bin folder of the conda binary. |
| 117 |
|
| 118 |
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. |
| 119 |
|
| 120 |
|
| 121 |
\begin{DoxyCode}{0} |
| 122 |
\DoxyCodeLine{./autogen.sh} |
| 123 |
\DoxyCodeLine{./configure\ -\/-\/with-\/hts=/prefix/to/bin/folder/with/HTSlib} |
| 124 |
\DoxyCodeLine{make} |
| 125 |
\DoxyCodeLine{make\ install} |
| 126 |
|
| 127 |
\end{DoxyCode} |
| 128 |
|
| 129 |
|
| 130 |
If HTSlib was installed in a non standard location, please run the following commands, |
| 131 |
|
| 132 |
|
| 133 |
\begin{DoxyCode}{0} |
| 134 |
\DoxyCodeLine{./autogen.sh} |
| 135 |
\DoxyCodeLine{./configure\ -\/-\/with-\/hts=/prefix/to/bin/folder/with/HTSlib} |
| 136 |
\DoxyCodeLine{make} |
| 137 |
\DoxyCodeLine{make\ install} |
| 138 |
|
| 139 |
\end{DoxyCode} |
| 140 |
|
| 141 |
|
| 142 |
To test installation just run, {\ttfamily ivar version} and you should get the following output, |
| 143 |
|
| 144 |
|
| 145 |
\begin{DoxyCode}{0} |
| 146 |
\DoxyCodeLine{iVar\ version\ 1.0} |
| 147 |
\DoxyCodeLine{} |
| 148 |
\DoxyCodeLine{Please\ raise\ issues\ and\ bug\ reports\ at\ https://github.com/andersen-\/lab/ivar/} |
| 149 |
|
| 150 |
\end{DoxyCode} |
| 151 |
\hypertarget{installpage_autotoc_md7}{}\doxysection{\texorpdfstring{Installing on Linux}{Installing on Linux}}\label{installpage_autotoc_md7} |
| 152 |
\hypertarget{installpage_autotoc_md8}{}\doxysubsection{\texorpdfstring{Installing build tools}{Installing build tools}}\label{installpage_autotoc_md8} |
| 153 |
\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. |
| 154 |
|
| 155 |
To install Autotools using \href{https://help.ubuntu.com/lts/serverguide/apt.html}{\texttt{ APT}} please use the command below, |
| 156 |
|
| 157 |
|
| 158 |
\begin{DoxyCode}{0} |
| 159 |
\DoxyCodeLine{apt-\/get\ install\ autotools-\/dev} |
| 160 |
|
| 161 |
\end{DoxyCode} |
| 162 |
\hypertarget{installpage_autotoc_md9}{}\doxysubsection{\texorpdfstring{HTSlib installed using conda}{HTSlib installed using conda}}\label{installpage_autotoc_md9} |
| 163 |
HTSlib can be installed with \href{https://conda.io/docs/}{\texttt{ conda}} using the command, |
| 164 |
|
| 165 |
|
| 166 |
\begin{DoxyCode}{0} |
| 167 |
\DoxyCodeLine{conda\ install\ -\/c\ bioconda\ htslib} |
| 168 |
|
| 169 |
\end{DoxyCode} |
| 170 |
|
| 171 |
|
| 172 |
The conda binary is by default installed at /opt/. You can check the installation location by running the following command, |
| 173 |
|
| 174 |
|
| 175 |
\begin{DoxyCode}{0} |
| 176 |
\DoxyCodeLine{which\ conda} |
| 177 |
|
| 178 |
\end{DoxyCode} |
| 179 |
|
| 180 |
|
| 181 |
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. |
| 182 |
|
| 183 |
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 \texorpdfstring{$\sim$}{\string~}/.bash\+\_\+profile or \texorpdfstring{$\sim$}{\string~}/.bashrc to avoid rerunning the command everytime a new bash session starts. |
| 184 |
|
| 185 |
|
| 186 |
\begin{DoxyCode}{0} |
| 187 |
\DoxyCodeLine{export\ LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/opt/conda/lib} |
| 188 |
|
| 189 |
\end{DoxyCode} |
| 190 |
\hypertarget{installpage_autotoc_md10}{}\doxysubsection{\texorpdfstring{HTSlib installed from source}{HTSlib installed from source}}\label{installpage_autotoc_md10} |
| 191 |
Installation instructions and downloads for HTSlib can be found at \href{http://www.htslib.org/download/}{\texttt{ http\+://www.\+htslib.\+org/download/}}. |
| 192 |
|
| 193 |
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. |
| 194 |
|
| 195 |
|
| 196 |
\begin{DoxyCode}{0} |
| 197 |
\DoxyCodeLine{export\ LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/path/to/hts/lib/folder} |
| 198 |
|
| 199 |
\end{DoxyCode} |
| 200 |
\hypertarget{installpage_autotoc_md11}{}\doxysubsection{\texorpdfstring{Installing i\+Var}{Installing i\+Var}}\label{installpage_autotoc_md11} |
| 201 |
To install i\+Var, run the following commands. |
| 202 |
|
| 203 |
|
| 204 |
\begin{DoxyCode}{0} |
| 205 |
\DoxyCodeLine{./autogen.sh} |
| 206 |
\DoxyCodeLine{./configure} |
| 207 |
\DoxyCodeLine{make} |
| 208 |
\DoxyCodeLine{make\ install} |
| 209 |
|
| 210 |
\end{DoxyCode} |
| 211 |
|
| 212 |
|
| 213 |
If HTSlib was installed using conda, please run the following commands by supplying the prefix to the bin folder of the conda binary. |
| 214 |
|
| 215 |
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. |
| 216 |
|
| 217 |
|
| 218 |
\begin{DoxyCode}{0} |
| 219 |
\DoxyCodeLine{./autogen.sh} |
| 220 |
\DoxyCodeLine{./configure\ -\/-\/with-\/hts=/prefix/to/bin/folder/with/HTSlib} |
| 221 |
\DoxyCodeLine{make} |
| 222 |
\DoxyCodeLine{make\ install} |
| 223 |
|
| 224 |
\end{DoxyCode} |
| 225 |
|
| 226 |
|
| 227 |
If HTSlib was installed in a non standard location, please run the following commands, |
| 228 |
|
| 229 |
|
| 230 |
\begin{DoxyCode}{0} |
| 231 |
\DoxyCodeLine{./autogen.sh} |
| 232 |
\DoxyCodeLine{./configure\ -\/-\/with-\/hts=/prefix/to/bin/folder/with/HTSlib} |
| 233 |
\DoxyCodeLine{make} |
| 234 |
\DoxyCodeLine{make\ install} |
| 235 |
|
| 236 |
\end{DoxyCode} |
| 237 |
|
| 238 |
|
| 239 |
To test installation just run, {\ttfamily ivar version} and you should get the following output, |
| 240 |
|
| 241 |
|
| 242 |
\begin{DoxyCode}{0} |
| 243 |
\DoxyCodeLine{iVar\ version\ 1.0} |
| 244 |
\DoxyCodeLine{} |
| 245 |
\DoxyCodeLine{Please\ raise\ issues\ and\ bug\ reports\ at\ https://github.com/andersen-\/lab/ivar/} |
| 246 |
|
| 247 |
\end{DoxyCode} |
| 248 |
\hypertarget{installpage_autotoc_md12}{}\doxysection{\texorpdfstring{Running from Docker}{Running from Docker}}\label{installpage_autotoc_md12} |
| 249 |
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, |
| 250 |
|
| 251 |
|
| 252 |
\begin{DoxyCode}{0} |
| 253 |
\DoxyCodeLine{docker\ pull\ andersenlabapps/ivar} |
| 254 |
|
| 255 |
\end{DoxyCode} |
| 256 |
|
| 257 |
|
| 258 |
This docker image contains all the required dependencies to run i\+Var and the \doxysectlink{cookbookpage}{pipelines}{0} 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}}. |
| 259 |
|
| 260 |
\href{https://hub.docker.com/r/andersenlabapps/ivar/}{\texttt{ i\+Var on Docker Hub}}\hypertarget{installpage_autotoc_md13}{}\doxysection{\texorpdfstring{Contact}{Contact}}\label{installpage_autotoc_md13} |
| 261 |
For bug reports please email gkarthik\mbox{[}at\mbox{]}scripps.\+edu or raise an issue on Github. |