Skip to content

Commit

Permalink
Merge pull request #91 from dufeiyu/docm_filter
Browse files Browse the repository at this point in the history
Reset filter column with "." if no set_filter_flag
  • Loading branch information
dufeiyu authored Jun 17, 2019
2 parents d787165 + 917a839 commit 99ca7ed
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docm_filter.pl
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,18 @@
next unless $AD;
my @AD = split /,/, $AD;
shift @AD; #the first one is ref count
if ($set_filter_flag) {
$columns[6] = 'DOCM_ONLY';
}

for my $ad (@AD) {
if ($ad > 5 and $ad/$DP > 0.01) {
my ($normal_col, $tumor_col) = map{$columns[$_]}($normal_index, $tumor_index);
$columns[9] = $normal_col;
$columns[10] = $tumor_col;
if ($set_filter_flag) {
$columns[6] = 'DOCM_ONLY';
}
else {
$columns[6] = '.';
}
my $new_line = join "\t", @columns;
say $docm_out_fh $new_line;
last;
Expand Down

0 comments on commit 99ca7ed

Please sign in to comment.