Skip to content

Commit

Permalink
Skip variants with population AN=0 instead of dividing by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
sambrightman committed Aug 18, 2016
1 parent f2c5f1c commit 4e3e994
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ExAC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ sub run {
my $ref_allele = shift @vcf_alleles;

# iterate over required headers
HEADER:
foreach my $h(@{$self->{headers} || []}) {
my $total_ac = 0;

Expand Down Expand Up @@ -242,6 +243,7 @@ sub run {
foreach my $a(@vcf_alleles) {
my $ac = shift @ac;
$an = shift @an if @an;
next HEADER unless $an;

$total_ac += $ac;
if ($self->{display_ac}){
Expand Down

0 comments on commit 4e3e994

Please sign in to comment.