forked from swvanderlaan/QTLToolKit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
QTLChecker.sh
executable file
·349 lines (313 loc) · 18.9 KB
/
QTLChecker.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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
#!/bin/bash
#
### REGARDING NOTES ###
### Please note that uncommented notes can be found at the end of this script.
###
### MoSCoW FEATURE LIST ###
###
### Creating display functions
### Setting colouring
NONE='\033[00m'
OPAQUE='\033[2m'
FLASHING='\033[5m'
BOLD='\033[1m'
ITALIC='\033[3m'
UNDERLINE='\033[4m'
STRIKETHROUGH='\033[9m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
PURPLE='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
function echobold { #'echobold' is the function name
echo -e "${BOLD}${1}${NONE}" # this is whatever the function needs to execute, note ${1} is the text for echo
}
function echoitalic {
echo -e "${ITALIC}${1}${NONE}"
}
function echonooption {
echo -e "${OPAQUE}${RED}${1}${NONE}"
}
function echoerrorflash {
echo -e "${RED}${BOLD}${FLASHING}${1}${NONE}"
}
function echoerror {
echo -e "${RED}${1}${NONE}"
}
# errors no option
function echoerrornooption {
echo -e "${YELLOW}${1}${NONE}"
}
function echoerrorflashnooption {
echo -e "${YELLOW}${BOLD}${FLASHING}${1}${NONE}"
}
script_copyright_message() {
echo ""
THISYEAR=$(date +'%Y')
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ The MIT License (MIT) +"
echo "+ Copyright (c) 2015-${THISYEAR} Sander W. van der Laan +"
echo "+ +"
echo "+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +"
echo "+ associated documentation files (the \"Software\"), to deal in the Software without restriction, +"
echo "+ including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +"
echo "+ and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +"
echo "+ subject to the following conditions: +"
echo "+ +"
echo "+ The above copyright notice and this permission notice shall be included in all copies or substantial +"
echo "+ portions of the Software. +"
echo "+ +"
echo "+ THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT +"
echo "+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +"
echo "+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES +"
echo "+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +"
echo "+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +"
echo "+ +"
echo "+ Reference: http://opensource.org. +"
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
}
script_arguments_error() {
echoerror "Number of arguments found "$#"."
echoerror ""
echoerror "$1" # additional error message
echoerror ""
echoerror "========================================================================================================="
echoerror " OPTION LIST"
echoerror ""
echoerror " * Argument #1 the study name -- set in QTLAnalyzer.sh (please refer to there)."
echoerror " * Argument #2 exclusion type."
echoerror " * Argument #3 the root directory, e.g. /hpc/dhl_ec/svanderlaan/projects/test_qtl."
echoerror " * Argument #4 where the results are saved -- set in QTLAnalyzer.sh (please refer to there)."
echoerror " * Argument #4 where the summary is saved -- set in QTLAnalyzer.sh (please refer to there)."
echoerror " * Argument #6 project name, e.g. 'CAD'."
echoerror " * Argument #7 file containing the regions of interest."
echoerror " * Argument #8 QTL type [CIS/TRANS]."
echoerror ""
echoerror " An example command would be: "
echoerror "./QTLChecker.sh [arg1] [arg2] [arg3] [arg4] [arg5] [arg6] [arg7]"
echoerror ""
echoerror "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
# The wrong arguments are passed, so we'll exit the script now!
script_copyright_message
exit 1
}
echobold "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echobold "+ QUANTITATIVE TRAIT LOCUS SUMMARIZER +"
echobold "+ +"
echobold "+ +"
echobold "+ * Written by : Sander W. van der Laan +"
echobold "+ * E-mail : [email protected] +"
echobold "+ * Last update : 2018-07-27 +"
echobold "+ * Version : 1.1.6 +"
echobold "+ +"
echobold "+ * Description : This script will check the regular nominal and permuted QTL results for success. +"
echobold "+ +"
echobold "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "Today's date and time: "$(date)
TODAY=$(date +"%Y%m%d")
echo ""
### LOADING CONFIGURATION FILE
# Loading the configuration file (please refer to the QTLToolKit-Manual for specifications of this file).
source "$1" # Depends on arg1.
### REQUIRED | GENERALS
CONFIGURATIONFILE="$1" # Depends on arg1 -- but also on where it resides!!!
### Set the study name
STUDYNAME=${STUDYNAME} # What is the study name to be used in files -- refer to QTLAnalyzer.sh for information
EXCLUSION_TYPE=${EXCLUSION_TYPE} # The exclusion type -- refer to QTLAnalyzer.sh for information
### PROJECT SPECIFIC
ROOTDIR=${ROOTDIR} # the root directory, e.g. /hpc/dhl_ec/svanderlaan/projects/test_qtl
RESULTS=${2} # The directory in which the QTLToolKit results are saved -- refer to QTLAnalyzer.sh for information
SUMMARY=${3} # The directory in which the QTLToolKit results are saved -- refer to QTLAnalyzer.sh for information
PROJECTNAME=${PROJECTNAME} # What is the projectname? E.g. 'CAD' -- refer to QTLAnalyzer.sh for information
REGIONS=${REGIONS_FILE} # The file containing the regions of interest -- refer to QTLAnalyzer.sh for information
QTL_TYPE=${QTL_TYPE} # QTL type, cis or trans
### START of if-else statement for the number of command-line arguments passed ###
if [[ $# -lt 1 ]]; then
echo " *** Oh no! Computer says no! ***"
echo ""
script_arguments_error "You must supply at least [1] argument when summarizing QTL results!"
else
### GENERIC SETTINGS
SOFTWARE=${SOFTWARE}
QTLTOOLKIT=${QTLTOOLKIT}
QCTOOL=${QCTOOL}
SNPTEST252=${SNPTEST252}
QTLTOOLS=${QTLTOOLS}
LZ13=${LZ13}
BGZIP=${BGZIP}
TABIX=${TABIX}
PLINK=${PLINK}
PYTHON=${PYTHON}
### OVERVIEW OF REGIONS
echo ""
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "The list of regions to investigate:"
echo "* Variant Locus Chr BP StartRange EndRange WindowSize Type Phenotype"
while IFS='' read -r REGION || [[ -n "$REGION" ]]; do
LINE=${REGION}
echo "* ${LINE}"
done < ${REGIONS}
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
### CHECKING DATA AND ANALYSIS
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "Checking whether analyses of loci were properly finished."
rm -v ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt ${ROOTDIR}/analysis.check.txt
rm -v ${SUMMARY}/regions_for_qtl.failedQTLs.txt
rm -v ${SUMMARY}/regions_for_qtl.failedNom.temp.txt
rm -v ${SUMMARY}/regions_for_qtl.failedNom.txt
rm -v ${SUMMARY}/regions_for_qtl.failedPerm.temp.txt
rm -v ${SUMMARY}/regions_for_qtl.failedPerm.txt
touch ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt # 'touching' a file for the complete rerun
touch ${SUMMARY}/regions_for_qtl.failedNom.temp.txt # 'touching' a file for the nominal rerun
touch ${SUMMARY}/regions_for_qtl.failedPerm.temp.txt # 'touching' a file for the permutation rerun
touch ${SUMMARY}/analysis.check.txt # a file containing some information regarding the check on the analysis
echo ""
while IFS='' read -r REGIONOFINTEREST || [[ -n "$REGIONOFINTEREST" ]]; do
### 1 2 3 4 5 6 7 8 9
###Variant Locus Chr BP StartRange EndRange WindowSize Type Phenotype
LINE=${REGIONOFINTEREST}
VARIANT=$(echo "${LINE}" | awk '{print $1}')
LOCUS=$(echo "${LINE}" | awk '{print $2}')
CHR=$(echo "${LINE}" | awk '{print $3}')
BP=$(echo "${LINE}" | awk '{print $4}')
START=$(echo "${LINE}" | awk '{print $5}')
END=$(echo "${LINE}" | awk '{print $6}')
WINDOWSIZE=$(echo "${LINE}" | awk '{print $7}')
TYPE=$(echo "${LINE}" | awk '{print $8}')
PHENOTYPE=$(echo "${LINE}" | awk '{print $9}')
echo ""
echo ""
echo "========================================================================================================="
echo "Checking whether analyses for ${VARIANT} locus on ${CHR} between ${START} and ${END} went well..."
echo "========================================================================================================="
REGIONALDIR=${RESULTS}/${VARIANT}_${PROJECTNAME} # setting regional directory
echo "Working in directory: ${REGIONALDIR}/[...]"
echo "Checking variant ${VARIANT} locus on ${CHR}:${START}-${END}." >> ${SUMMARY}/analysis.check.txt
echo ""
echo "* Checking data extraction..."
if [[ -n $(grep "Thank you for using qctool." ${REGIONALDIR}/${STUDYNAME}_genex_${VARIANT}_excl_${EXCLUSION_TYPE}.errors) ]]; then
echo "Extraction of data successfully completed for ${VARIANT}."
echo "* data extraction: success" >> ${SUMMARY}/analysis.check.txt
rm -v ${REGIONALDIR}/${STUDYNAME}_genex_${VARIANT}_excl_${EXCLUSION_TYPE}.log
mv -v ${REGIONALDIR}/${STUDYNAME}_genex_${VARIANT}_excl_${EXCLUSION_TYPE}.errors ${REGIONALDIR}/${STUDYNAME}_genex_${VARIANT}_excl_${EXCLUSION_TYPE}.log
gzip -v ${REGIONALDIR}/${STUDYNAME}_genex_${VARIANT}_excl_${EXCLUSION_TYPE}.log
else
echo "*** ERROR *** Extraction of data failed for ${VARIANT}."
echo "* data extraction: failed" >> ${SUMMARY}/analysis.check.txt
#rm -rv ${REGIONALDIR}
echo "${VARIANT} ${LOCUS} ${CHR} ${BP} ${START} ${END} ${WINDOWSIZE} ${TYPE} ${PHENOTYPE}" >> ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt
fi
echo ""
echo "* Checking data quality control..."
if [[ -n $(grep "Thank you for using qctool." ${REGIONALDIR}/${STUDYNAME}_genqc_${VARIANT}_excl_${EXCLUSION_TYPE}.errors) ]]; then
echo "Quality control of extracted data successfully completed for ${VARIANT}."
echo "* data quality control: success" >> ${SUMMARY}/analysis.check.txt
rm -v ${REGIONALDIR}/${STUDYNAME}_genqc_${VARIANT}_excl_${EXCLUSION_TYPE}.log
mv -v ${REGIONALDIR}/${STUDYNAME}_genqc_${VARIANT}_excl_${EXCLUSION_TYPE}.errors ${REGIONALDIR}/${STUDYNAME}_genqc_${VARIANT}_excl_${EXCLUSION_TYPE}.log
gzip -v ${REGIONALDIR}/${STUDYNAME}_genqc_${VARIANT}_excl_${EXCLUSION_TYPE}.log
else
echo "*** ERROR *** Quality control of extracted data failed for ${VARIANT}."
echo "* data quality control: failed" >> ${SUMMARY}/analysis.check.txt
#rm -rv ${REGIONALDIR}
echo "${VARIANT} ${LOCUS} ${CHR} ${BP} ${START} ${END} ${WINDOWSIZE} ${TYPE} ${PHENOTYPE}" >> ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt
fi
echo ""
echo "* Checking general statistics..."
if [[ -n $(grep "finito" ${REGIONALDIR}/${STUDYNAME}_genstats_${VARIANT}_excl_${EXCLUSION_TYPE}.log) ]]; then
echo "Calculating general statistics successfully completed for ${VARIANT}."
echo "* calculate summary statistics: success" >> ${SUMMARY}/analysis.check.txt
rm -v ${REGIONALDIR}/${STUDYNAME}_genstats_${VARIANT}_excl_${EXCLUSION_TYPE}.errors
gzip -v ${REGIONALDIR}/${STUDYNAME}_genstats_${VARIANT}_excl_${EXCLUSION_TYPE}.log
else
echo "*** ERROR *** Calculating general statistics failed for ${VARIANT}."
echo "* calculate summary statistics: failed" >> ${SUMMARY}/analysis.check.txt
#rm -rv ${REGIONALDIR}
echo "${VARIANT} ${LOCUS} ${CHR} ${BP} ${START} ${END} ${WINDOWSIZE} ${TYPE} ${PHENOTYPE}" >> ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt
fi
echo ""
echo "* Checking conversion to VCF..."
if [[ -n $(grep "Thank you for using qctool." ${REGIONALDIR}/${STUDYNAME}_gen2vcf_${VARIANT}_excl_${EXCLUSION_TYPE}.errors) ]]; then
echo "Conversion to VCF successfully completed for ${VARIANT}."
echo "* vcf conversion: success" >> ${SUMMARY}/analysis.check.txt
rm -v ${REGIONALDIR}/${STUDYNAME}_gen2vcf_${VARIANT}_excl_${EXCLUSION_TYPE}.log
mv -v ${REGIONALDIR}/${STUDYNAME}_gen2vcf_${VARIANT}_excl_${EXCLUSION_TYPE}.errors ${REGIONALDIR}/${STUDYNAME}_gen2vcf_${VARIANT}_excl_${EXCLUSION_TYPE}.log
gzip -v ${REGIONALDIR}/${STUDYNAME}_gen2vcf_${VARIANT}_excl_${EXCLUSION_TYPE}.log
else
echo "*** ERROR *** Conversion to VCF failed for ${VARIANT}."
echo "* vcf conversion: failed" >> ${SUMMARY}/analysis.check.txt
#rm -rv ${REGIONALDIR}
echo "${VARIANT} ${LOCUS} ${CHR} ${BP} ${START} ${END} ${WINDOWSIZE} ${TYPE} ${PHENOTYPE}" >> ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt
fi
echo ""
echo "* Checking gzipping of VCF..."
if [[ ! -s ${REGIONALDIR}/${STUDYNAME}_genvcfgz_${VARIANT}_excl_${EXCLUSION_TYPE}.errors ]]; then
echo "GZipping VCF file was successfully completed for ${VARIANT}."
echo "* gzipping vcf: success" >> ${SUMMARY}/analysis.check.txt
rm -v ${REGIONALDIR}/${STUDYNAME}_vcfgz_${VARIANT}_excl_${EXCLUSION_TYPE}.errors
gzip -v ${REGIONALDIR}/${STUDYNAME}_vcfgz_${VARIANT}_excl_${EXCLUSION_TYPE}.log
else
echo "*** ERROR *** GZipping VCF file failed for ${VARIANT}."
echo "* gzipping vcf: failed" >> ${SUMMARY}/analysis.check.txt
#rm -rv ${REGIONALDIR}
echo "${VARIANT} ${LOCUS} ${CHR} ${BP} ${START} ${END} ${WINDOWSIZE} ${TYPE} ${PHENOTYPE}" >> ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt
fi
echo ""
echo "* Checking nominal QTLTools analysis..."
if [[ -n $(grep "Running time" ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}.log) ]]; then
echo "Nominal QTLTools analysis successfully completed for ${VARIANT}."
echo "* nominal analysis: success" >> ${SUMMARY}/analysis.check.txt
rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}_NOM.errors
rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}_NOM.log
rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}_NOM.sh
gzip -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}.log
else
echo "*** ERROR *** Nominal QTLTools analysis failed for ${VARIANT}."
echo "* nominal analysis: failed" >> ${SUMMARY}/analysis.check.txt
echo "* error message: " >> ${SUMMARY}/analysis.check.txt
cat ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}_NOM.log | grep "ERROR" >> ${SUMMARY}/analysis.check.txt
#rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}.*
#rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}_NOM.*
echo "${VARIANT} ${LOCUS} ${CHR} ${BP} ${START} ${END} ${WINDOWSIZE} ${TYPE} ${PHENOTYPE}" >> ${SUMMARY}/regions_for_qtl.failedNom.temp.txt
fi
echo ""
echo "* Checking permutation QTLTools analysis..."
if [[ -n $(grep "Running time" ${REGIONALDIR}/${STUDYNAME}_QC_qtlperm_${VARIANT}_excl_${EXCLUSION_TYPE}.log) ]]; then
echo "Permutation QTLTools analysis successfully completed for ${VARIANT}."
echo "* permutation analysis: success" >> ${SUMMARY}/analysis.check.txt
rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlperm_${VARIANT}_excl_${EXCLUSION_TYPE}_PERMUTE.errors
rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlperm_${VARIANT}_excl_${EXCLUSION_TYPE}_PERMUTE.log
rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlperm_${VARIANT}_excl_${EXCLUSION_TYPE}_PERMUTE.sh
gzip -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlperm_${VARIANT}_excl_${EXCLUSION_TYPE}.log
else
echo "*** ERROR *** Permutation QTLTools analysis failed for ${VARIANT}."
echo "* permutation analysis: failed" >> ${SUMMARY}/analysis.check.txt
echo "* error message: " >> ${SUMMARY}/analysis.check.txt
cat ${REGIONALDIR}/${STUDYNAME}_QC_qtlnom_${VARIANT}_excl_${EXCLUSION_TYPE}_PERMUTE.log | grep "ERROR" >> ${SUMMARY}/analysis.check.txt
#rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlperm_${VARIANT}_excl_${EXCLUSION_TYPE}.*
#rm -v ${REGIONALDIR}/${STUDYNAME}_QC_qtlperm_${VARIANT}_excl_${EXCLUSION_TYPE}_PERMUTE.*
echo "${VARIANT} ${LOCUS} ${CHR} ${BP} ${START} ${END} ${WINDOWSIZE} ${TYPE} ${PHENOTYPE}" >> ${SUMMARY}/regions_for_qtl.failedPerm.temp.txt
fi
echo "" >> ${SUMMARY}/analysis.check.txt
done < ${REGIONS}
echo ""
echo "* Removing duplicates from re-run file."
perl ${QTLTOOLKIT}/SCRIPTS/removedupes.pl ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt NORM ${SUMMARY}/regions_for_qtl.failedQTLs.txt
perl ${QTLTOOLKIT}/SCRIPTS/removedupes.pl ${SUMMARY}/regions_for_qtl.failedNom.temp.txt NORM ${SUMMARY}/regions_for_qtl.failedNom.txt
perl ${QTLTOOLKIT}/SCRIPTS/removedupes.pl ${SUMMARY}/regions_for_qtl.failedPerm.temp.txt NORM ${SUMMARY}/regions_for_qtl.failedPerm.txt
echo " - removing temporary files..."
rm -v ${SUMMARY}/regions_for_qtl.failedQTLs.temp.txt
rm -v ${SUMMARY}/regions_for_qtl.failedNom.temp.txt
rm -v ${SUMMARY}/regions_for_qtl.failedPerm.temp.txt
echo ""
echo "* Counting totals to be re-run."
TOTALQTL=$(cat ${SUMMARY}/regions_for_qtl.failedQTLs.txt | wc -l | awk '{ printf ("%'\''d\n", $0) }')
TOTALNOM=$(cat ${SUMMARY}/regions_for_qtl.failedNom.txt | wc -l | awk '{ printf ("%'\''d\n", $0) }')
TOTALPERM=$(cat ${SUMMARY}/regions_for_qtl.failedPerm.txt | wc -l | awk '{ printf ("%'\''d\n", $0) }')
echo " - failed extractions............: "${TOTALQTL}
echo " - failed nominal analyses.......: "${TOTALNOM}
echo " - failed permutation analyses...: "${TOTALPERM}
echo ""
### END of if-else statement for the number of command-line arguments passed ###
fi
script_copyright_message