forked from BigDataBiology/macrel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·73 lines (58 loc) · 1.86 KB
/
install.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env bash
set -v
set -e
# This is set in travis
if [[ x$PYTHON_VERSION == x ]]; then
PYTHON_VERSION=3.7
fi
echo "
# Macrel - (Meta)genomic AMP Classification and Retrieval
AUTHORS: Célio Dias Santos Júnior, Luis Pedro Coelho
"
if ! which conda > /dev/null; then
echo "[ Conda not found. Please install miniconda and add 'conda' to the PATH: "
echo " curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
echo " sh Miniconda3-latest-Linux-x86_64.sh"
exit 1
fi
eval "$(conda shell.bash hook)"
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "# Creating new environment for Macrel"
mkdir -p envs
conda create --yes -p $BASEDIR/envs/Macrel_env python=$PYTHON_VERSION
conda config --env --add channels defaults
conda config --env --add channels bioconda
conda config --env --add channels conda-forge
if ! which mamba > /dev/null; then
CONDA_INSTALL_CMD=conda
else
echo "# Installing packages with MAMBA"
CONDA_INSTALL_CMD=mamba
fi
${CONDA_INSTALL_CMD} install -y \
--prefix $BASEDIR/envs/Macrel_env \
ngless \
"pyrodigal<3.0.0" \
megahit \
paladin \
pandas \
"scikit-learn<1.3.0" \
"joblib<1.3.0" \
atomicwrites \
tzlocal
# only activate AFTER install all the packages to get the right environmental variables
source activate $BASEDIR/envs/Macrel_env
# env forwards the current environment and sets some extra variables needed by
# ./recipe/build.sh
env \
PYTHON=$(which python) \
SRC_DIR=$PWD \
PREFIX=$CONDA_PREFIX \
./recipe/build.sh
echo "############ Installation procedures finished
****** Thank you for installing Macrel ********
--- Please submit bugreports/comments to
celio.diasjunior@gmail.com
or
https://github.com/BigDataBiology/macrel/issues
"