-
Notifications
You must be signed in to change notification settings - Fork 6
/
combine_variant.pl
49 lines (41 loc) · 1.29 KB
/
combine_variant.pl
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
######### Song Cao###########
## combine somatic variant result ##
# combine_variant.pl #
### updated date: 04/18/2017 ###
#!/usr/bin/perl
use strict;
use warnings;
die unless @ARGV == 1;
my ($run_dir)=@ARGV;
my @temp = split("/", $dir);
my $run_name = pop @temp;
my $f_out=$run_dir."/Analysis_Summary_Somatic_$run_name.tsv";
open(OUT,">$f_out");
foreach my $dir_s (`ls $run_dir`)
{
my $dir_s_f=$run_dir."/".$dir_s;
if(-d $dir_s_f)
{
my %mut_inf=();
my %snv_varscan_tag=();
my %indel_varscan_tag=();
my %snv_strelka_tag=();
my %indel_strelka_tag=();
my $f_varscan_snv=$dir_s_f."/varscan/varscan.out.som_snv.current_final.gvip.Somatic.VEP.vcf";
my $f_varscan_indel=$dir_s_f."/varscan/varscan.out.som_indel.current_final.gvip.Somatic.VEP.vcf";
my $f_strelka_snv=$dir_s_f."/strelka/strelka_out/results/strelka.somatic_snv.current_final.gvip.Somatic.VEP.vcf";
my $f_strelka_indel=$dir_s_f."/strelka/strelka_out/results/strelka.somatic_indel.current_final.gvip.Somatic.VEP.vcf";
foreach my $v (`cat $f_varscan_snv`)
{
my $vtr=$v;
chomp($vtr);
if($vtr=~/^#/)
{
next;
}
my @temp=split("\t",$vtr);
my $mut=$temp[0]."_".$temp[1]."_".$temp[3]."_".$temp[4];
$mut_inf{$mut}=$vtr;
}
}
}