-
Notifications
You must be signed in to change notification settings - Fork 5
/
fpfilter_SNP-LOH
182 lines (112 loc) · 10.5 KB
/
fpfilter_SNP-LOH
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
# VarScan2 SNPS fpfilter runs for all samples to make true positive calls on the SNP LOH.
mkdir fpfilter
### For tumor S_313_tumor
perl -ane 'print join("\t",@F[0,1,1])."\n" unless(m/^#/)' S_313_T_soma_vcf.output.snp.LOH.hc.vcf > fpfilter/S_313_T_LOH_snvs.var
#Given tumor.bam, a BAM file containing the SNVs, and its reference FASTA grch37.fa, run bam-readcount:
/path_to/softwares/bam-readcount/build/bin/bam-readcount -q1 -b15 -w1 -l fpfilter/S_313_T_LOH_snvs.var -f /path_to/vdas/test_exome/exome/hg19.fa /path_to/vdas/client/exome_seq/results/N_S8980/N_S8980.realigned.recal.bam > fpfilter/S_313_T_LOH_snvs.readcount
# Run the fpfilter.pl script using the readcounts as an input:
#perl fpfilter.pl --var-file snvs.vcf --readcount-file fpfilter/snvs.readcount --output-file fpfilter/snvs.fpfilter
perl /path_to/softwares/variant-filter-master/fpfilter.pl --var-file S_313_T_soma_vcf.output.snp.LOH.hc.vcf --readcount-file fpfilter/S_313_T_LOH_snvs.readcount --output-file fpfilter/S_313_T_LOH_snvs.fpfilter
#### converting the fpfilter file to vcf do this for all the fpfilter files
awk -v OFS='\t' '{print $1, $2, $8}' S_313_T_LOH_snvs.fpfilter > S_313_T_LOH_snvs.fpfilter_tab
bgzip S_313_T_LOH_snvs.fpfilter_tab
tabix -s 1 -b 2 -e 2 S_313_T_LOH_snvs.fpfilter_tab.gz
## VarScan files
### working for S_313_tumor
cat /path-to/vdas/client/exome_seq/results/varscan_out_17112014/LOH/high_confidence/snp_LOH/S_313_T_soma_vcf.output.snp.LOH.hc.vcf | /path_to/softwares/vcftools_0.1.12b/bin/vcf-annotate -a S_313_T_LOH_snvs.fpfilter_tab.gz -d key=INFO,ID=ANN,Number=1,Type=String,Description='FP filter annotation' -c CHROM,POS,FILTER > fpflt_vcf_out/S_313_T_LOH_snvs.fpfilter_tab.vcf
###creating the clean vcf file
egrep '(^#|PASS)' S_313_T_LOH_snvs.fpfilter_tab.vcf > S_313_T_LOH_snvs.fpfilter_tab_clean.vcf
##############
### For tumor S_313_ips1
perl -ane 'print join("\t",@F[0,1,1])."\n" unless(m/^#/)' S_313_i1_soma_vcf.output.snp.LOH.hc.vcf > fpfilter/S_313_ips1_LOH_snvs.var
#Given tumor.bam, a BAM file containing the SNVs, and its reference FASTA grch37.fa, run bam-readcount:
/path_to/softwares/bam-readcount/build/bin/bam-readcount -q1 -b15 -w1 -l fpfilter/S_313_ips1_LOH_snvs.var -f /path_to/vdas/test_exome/exome/hg19.fa /path_to/vdas/client/exome_seq/results/N_S8980/N_S8980.realigned.recal.bam > fpfilter/S_313_ips1_LOH_snvs.readcount
# Run the fpfilter.pl script using the readcounts as an input:
#perl fpfilter.pl --var-file snvs.vcf --readcount-file fpfilter/snvs.readcount --output-file fpfilter/snvs.fpfilter
perl /path_to/softwares/variant-filter-master/fpfilter.pl --var-file S_313_i1_soma_vcf.output.snp.LOH.hc.vcf --readcount-file fpfilter/S_313_ips1_LOH_snvs.readcount --output-file fpfilter/S_313_ips1_LOH_snvs.fpfilter
#### converting the fpfilter file to vcf do this for all the fpfilter files
awk -v OFS='\t' '{print $1, $2, $8}' S_313_ips1_LOH_snvs.fpfilter > S_313_ips1_LOH_snvs.fpfilter_tab
bgzip S_313_ips1_LOH_snvs.fpfilter_tab
tabix -s 1 -b 2 -e 2 S_313_ips1_LOH_snvs.fpfilter_tab.gz
## VarScan files
### working for S_313_tumor
cat /path_to/vdas/client/exome_seq/results/varscan_out_17112014/LOH/high_confidence/snp_LOH/S_313_i1_soma_vcf.output.snp.LOH.hc.vcf | /path_to/softwares/vcftools_0.1.12b/bin/vcf-annotate -a S_313_ips1_LOH_snvs.fpfilter_tab.gz -d key=INFO,ID=ANN,Number=1,Type=String,Description='FP filter annotation' -c CHROM,POS,FILTER > fpflt_vcf_out/S_313_ips1_LOH_snvs.fpfilter_tab.vcf
###creating the clean vcf file
cd fpflt_vcf_out
egrep '(^#|PASS)' S_313_ips1_LOH_snvs.fpfilter_tab.vcf > S_313_ips1_LOH_snvs.fpfilter_tab_clean.vcf
########
#### for S_313_ips2
perl -ane 'print join("\t",@F[0,1,1])."\n" unless(m/^#/)' S_313_i2_soma_vcf.output.snp.LOH.hc.vcf > fpfilter/S_313_ips2_LOH_snvs.var
#Given tumor.bam, a BAM file containing the SNVs, and its reference FASTA grch37.fa, run bam-readcount:
/path_to/softwares/bam-readcount/build/bin/bam-readcount -q1 -b15 -w1 -l fpfilter/S_313_ips2_LOH_snvs.var -f /path_to/vdas/test_exome/exome/hg19.fa /path_to/vdas/client/exome_seq/results/N_S8980/N_S8980.realigned.recal.bam > fpfilter/S_313_ips2_LOH_snvs.readcount
# Run the fpfilter.pl script using the readcounts as an input:
#perl fpfilter.pl --var-file snvs.vcf --readcount-file fpfilter/snvs.readcount --output-file fpfilter/snvs.fpfilter
perl /path_to/softwares/variant-filter-master/fpfilter.pl --var-file S_313_i2_soma_vcf.output.snp.LOH.hc.vcf --readcount-file fpfilter/S_313_ips2_LOH_snvs.readcount --output-file fpfilter/S_313_ips2_LOH_snvs.fpfilter
#### converting the fpfilter file to vcf do this for all the fpfilter files
cd fpfilter
awk -v OFS='\t' '{print $1, $2, $8}' S_313_ips2_LOH_snvs.fpfilter > S_313_ips2_LOH_snvs.fpfilter_tab
bgzip S_313_ips2_LOH_snvs.fpfilter_tab
tabix -s 1 -b 2 -e 2 S_313_ips2_LOH_snvs.fpfilter_tab.gz
## VarScan files
### working for S_313_tumor
cat /path_to/vdas/client/exome_seq/results/varscan_out_17112014/LOH/high_confidence/snp_LOH/S_313_i2_soma_vcf.output.snp.LOH.hc.vcf | /path_to/softwares/vcftools_0.1.12b/bin/vcf-annotate -a S_313_ips2_LOH_snvs.fpfilter_tab.gz -d key=INFO,ID=ANN,Number=1,Type=String,Description='FP filter annotation' -c CHROM,POS,FILTER > fpflt_vcf_out/S_313_ips2_LOH_snvs.fpfilter_tab.vcf
###creating the clean vcf file
cd fpflt_vcf_out
egrep '(^#|PASS)' S_313_ips2_LOH_snvs.fpfilter_tab.vcf > S_313_ips2_LOH_snvs.fpfilter_tab_clean.vcf
#########
### For tumor S_333_tumor
perl -ane 'print join("\t",@F[0,1,1])."\n" unless(m/^#/)' S_333_T_soma_vcf.output.snp.LOH.hc.vcf > fpfilter/S_333_T_LOH_snvs.var
#Given tumor.bam, a BAM file containing the SNVs, and its reference FASTA grch37.fa, run bam-readcount:
/path_to/softwares/bam-readcount/build/bin/bam-readcount -q1 -b15 -w1 -l fpfilter/S_333_T_LOH_snvs.var -f /path_to/vdas/test_exome/exome/hg19.fa /path_to/vdas/client/exome_seq/results/N_S8981/N_S8981.realigned.recal.bam > fpfilter/S_333_T_LOH_snvs.readcount
# Run the fpfilter.pl script using the readcounts as an input:
#perl fpfilter.pl --var-file snvs.vcf --readcount-file fpfilter/snvs.readcount --output-file fpfilter/snvs.fpfilter
perl /path_to/softwares/variant-filter-master/fpfilter.pl --var-file S_333_T_soma_vcf.output.snp.LOH.hc.vcf --readcount-file fpfilter/S_333_T_LOH_snvs.readcount --output-file fpfilter/S_333_T_LOH_snvs.fpfilter
#Log
#### converting the fpfilter file to vcf do this for all the fpfilter files
awk -v OFS='\t' '{print $1, $2, $8}' S_333_T_LOH_snvs.fpfilter > S_333_T_LOH_snvs.fpfilter_tab
bgzip S_333_T_LOH_snvs.fpfilter_tab
tabix -s 1 -b 2 -e 2 S_333_T_LOH_snvs.fpfilter_tab.gz
## VarScan files
### working for S_313_tumor
cat /path_to/vdas/client/exome_seq/results/varscan_out_17112014/LOH/high_confidence/snp_LOH/S_333_T_soma_vcf.output.snp.LOH.hc.vcf | /path_to/softwares/vcftools_0.1.12b/bin/vcf-annotate -a S_333_T_LOH_snvs.fpfilter_tab.gz -d key=INFO,ID=ANN,Number=1,Type=String,Description='FP filter annotation' -c CHROM,POS,FILTER > fpflt_vcf_out/S_333_T_LOH_snvs.fpfilter_tab.vcf
###creating the clean vcf file
cd fpflt_vcf_out
egrep '(^#|PASS)' S_333_T_LOH_snvs.fpfilter_tab.vcf > S_333_T_LOH_snvs.fpfilter_tab_clean.vcf
#################
### For tumor S_333_ips1
perl -ane 'print join("\t",@F[0,1,1])."\n" unless(m/^#/)' S_333_i1_soma_vcf.output.snp.LOH.hc.vcf > fpfilter/S_333_ips1_LOH_snvs.var
#Given tumor.bam, a BAM file containing the SNVs, and its reference FASTA grch37.fa, run bam-readcount:
/path_to/softwares/bam-readcount/build/bin/bam-readcount -q1 -b15 -w1 -l fpfilter/S_333_ips1_LOH_snvs.var -f /path_to/vdas/test_exome/exome/hg19.fa /path_to/vdas/client/exome_seq/results/N_S8981/N_S8981.realigned.recal.bam > fpfilter/S_333_ips1_LOH_snvs.readcount
# Run the fpfilter.pl script using the readcounts as an input:
#perl fpfilter.pl --var-file snvs.vcf --readcount-file fpfilter/snvs.readcount --output-file fpfilter/snvs.fpfilter
perl /path_to/softwares/variant-filter-master/fpfilter.pl --var-file S_333_i1_soma_vcf.output.snp.LOH.hc.vcf --readcount-file fpfilter/S_333_ips1_LOH_snvs.readcount --output-file fpfilter/S_333_ips1_LOH_snvs.fpfilter
#Log
#### converting the fpfilter file to vcf do this for all the fpfilter files
awk -v OFS='\t' '{print $1, $2, $8}' S_333_ips1_LOH_snvs.fpfilter > S_333_ips1_LOH_snvs.fpfilter_tab
bgzip S_333_ips1_LOH_snvs.fpfilter_tab
tabix -s 1 -b 2 -e 2 S_333_ips1_LOH_snvs.fpfilter_tab.gz
## VarScan files
### working for S_313_tumor
cat /path_to/vdas/client/exome_seq/results/varscan_out_17112014/LOH/high_confidence/snp_LOH/S_333_i1_soma_vcf.output.snp.LOH.hc.vcf | /path_to/softwares/vcftools_0.1.12b/bin/vcf-annotate -a S_333_ips1_LOH_snvs.fpfilter_tab.gz -d key=INFO,ID=ANN,Number=1,Type=String,Description='FP filter annotation' -c CHROM,POS,FILTER > fpflt_vcf_out/S_333_ips1_LOH_snvs.fpfilter_tab.vcf
###creating the clean vcf file
cd fpflt_vcf_out
egrep '(^#|PASS)' S_333_ips1_LOH_snvs.fpfilter_tab.vcf > S_333_ips1_LOH_snvs.fpfilter_tab_clean.vcf
#################
### For tumor S_333_ips2
perl -ane 'print join("\t",@F[0,1,1])."\n" unless(m/^#/)' S_333_i2_soma_vcf.output.snp.LOH.hc.vcf > fpfilter/S_333_ips2_LOH_snvs.var
#Given tumor.bam, a BAM file containing the SNVs, and its reference FASTA grch37.fa, run bam-readcount:
/path_to/softwares/bam-readcount/build/bin/bam-readcount -q1 -b15 -w1 -l fpfilter/S_333_ips2_LOH_snvs.var -f /path_to/vdas/test_exome/exome/hg19.fa /path_to/vdas/client/exome_seq/results/N_S8981/N_S8981.realigned.recal.bam > fpfilter/S_333_ips2_LOH_snvs.readcount
# Run the fpfilter.pl script using the readcounts as an input:
#perl fpfilter.pl --var-file snvs.vcf --readcount-file fpfilter/snvs.readcount --output-file fpfilter/snvs.fpfilter
perl /path_to/softwares/variant-filter-master/fpfilter.pl --var-file S_333_i2_soma_vcf.output.snp.LOH.hc.vcf --readcount-file fpfilter/S_333_ips2_LOH_snvs.readcount --output-file fpfilter/S_333_ips2_LOH_snvs.fpfilter
#Log
#### converting the fpfilter file to vcf do this for all the fpfilter files
awk -v OFS='\t' '{print $1, $2, $8}' S_333_ips2_LOH_snvs.fpfilter > S_333_ips2_LOH_snvs.fpfilter_tab
bgzip S_333_ips2_LOH_snvs.fpfilter_tab
tabix -s 1 -b 2 -e 2 S_333_ips2_LOH_snvs.fpfilter_tab.gz
## VarScan files
### working for S_313_tumor
cat /path_to/vdas/client/exome_seq/results/varscan_out_17112014/LOH/high_confidence/snp_LOH/S_333_i2_soma_vcf.output.snp.LOH.hc.vcf | /path_to/softwares/vcftools_0.1.12b/bin/vcf-annotate -a S_333_ips2_LOH_snvs.fpfilter_tab.gz -d key=INFO,ID=ANN,Number=1,Type=String,Description='FP filter annotation' -c CHROM,POS,FILTER > fpflt_vcf_out/S_333_ips2_LOH_snvs.fpfilter_tab.vcf
###creating the clean vcf file
cd fpflt_vcf_out
egrep '(^#|PASS)' S_333_ips2_LOH_snvs.fpfilter_tab.vcf > S_333_ips2_LOH_snvs.fpfilter_tab_clean.vcf