-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrunNEO_run
executable file
·79 lines (66 loc) · 2.24 KB
/
runNEO_run
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
#! /usr/bin/env bash
# Run neoantigen computation, which will use configure file in current directory.
optspec=":h-:"
while getopts "$optspec" optchar; do
case "${optchar}" in
-)
case "${OPTARG}" in
NQ)
runNQ=True
;;
parallel)
runParallel=True
;;
*)
if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then
echo "Unknown option --${OPTARG}" >&2
fi
;;
esac;;
h)
echo "usage: $0 [--NQ] [--parallel]" >&2
exit 2
;;
*)
if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
echo "Non-option argument: '-${OPTARG}'" >&2
exit 2
fi
;;
esac
done
# load arguments from configure file
if [ -f $(pwd)/inputArgs.txt ]; then
source $(pwd)/inputArgs.txt
else
echo >&2 "$pwd/inputArgs.txt is not exist in current directory. Aborting.."
exit 1
fi
source activate $py_env
# check if software commands exist
type blastp >/dev/null 2>&1 || { echo >&2 "blastp is need but it's not installed in $py_env environment . Aborting."; exit 1; }
type pvacseq >/dev/null 2>&1 || { echo >&2 "pvacseq is need but it's not installed in $py_env environment. Aborting."; exit 1; }
type samtools >/dev/null 2>&1 || { echo >&2 "samtools is need but it's not installed in $py_env environment. Aborting."; exit 1; }
echo ----------------------
echo --- Pipeline Begin ---
echo ----------------------
# step1: transform maf files to vcf files
$ShellDIR/step1-transformMaf2VCF.sh
# step2: run neoantigen computation, choose only one way as follows to run, other line should be commented
if [ ! -n "$runParallel" ]; then
# serial way
$ShellDIR/step2-NEOcomputation_serial.sh
else
# parallel way
$ShellDIR/step2-NEOcomputation_parallel.sh
fi
if [ ! -n "$runNQ" ]; then
# step3: summary neoantigen results
$ShellDIR/step3-summaryNeoantigens.sh
else
# step3: calculate neoantigen quality
$ShellDIR/step3-neoantigenQcomputation.sh
fi
echo --------------------
echo --- Pipeline End ---
echo --------------------