| 1 | Installation {#installpage} |
| 2 | ============ |
| 3 | |
| 4 | [TOC] |
| 5 | |
| 6 | ### Dependencies |
| 7 | |
| 8 | * [HTSlib](http://www.htslib.org/download/) |
| 9 | * [GCC](https://gcc.gnu.org/) any version after v5.0. Support for c++11 standard required. |
| 10 | |
| 11 | Note: |
| 12 | * It is highly recommended that [samtools](https://github.com/samtools/samtools) also be installed alongside iVar. iVar uses the output of samtools mpileup to call variants and generate consensus sequences. In addition, samtools `sort` and `index` commands are very useful to setup a pipeline using iVar. |
| 13 | |
| 14 | Installing via conda |
| 15 | ==================== |
| 16 | |
| 17 | iVar is available on bioconda. To install conda, please use the [miniconda](https://conda.io/miniconda.html) package. After intalling conda please add the following channels, |
| 18 | |
| 19 | ``` |
| 20 | conda config --add channels defaults |
| 21 | conda config --add channels bioconda |
| 22 | conda config --add channels conda-forge |
| 23 | ``` |
| 24 | |
| 25 | To install iVar, |
| 26 | |
| 27 | ``` |
| 28 | conda install ivar |
| 29 | ``` |
| 30 | |
| 31 | Installing via homebrew |
| 32 | ----------------------- |
| 33 | |
| 34 | iVar can be installed using [Homebrew](https://brew.sh/). |
| 35 | |
| 36 | ``` |
| 37 | brew install brewsci/bio/ivar |
| 38 | ``` |
| 39 | |
| 40 | Installing on Mac |
| 41 | ================= |
| 42 | |
| 43 | Installing build tools |
| 44 | ---------------------- |
| 45 | |
| 46 | [Xcode](https://developer.apple.com/xcode/) from Apple is required to compile iVar (and other tools) from source. If you don't want to install the full Xcode package from the AppStore, you can install the Xcode command line tools, |
| 47 | |
| 48 | ``` |
| 49 | xcode-select --install |
| 50 | ``` |
| 51 | |
| 52 | [GNU Autotools](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html#Autotools-Introduction) is required to compile iVar from source. |
| 53 | |
| 54 | To install Autotools using [homebrew](https://brew.sh/) please use the command below, |
| 55 | |
| 56 | ``` |
| 57 | brew install autoconf automake libtool |
| 58 | ``` |
| 59 | |
| 60 | HTSlib installed using conda |
| 61 | ----------------------------- |
| 62 | |
| 63 | HTSlib can be installed with [conda](https://conda.io/docs/) using the command, |
| 64 | |
| 65 | ``` |
| 66 | conda install -c bioconda htslib |
| 67 | ``` |
| 68 | |
| 69 | The conda binary is by default installed at /opt/. You can check the installation location by running the following command, |
| 70 | |
| 71 | ``` |
| 72 | which conda |
| 73 | ``` |
| 74 | |
| 75 | 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. |
| 76 | |
| 77 | 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. |
| 78 | You can add this to your ~/.bash_profile or ~/.bashrc to avoid rerunning the command everytime a new bash session starts. |
| 79 | |
| 80 | ``` |
| 81 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib |
| 82 | ``` |
| 83 | |
| 84 | HTSlib installed from source |
| 85 | ---------------------------- |
| 86 | |
| 87 | Installation instructions and downloads for HTSlib can be found at http://www.htslib.org/download/. |
| 88 | |
| 89 | If HTSlib is installed in a non standard location, please add the following to your .bash_profile so that iVar can find HTSlib dynamic libraries during runtime. |
| 90 | |
| 91 | ``` |
| 92 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/hts/lib/folder |
| 93 | ``` |
| 94 | |
| 95 | Installing iVar |
| 96 | --------------- |
| 97 | |
| 98 | To install iVar, run the following commands. |
| 99 | |
| 100 | ``` |
| 101 | ./autogen.sh |
| 102 | ./configure |
| 103 | make |
| 104 | make install |
| 105 | ``` |
| 106 | |
| 107 | If HTSlib was installed using conda, please run the following commands by supplying the prefix to the bin folder of the conda binary. |
| 108 | |
| 109 | The prefix to the bin folder can be found using the command `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. |
| 110 | |
| 111 | ``` |
| 112 | ./autogen.sh |
| 113 | ./configure --with-hts=/prefix/to/bin/folder/with/HTSlib |
| 114 | make |
| 115 | make install |
| 116 | ``` |
| 117 | |
| 118 | If HTSlib was installed in a non standard location, please run the following commands, |
| 119 | |
| 120 | ``` |
| 121 | ./autogen.sh |
| 122 | ./configure --with-hts=/prefix/to/bin/folder/with/HTSlib |
| 123 | make |
| 124 | make install |
| 125 | ``` |
| 126 | |
| 127 | To test installation just run, `ivar version` and you should get the following output, |
| 128 | |
| 129 | ``` |
| 130 | iVar version 1.0 |
| 131 | |
| 132 | Please raise issues and bug reports at https://github.com/andersen-lab/ivar/ |
| 133 | ``` |
| 134 | |
| 135 | Installing on Linux |
| 136 | =================== |
| 137 | |
| 138 | Installing build tools |
| 139 | ---------------------- |
| 140 | |
| 141 | [GNU Autotools](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html#Autotools-Introduction) is required to compile iVar from source. |
| 142 | |
| 143 | To install Autotools using [APT](https://help.ubuntu.com/lts/serverguide/apt.html) please use the command below, |
| 144 | |
| 145 | ``` |
| 146 | apt-get install autotools-dev |
| 147 | ``` |
| 148 | |
| 149 | HTSlib installed using conda |
| 150 | ----------------------------- |
| 151 | |
| 152 | HTSlib can be installed with [conda](https://conda.io/docs/) using the command, |
| 153 | |
| 154 | ``` |
| 155 | conda install -c bioconda htslib |
| 156 | ``` |
| 157 | |
| 158 | The conda binary is by default installed at /opt/. You can check the installation location by running the following command, |
| 159 | |
| 160 | ``` |
| 161 | which conda |
| 162 | ``` |
| 163 | |
| 164 | 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. |
| 165 | |
| 166 | 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. |
| 167 | You can add this to your ~/.bash_profile or ~/.bashrc to avoid rerunning the command everytime a new bash session starts. |
| 168 | |
| 169 | ``` |
| 170 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib |
| 171 | ``` |
| 172 | |
| 173 | HTSlib installed from source |
| 174 | ---------------------------- |
| 175 | |
| 176 | Installation instructions and downloads for HTSlib can be found at http://www.htslib.org/download/. |
| 177 | |
| 178 | If HTSlib is installed in a non standard location, please add the following to your .bash_profile so that iVar can find HTSlib dynamic libraries during runtime. |
| 179 | |
| 180 | ``` |
| 181 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/hts/lib/folder |
| 182 | ``` |
| 183 | |
| 184 | Installing iVar |
| 185 | --------------- |
| 186 | |
| 187 | To install iVar, run the following commands. |
| 188 | |
| 189 | ``` |
| 190 | ./autogen.sh |
| 191 | ./configure |
| 192 | make |
| 193 | make install |
| 194 | ``` |
| 195 | |
| 196 | If HTSlib was installed using conda, please run the following commands by supplying the prefix to the bin folder of the conda binary. |
| 197 | |
| 198 | The prefix to the bin folder can be found using the command `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. |
| 199 | |
| 200 | ``` |
| 201 | ./autogen.sh |
| 202 | ./configure --with-hts=/prefix/to/bin/folder/with/HTSlib |
| 203 | make |
| 204 | make install |
| 205 | ``` |
| 206 | |
| 207 | If HTSlib was installed in a non standard location, please run the following commands, |
| 208 | |
| 209 | ``` |
| 210 | ./autogen.sh |
| 211 | ./configure --with-hts=/prefix/to/bin/folder/with/HTSlib |
| 212 | make |
| 213 | make install |
| 214 | ``` |
| 215 | |
| 216 | To test installation just run, `ivar version` and you should get the following output, |
| 217 | |
| 218 | ``` |
| 219 | iVar version 1.0 |
| 220 | |
| 221 | Please raise issues and bug reports at https://github.com/andersen-lab/ivar/ |
| 222 | ``` |
| 223 | |
| 224 | |
| 225 | Running from Docker |
| 226 | =================== |
| 227 | |
| 228 | iVar can also be run via [Docker](https://www.docker.com/). Pull the docker image from [Docker Hub](https://hub.docker.com/) using the following command, |
| 229 | |
| 230 | ``` |
| 231 | docker pull andersenlabapps/ivar |
| 232 | ``` |
| 233 | |
| 234 | This docker image contains all the required dependencies to run iVar and the [pipelines](@ref cookbookpage) developed using iVar. |
| 235 | You will have to attach a docker volume to get data into the docker container. Instructions to do so are in the [Docker docs](https://docs.docker.com/storage/volumes/). |
| 236 | |
| 237 | [iVar on Docker Hub](https://hub.docker.com/r/andersenlabapps/ivar/) |
| 238 | |
| 239 | Contact |
| 240 | ======= |
| 241 | |
| 242 | For bug reports please email gkarthik[at]scripps.edu or raise an issue on Github. |