-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalyze-smurf.sh
More file actions
executable file
·166 lines (142 loc) · 4.55 KB
/
analyze-smurf.sh
File metadata and controls
executable file
·166 lines (142 loc) · 4.55 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/usr/bin/env bash
#
# analyze-smurf.sh - run all scripts necessary to generate positive and
# negative controls for analyzing the efficacy of smurf versus hmmer
# Copyright 2010 Jeffrey Finkelstein
#
# This file is part of smurf.
#
# smurf is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 2 of the License, or (at your option) any later
# version.
#
# smurf is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# smurf. If not, see <http://www.gnu.org/licenses/>.
# run this script from the current directory, because the scripts which it
# calls have hardcoded locations
STATUS_ARGS=4
if [ $# -lt 7 ]; then
echo "Usage: $0 <output-dir> <superfamily-sunid> <beta-threshold> <run-hmmer> <simev-freq> <simev-count> <simev-threshold> [skip-matt]"
exit $STATUS_ARGS
fi
OUTPUT_DIR=$1
SUPERFAMILY=$2
THRESHOLD=$3
RUN_HMMER=$4
SIMEV_FREQ=$5
SIMEV_COUNT=$6
SIMEV_THRESHOLD=$7
SKIPMATT=$8
### vary: beta threshold, simev freq (10, 50), simev threshold (0, same as beta)
# these args go to generate-hmm (freq, simev threshold, simev count)
HMMER=hmmer
SMURF=smurf
PROFILE_SMURF=profile-smurf
SMURF_LITE=smurf-lite
# generate the consensus multiple alignment template
if [ -z $SKIPMATT ]; then
./generate-matt-alignments.py -v -r blast7 $OUTPUT_DIR $SUPERFAMILY
if [ $? -ne 0 ]; then
echo "generate-matt-alignments.py exited with status $?"
exit $?
fi
fi
# run smurf-lite queries
./generate-hmm.py -v $OUTPUT_DIR $SMURF_LITE -s $THRESHOLD -f $SIMEV_FREQ -c $SIMEV_COUNT -t $SIMEV_THRESHOLD
if [ $? -ne 0 ]; then
echo "generate-hmm.py exited with status $?"
exit $?
fi
./generate-positive-controls.py -v -r nonident $OUTPUT_DIR $SMURF_LITE $SUPERFAMILY
if [ $? -ne 0 ]; then
echo "generate-positive-controls.py exited with status $?"
exit $?
fi
./generate-negative-controls.py -v -r blast7 $OUTPUT_DIR $SMURF_LITE $SUPERFAMILY
if [ $? -ne 0 ]; then
echo "generate-negative-controls.py exited with status $?"
exit $?
fi
# generate smurf-lite csv
./generate-csv.py -v $OUTPUT_DIR $SMURF_LITE
if [ $? -ne 0 ]; then
echo "generate-csv.py exited with status $?"
exit $?
fi
# only run HMMER if HMMER specified, to save time
if [ $RUN_HMMER -eq 1 ]; then
# run hmmer queries
./generate-hmm.py -v $OUTPUT_DIR $HMMER
if [ $? -ne 0 ]; then
echo "generate-hmm.py exited with status $?"
exit $?
fi
./generate-positive-controls.py -v -r nonident $OUTPUT_DIR $HMMER $SUPERFAMILY
if [ $? -ne 0 ]; then
echo "generate-positive-controls.py exited with status $?"
exit $?
fi
./generate-negative-controls.py -v -r blast7 $OUTPUT_DIR $HMMER $SUPERFAMILY
if [ $? -ne 0 ]; then
echo "generate-negative-controls.py exited with status $?"
exit $?
fi
# generate HMMER csv
./generate-csv.py -v $OUTPUT_DIR $HMMER
if [ $? -ne 0 ]; then
echo "generate-csv.py exited with status $?"
exit $?
fi
fi
# run smurf queries
# ./generate-hmm.py -v $OUTPUT_DIR $SMURF
# if ($? != 0) then
# echo "generate-hmm.py exited with status $?"
# exit $?
# endif
#
# ./generate-positive-controls.py -v $OUTPUT_DIR $SMURF $SUPERFAMILY
# if ($? != 0) then
# echo "generate-positive-controls.py exited with status $?"
# exit $?
# endif
#
# ./generate-negative-controls.py -v -r blast7 $OUTPUT_DIR $SMURF $SUPERFAMILY
# if ($? != 0) then
# echo "generate-negative-controls.py exited with status $?"
# exit $?
# endif
# run profile-smurf queries
# ./generate-hmm.py -v $OUTPUT_DIR $PROFILE_SMURF
# if ($? != 0) then
# echo "generate-hmm.py exited with status $?"
# exit $?
# endif
#
# ./generate-positive-controls.py -v $OUTPUT_DIR $PROFILE_SMURF $SUPERFAMILY
# if ($? != 0) then
# echo "generate-positive-controls.py exited with status $?"
# exit $?
# endif
#
# ./generate-negative-controls.py -v $OUTPUT_DIR $PROFILE_SMURF $SUPERFAMILY
# if ($? != 0) then
# echo "generate-negative-controls.py exited with status $?"
# exit $?
# endif
# ./generate-csv.py -v $OUTPUT_DIR $SMURF
# if ($? != 0) then
# echo "generate-csv.py exited with status $?"
# exit $?
# endif
# ./generate-csv.py -v $OUTPUT_DIR $PROFILE_SMURF
# if ($? != 0) then
# echo "generate-csv.py exited with status $?"
# exit $?
# endif
exit 0