-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.sh
executable file
·41 lines (26 loc) · 1.22 KB
/
setup.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
#!/usr/bin/env bash
# setting colors to use
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
chmod +x spray-and-pray.py
gzip -d taxmap_slv_ssu_ref_nr_138.1.txt.gz
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 sprayandpray -c au-eoed -c conda-forge -c bioconda -c defaults -c r r-tm r-snowballc r-rcolorbrewer r-xml r-argparse r-wordcloud biopython diamond prodigal metabat2 hmmer python=3.7 numpy matplotlib scikit-learn joblib --yes
## activating environment
source activate sprayandpray
## creating directory for conda-env-specific source files
mkdir -p ${CONDA_PREFIX}/etc/conda/activate.d
## adding path to executable script
echo '#!/bin/sh'" \
export PATH=\"$(pwd):"'$PATH'\"" \
export rscripts=\"$(pwd)\"" >> ${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh
# re-activating environment so variable and PATH changes take effect
conda activate sprayandpray
printf "\n ${GREEN}DONE!${NC}\n\n"