/
setup-conda-env.sh
42 lines (28 loc) · 1.2 KB
/
setup-conda-env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
# setting colors to use
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
gzip -d test_dataset.tar.gz
tar xf test_dataset.tar
rm test_dataset.tar
printf "\n ${GREEN}Setting up conda environment...${NC}\n\n"
## adding conda channels
conda config --add channels defaults 2> /dev/null
conda config --add channels bioconda 2> /dev/null
conda config --add channels conda-forge 2> /dev/null
conda config --add channels au-eoed 2> /dev/null
## creating GToTree environment and installing dependencies
conda create -n fegenie -c r r-ggplot2 r-stringi r-ggpubr r-reshape r-reshape2 r-tidyverse r-argparse r-ggdendro r-pvclust python=3.7 hmmer diamond prodigal blast metabat2 --yes
## activating environment
conda activate fegenie
## creating directory for conda-env-specific source files
mkdir -p ${CONDA_PREFIX}/etc/conda/activate.d
## adding FeGenie bin path and HMM_dir variable:
echo '#!/bin/sh'" \
export PATH=\"$(pwd):"'$PATH'\"" \
export rscripts=\"$(pwd)/rscripts\"
export iron_hmms=\"$(pwd)/hmms/iron\"" >> ${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh
# re-activating environment so variable and PATH changes take effect
conda activate fegenie
printf "\n ${GREEN}DONE!${NC}\n\n"