forked from czc/nb_distribution
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilter_sv_icgc.pl
More file actions
executable file
·25 lines (24 loc) · 1.14 KB
/
filter_sv_icgc.pl
File metadata and controls
executable file
·25 lines (24 loc) · 1.14 KB
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
#!/usr/bin/perl -w
#
use strict;
use warnings;
while (<>) {
my @e = split;
my $len = abs $1 if /SVLEN=(\S+)/;
if ($len < 1000 and $len > 100 and $e[18] + $e[28] > 4 and $e[21] <= 1 and $e[31] <= 1 and $e[13] > 3 and $e[5] > 10) { # small svs
print if $e[15]>0 and $e[16]/$e[15]>0.1 or ($e[25]>0 and $e[26]/$e[25]>0.1);
#} elsif ($e[35]>=2 and $e[36]/$e[35] < 0.1 and $e[37]>=2 and $e[38]/$e[37] < 0.1 and $e[36]+$e[38]<1 and $e[15] < 100 and $e[25] < 100 or ($e[35]<=1 and $e[37]<=1 and $e[13]>4 and $e[21]<1 and $e[31]<1 and $e[18]>=2 and $e[28]>=2)) { # this may be a better filter for real data
} elsif ($e[35]>=3 and $e[36]/$e[35] < 0.1 and $e[37]>=3 and $e[38]/$e[37] < 0.1 and $e[36] <=2 and $e[38]<=2 or ($e[35]<=1 and $e[37]<=1 and $e[13]>4 and $e[21]<1 and $e[31]<1 and $e[18]>=2 and $e[28]>=2)) { # this may be a better filter for real data
# elsif ($e[36] <= 1 and $e[38] <= 1 and $e[23] <= 1 and $e[33] <= 1) {
if (/INV/) {
#print if $len < 20000000;
print;
} elsif (/TRA/) {
print if $e[35] > 3 or $e[37] > 3;
} else {
print;
}
} elsif (/TRA/) {
print if ($e[5] > 30 and $e[18]+$e[28] > 10 and $e[21]<=1 and $e[31]<=1);
}
}