Skip to content

Commit

Permalink
call: -A must not include records discarded by -v with -m
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3 committed Nov 5, 2014
1 parent c16d392 commit 4ca1ab8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions mcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,15 @@ int mcall(call_t *call, bcf1_t *rec)
#endif

// Find the best combination of alleles
int out_als, nout = mcall_find_best_alleles(call, nals, &out_als);
int out_als, nout = mcall_find_best_alleles(call, nals, &out_als);

// Make sure the REF allele is always present
if ( !(out_als&1) )
{
out_als |= 1;
nout++;
}
if ( call->flag & CALL_VARONLY && nout==1 ) return 0;

// With -A, keep all ALTs except X
if ( call->flag & CALL_KEEPALT )
Expand All @@ -1404,14 +1412,7 @@ int mcall(call_t *call, bcf1_t *rec)
nout++;
}
}
// Make sure the REF allele is always present
else if ( !(out_als&1) )
{
out_als |= 1;
nout++;
}

if ( call->flag & CALL_VARONLY && out_als==1 ) return 0;
int nAC = 0;
if ( out_als==1 )
{
Expand Down

0 comments on commit 4ca1ab8

Please sign in to comment.