-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathTableAnno.sh
executable file
·162 lines (156 loc) · 4.45 KB
/
TableAnno.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
#!/bin/sh
#PBS -N ANNOVAR
cd $DIR
file="$FILE.anno"
DATADIR="/data/Clinomics/Ref/annovar/"
TOOL="/usr/local/apps/ANNOVAR/2015-03-22/"
CUSTOM="$CODE/addAnnotation.pl"
BUILD=hg19
###############################
# Add gene, cytoband,dbsnp, 1000g, ESP, CG69, NCI60 annotations
#
###############################
# --dot2underline\
$TOOL/table_annovar.pl\
$file\
$DATADIR\
-buildver ${BUILD}\
-out $file\
-remove\
-protocol refGene,cytoBand,snp138,1000g2014oct_all,1000g2014oct_eur,1000g2014oct_afr,1000g2014oct_amr,1000g2014oct_eas,1000g2014oct_sas,esp6500_all,esp6500_ea,esp6500_aa,exac03nontcga,cg69,nci60\
-operation g,r,f,f,f,f,f,f,f,f,f,f,f,f,f\
-nastring "-1"
mv $file.hg19_multianno.txt $file.gene
rm -rf $file.refGene.invalid_input
sed -i '1s/\./_/g' $file.gene
###############################
# Add ExAC annotation
#
###############################
$TOOL/annotate_variation.pl\
$file\
$DATADIR\
-buildver ${BUILD}\
-otherinfo\
-filter\
-dbtype exac03
awk '{OFS="\t"};{print $3,$4,$5,$6,$7,$2}' $file.${BUILD}_exac03_dropped |sed -e 's/,/\t/g' >$file.exac.3
head -1 $DATADIR/${BUILD}_exac03.txt >>$file.exac.3
rm -rf $file.${BUILD}_exac03_dropped $file.${BUILD}_exac03_filtered
################################
# Add clinseq annotation
#
################################
$TOOL/annotate_variation.pl\
$file\
$DATADIR\
-buildver ${BUILD}\
-otherinfo\
-filter\
-dbtype generic\
-genericdbfile ${BUILD}_clinseq_951.txt
awk '{OFS="\t"};{print $3,$4,$5,$6,$7,$2}' $file.${BUILD}_generic_dropped |sed -e 's/,/\t/g' >$file.clinseq
head -1 $DATADIR/${BUILD}_clinseq_951.txt >>$file.clinseq
rm -rf $file.${BUILD}_generic_dropped $file.${BUILD}_generic_filtered
################################
# Add CADD annotation
#
################################
$TOOL/annotate_variation.pl\
$file\
$DATADIR\
-buildver ${BUILD}\
-otherinfo\
-filter\
-dbtype cadd
$TOOL/annotate_variation.pl\
$file\
$DATADIR\
-buildver ${BUILD}\
-otherinfo\
-filter\
-dbtype caddindel
cut -f 2-7 $file.${BUILD}_cadd_dropped $file.${BUILD}_caddindel_dropped |sed -e 's/,/\t/g' |awk '{OFS="\t"};{print $3,$4,$5,$6,$7,$1,$2}' >$file.cadd
head -1 $DATADIR/${BUILD}_caddindel.txt >>$file.cadd
rm -rf $file.${BUILD}_cadd_dropped $file.${BUILD}_cadd_filtered $file.${BUILD}_caddindel_dropped $file.${BUILD}_caddindel_filtered
################################
# Add Clinvar and COSMIC
#
################################
$TOOL/table_annovar.pl\
$file\
$DATADIR\
-buildver ${BUILD}\
--dot2underline\
-out $file\
-remove\
-protocol cosmic76\
-operation f\
-nastring "NA"
mv $file.hg19_multianno.txt $file.cosmic
###############################
Add PCG
###############################
$TOOL/annotate_variation.pl\
$file\
$DATADIR\
-buildver ${BUILD}\
-otherinfo\
-filter\
-dbtype generic\
-genericdbfile ${BUILD}_PCG_042616.txt
awk -F "\t" '{OFS="\t"};{print $3,$4,$5,$6,$7,$2}' $file.${BUILD}_generic_dropped |sed -e 's/,/\t/g' >$file.pcg
head -1 $DATADIR/${BUILD}_PCG_042616.txt >>$file.pcg
rm -rf $file.${BUILD}_generic_dropped $file.${BUILD}_generic_filtered
################################
# Add HGMD
#
################################
OUT=`echo $file |sed -e 's/.anno//g'`
$CUSTOM $DATADIR/${BUILD}_clinvar_20160203.txt $file >$OUT.clinvar
################################
# Add HGMD
#
################################
OUT=`echo $file |sed -e 's/.anno//g'`
$CUSTOM $DATADIR/${BUILD}_hgmd.2016.1.txt $file >$OUT.hgmd
################################
# Add MATCH Trial
#
################################
$CUSTOM $DATADIR/${BUILD}_MATCHTrial_2015_11.txt $file >$OUT.match
################################
# Add MyCG
#${BUILD}_MCG.02.27.15.txt
#hg19_MCG.06.24.15.txt
################################
$CUSTOM $DATADIR/${BUILD}_MCG.06.24.15.txt $file >$OUT.mcg
################################
# Add DoCM
#
################################
$CUSTOM $DATADIR/${BUILD}_DoCM.txt $file >$OUT.docm
################################
# Add CanDL
#
################################
$CUSTOM $DATADIR/${BUILD}_candl_10262015.txt $file >$OUT.candl
################################
# Add Targeted Cancer Care
#
################################
$CUSTOM $DATADIR/${BUILD}_targated_cancer_care_10262015.txt $file >$OUT.tcc
################################
# CiViC
#
################################
$CUSTOM $DATADIR/${BUILD}_civic_10262015.txt $file >$OUT.civic
################################
#
#
################################
echo "Everything Finished"
rm -rf $file.invalid_input
rm -rf $file.refGene.invalid_input
rm -rf $file.log
rm -rf $file.anno.log