Skip to content

Commit

Permalink
if filter_docm_variants is false, we need reset filter column with . …
Browse files Browse the repository at this point in the history
…so docm variants can appear after GATK VariantsToTable
  • Loading branch information
dufeiyu committed May 31, 2019
1 parent c40da5e commit 917a839
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 917a839

Please sign in to comment.