-
Notifications
You must be signed in to change notification settings - Fork 6
/
test_installation.sh
executable file
·123 lines (107 loc) · 3.07 KB
/
test_installation.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/bin/bash
cd test_files
mkdir tmp_test
gunzip test_DB.dmnd.gz
genEra -q test_seqs.fasta \
-t 559292 -b test_DB \
-d test_taxdump \
-r test_ncbi_lineages.csv \
-n 1 -x tmp_test \
-s test_distances.tsv -i true -F true > log
WARNINGTEST=0
GENERASCRIPT=$(which genEra)
if [[ -z ${GENERASCRIPT} ]]; then
echo
echo " ERROR: Please make sure that genEra is located in your PATH"
echo
gzip test_DB.dmnd
rm -fr tmp_test
cd ../
exit 1
fi
PHYLOSCRIPT=$(which Erassignment)
if [[ -z ${PHYLOSCRIPT} ]]; then
echo
echo " ERROR: Please make sure that Erassignment is located in your PATH"
echo
gzip test_DB.dmnd
rm -fr tmp_test
cd ../
exit 1
fi
F3R=$(which FASTSTEP3R)
if [[ -z ${F3R} ]]; then
echo
echo " ERROR: Please make sure that FASTSTEP3R script is located in your PATH"
echo
gzip test_DB.dmnd
rm -fr tmp_test
cd ../
exit 1
fi
if grep -q "YBR238C XP_033764827.1 0.0 1350 27291" tmp_test/tmp_559292_*/559292_Diamond_results.bout; then
echo "STEP 1: PASSED"
else
echo "STEP 1: FAILED"
echo "please make sure that diamond is working correctly"
echo "or contact [email protected] to address the issue"
gzip test_DB.dmnd
rm -fr tmp_test
cd ../
exit 1
fi
if grep -q "1071382,Kazachstania africana CBS 2517,Kazachstania,Saccharomycetaceae,Saccharomycetales,saccharomyceta" 559292_ncbi_lineages.csv; then
echo "STEP 2: PASSED"
else
echo "STEP 2: FAILED"
echo "Please make sure to follow the github instructions for a correct installation"
echo "or contact [email protected] to address the issue"
gzip test_DB.dmnd
rm -fr tmp_test
cd ../
exit 1
fi
if grep -q "2 Saccharomycetales 2" 559292_gene_age_summary.tsv; then
echo "STEP 3: PASSED"
else
echo "STEP 3: FAILED"
echo "Please make sure to follow the github instructions for a correct installation"
echo "or contact [email protected] to address the issue"
gzip test_DB.dmnd
rm -fr tmp_test
cd ../
exit 1
fi
if grep -q "YBR238C,YGL107C Saccharomycetales 2 2" 559292_founder_events.tsv; then
echo "gene clustering: PASSED"
else
echo "gene clustering: FAILED"
echo "please make sure that mcl is working correctly"
echo "or contact [email protected] to address the issue"
gzip test_DB.dmnd
rm -fr tmp_test
cd ../
exit 1
fi
if grep -q "YBR238C Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected Ortholog_detected 0.0" 559292_abSENSE_results/Detection_failure_probabilities; then
echo "STEP 4: PASSED"
else
echo "STEP 4: FAILED"
echo "WARNING: Homology detection failure cannot be tested"
echo "Please make sure that abSENSE.py is working correctly"
echo "or contact [email protected] to address the issue"
WARNINGTEST+=1
fi
rm -fr tmp_test 559292_* log
gzip test_DB.dmnd
if [ ${WARNINGTEST} -eq 0 ]; then
echo
echo "GenEra is ready to be used!"
echo
else
echo
echo "Found ${WARNINGTEST} WARNINGS, genEra results may be suboptimal"
echo
fi
cd ../
exit 0