-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
96 lines (80 loc) · 2.65 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
echo "Starting ReporType installation!"
## remove environment if exist
if conda env list | grep "^ReporType" >/dev/null 2>&1; then
conda remove -n ReporType --all
fi
## create a new environment
conda create -n ReporType python=3.8
echo "Install softwares in conda..."
source activate ReporType && pip install -r requirements.txt && conda install -c bioconda -c conda-forge nanofilt --yes && conda install -c bioconda -c conda-forge spades --yes && conda install -c bioconda -c conda-forge abricate=1.0.1 --yes && conda install -c bioconda -c conda-forge raven-assembler trimmomatic emboss --yes
################
echo "Checking instalation..."
# Testing Python instalation
if python3 --version | grep -q "Python"; then
echo "Python correctly"
else
echo "Error installing Python"
fi
# Testing Pandas instalation
if python3 -c "import pandas; print('pandas', pandas.__version__)" | grep -q "pandas"; then
echo "Pandas installed correctly"
else
echo "Error installing Pandas"
fi
# Testing NumPy instalation
if python3 -c "import numpy; print('numpy',numpy.__version__)" | grep -q "numpy"; then
echo "NumPy installed correctly"
else
echo "Error installing NumPy"
fi
# Testing Biopython instalation
if python3 -c "import Bio; print('biopython',Bio.__version__)" | grep -q "biopython"; then
echo "Biopython installed correctly"
else
echo "Error installing Biopython"
fi
# Testing Snakemake instalation
if command -v snakemake >/dev/null 2>&1 ; then
echo "Snakemake installed correctly"
else
echo "Erro installing o Snakemake."
fi
# Testing Abricate instalation
if abricate --version | grep -q "abricate"; then
echo "Abricate installed correctly"
else
echo "Error installing Abricate"
fi
# Testing Raven instalation
if command -v raven >/dev/null 2>&1 ; then
echo "Raven installed correctly"
else
echo "Erro installing Raven"
fi
# Testing SPAdes instalation
if spades.py --version | grep -q -e "SPAdes genome assembler" -e "SPAdes"; then
echo "SPAdes installed correctly"
else
echo "Error installing SPAdes"
fi
# Testing trimmomatic instalation
if command -v trimmomatic >/dev/null 2>&1 ; then
echo "Trimmomatic installed correctly"
else
echo "Erro installing Trimmomatic."
fi
# Testing EMBOSS instalation
if which abiview | grep -q "abiview"; then
echo "EMBOSS installed correctly"
else
echo "Error installing EMBOSS"
fi
# Testing NanoFilt instalation
if NanoFilt --version | grep -q "NanoFilt"; then
echo "NanoFilt installed correctly"
else
echo "Error installing NanoFilt"
fi
echo "To activate ReporType run:"
echo "$ alias ReporType='conda activate ReporType && snakemake'; conda activate ReporType"