-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline.sh
78 lines (72 loc) · 1.33 KB
/
pipeline.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
#!/bin/bash
#perl: 5.22
#bedtools: 2.25
#pybedtools: 0.7.1
#python: 2.7.10
export DATA=$1
export SOFTWARE=$2
function usage () {
cat << EOF
usage: $0 $DATA, $SOFTWARE opts
where opts are:
-h Display this help message
-g get files - pfam defs, exons, vcf - and VEP annotate:
0 means do all
1 means don't redownload or vep annotate
2 means redownload, but don't vep annotate
-c generate domain and nodom files
value input is the coverage mean chosen,
default is 5, for both domain and nodom
-i run intersection:
-t make tables:
value input is the maf cutoff chosen,
this only modifies table values
-l make lollipop:
value input is out folder, gene,
relational operator (g,l,r), maf1,
maf2 (optional)
EOF
}
if test -z "$1"
then
usage
exit
fi
while getopts "hg:cc:it:l:" OPTION
do
case $OPTION in
h)
usage
exit
;;
g)
bash getfiles.sh $OPTARG
;;
c)
if [ !$OPTARG ];
then
OPTARG=5
fi
bash create.sh $OPTARG
;;
i)
bash intersect.sh
;;
t)
bash tables.sh $OPTARG
;;
l)
array=(${OPTARG//,/ })
if [ ${#array[@]} == 5 ];
then
bash lollipop.sh $DATA ${array[0]} ${array[1]} ${array[2]} ${array[3]} ${array[4]}
elif [ ${#array[@]} == 4 ];
then
bash lollipop.sh $DATA ${array[0]} ${array[1]} ${array[2]} ${array[3]}
else
usage
exit 1
fi
;;
esac
done