-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathgenerate_coding_report.pl
More file actions
42 lines (35 loc) · 925 Bytes
/
generate_coding_report.pl
File metadata and controls
42 lines (35 loc) · 925 Bytes
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
#!/usr/bin/perl
### for example,
use strict;
use warnings;
die unless @ARGV == 2;
my ($f_in, $f_out)=@ARGV;
open(OUT,">$f_out");
my %count_v;
my $f_status=$f_out.".status\n";
open(OUT1,">$f_status");
foreach my $l (`cat $f_in`)
{
my $ltr=$l;
chomp($ltr);
if($ltr=~/^#version/) { next; }
else {
if($ltr=~/^Hugo/) { print OUT $ltr,"\n"; next; }
else {
my @temp=split("\t",$ltr);
my $annot=$temp[8];
my $sn=$temp[15];
$sn=~s/_T//g;
if($annot=~/Frame_Shift_Del/ || $annot=~/Frame_Shift_Ins/ || $annot=~/Missense_Mutation/ || $annot=~/Nonsense_Mutation/ || $annot=~/Nonstop_Mutation/ || $annot=~/Silent/ || $annot=~/Splice_Site/ || $annot=~/In_Frame_Ins/ || $annot=~/In_Frame_Del/) {
print OUT $ltr,"\n";
$count_v{$sn}++;
}
}
}
}
close OUT;
foreach my $s (sort keys %count_v)
{
print OUT1 $s,"\t",$count_v{$s},"\n";
}
close OUT1;