-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
The easiest way to install all the dependencies needed is by using mamba or conda. We recommend using mamba's maintained miniforge. Miniforge is available for MacOS, Linux, and Windows. For all future examples, unless otherwise stated, we are assuming you are using Linux.
To install miniforge, run wget -c https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
and then bash Miniforge3-Linux-x86_64.sh
. You'll need to run through the prompts and then give it a download location if the default is not to your liking. Finally, you can let mamba initialize itself if you want mamba to always be in your "base" when you open the terminal. Otherwise, if you say no
then you will have to manually source the executable for mamba which can be done similarly as source /your/path/to/miniforge3/bin/activate
.
Now you are ready to start installing the dependencies.
Important::: We have replaced the BURST package with Vsearch. If you are having issues with BURST, please switch over to vsearch!
Please note, we assume in these instructions you are working off of base-r and NOT Rstudio. We describe at the bottom of this section how to use Rstudio while still installing the dependencies with mamba.
You can make a conda evnironment using the supplied yaml file and not worry about installing any dependencies. Run mamba env create -f environment.yml
and then mamba activate phylogenize
. Open base-r (look below for how to use Rstudio) and then type devtools::install_bitbucket('pbradz/phylogenize/package/phylogenize')
followed by library("phylogenize")
and then phylogenize::install.data.figshare()
.
-
Make sure you have R installed. You can verify if you type
R --version
. If you don't you can get the latest version here or install it using mamba here.P.S use this website to look for any packages you need to install. Conda is the older version of mamba and the commands are the same. For R the command is like so
mamba install -c r r
-
Create a new environment in mamba by running
mamba create -n phylogenize
-
Activate your new environment with
mamba activate phylogenize
-
Install the dependencies with the bioconda and conda-forge channels as shown below
mamba install -y -c bioconda \
bioconductor-qvalue \
bioconductor-ggtree \
bioconductor-biomformat \
vsearch
mamba install -y -c conda-forge \
r-devtools \
r-ragg \
r-phylolm \
r-phangorn
- Now you can install phylogenize by running either
R -e "devtools::install_bitbucket('pbradz/phylogenize/package/phylogenize')"
or by opening an R session and then runningdevtools::install_bitbucket('pbradz/phylogenize/package/phylogenize')
. - Run
library("phylogenize")
in your R session. - Then download the necessary databases with
phylogenize::install.data.figshare()
After creating a phylogenize
environment in mamba, to install and use Rstudio run mamba install -c r rstudio
. Then you can activate it by typing rstudio
. This will launch an Rstudio IDE. There, if you haven't already, you can run devtools::install_bitbucket('pbradz/phylogenize/package/phylogenize')
followed by library("phylogenize")
and then phylogenize::install.data.figshare()
.
QIIME 2 runs in a conda environment, meaning it has its own installation of R and related packages. To run phylogenize with QIIME 2, you will need to install phylogenize within the QIIME 2 conda environment, then install the q2-phylogenize plugin. The instructions are similar for installing in any other conda environment, except you won't need the plugin.
- First, switch to the correct environment. For QIIME 2, this is accomplished with
source activate qiime2-2019.4
(see here). Note that you may need to replace "2019.4" with the most recent version of QIIME2, e.g., "2020.6".
options(unzip="internal")
Sys.setenv(TAR="/bin/tar") # replace with path to tar in your installation, if necessary
These options only stick around for your current session, so re-run them if you quit and come back to the installation process. You shouldn't need to run them once phylogenize is installed, though.
Next try:
install.packages("BiocManager")
BiocManager::install(c("qvalue","biomformat","ggtree"))
Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")
devtools::install_bitbucket("pbradz/phylogenize/package/phylogenize")
phylogenize::install.data.figshare() # nb: this may take a while to download
To avoid causing problems elsewhere in QIIME2, we recommend not updating any other packages if prompted.
Note (updated 8/4/2020): If you get an error message about the package "mnormt" and/or "phylolm" not being available for R 3.5.1, try installing a specific version with the command remotes::install_version("mnormt", "1.5-5"); remotes::install_version("phylolm", "2.6")
. Then retry the above commands starting from the devtools::install_bitbucket
line.
Note (updated 8/10/2020): If you get errors installing the package "igraph" that relate to "-lgomp", first install libgomp from the command line (outside of R, but in your QIIME2 environment) with conda install libgomp
. Because of some quirks in where conda expects libraries to be, you may then also need to manually put the libgomp
library in your QIIME2 environment. You can do that with a soft-link, e.g., ln -s ~/miniconda3/lib/libgomp.so ~/miniconda3/envs/qiime2-2020.6/x86_64-conda-linux-gnu/lib/
. Substitute your anaconda directory for "~/miniconda3" and your QIIME2 environment name for "qiime2-2020.6" as needed.
Note: If you are having trouble with the install_bitbucket
command on Windows or within the QIIME2 VM on Windows, you can try instead downloading the repository and unzipping it, then running:
devtools::install(pkg="[...]/package/phylogenize")
... where [...]
should be replaced with the path where you unzipped the repository. Then run install.data.figshare()
as above.
Finally, install the plugin. From the UNIX command line (i.e., not in R -- you can use the command quit()
or press Ctrl+D to leave the R environment; don't worry about "saving" since the packages will remain installed):
git clone https://bitbucket.org/pbradz/q2-phylogenize
cd q2-phylogenize
python setup.py build
python setup.py install
Further information about how to use q2-phylogenize can be found on its git repository. If you are just using conda and not QIIME 2, you can just proceed to the section entitled "Running phylogenize using the R interface."
We recommend you install phylogenize in a conda environment as above. However, because the default Amazon images are meant for headless operation they are missing some tools to deal with fonts that phylogenize uses to generate its plots. You can install those as follows:
conda install -c conda-forge xorg-libxt
sudo apt install zlib
sudo apt show zlib1g
sudo apt install fontconfig
To reinstall phylogenize, the following should be all that's necessary:
devtools::install_bitbucket("pbradz/phylogenize/package/phylogenize")
phylogenize::install.data.figshare()