Skip to content

Commit

Permalink
Do not flag paternal genotyping errors as de novo mutations.
Browse files Browse the repository at this point in the history
Specifically, when father's chrX genotype is 0/1 and mother's 0/0,
0/1 in the child will not be marked as DNM.
  • Loading branch information
pd3 committed Dec 11, 2023
1 parent 4014f7e commit 37cf779
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ Changes affecting specific commands:
substrings to avoid unexpected spurious matches (i.e. internally add ^ and $ to all
field names)

* bcftools +trio-dnm2

- Do not flag paternal genotyping errors as de novo mutations. Specifically, when father's
chrX genotype is 0/1 and mother's 0/0, 0/1 in the child will not be marked as DNM.

* bcftools view

- Add new `-A, --trim-unseen-allele` option to remove the unseen allele <*> or <NON_REF>
Expand Down
8 changes: 6 additions & 2 deletions plugins/trio-dnm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,12 @@ static void init_tprob_mprob_chrXX(args_t *args, int fi, int mi, int ci, double

*denovo_allele = ca!=fa && ca!=fb && ca!=ma && ca!=mb ? ca : cb;

if ( fa!=fb ) // father cannot be heterozygous in X
*mprob = 0, *tprob = 0;
if ( fa!=fb )
{
// this must be a genotype error, father cannot be heterozygous in X; don't flag it as a DNM unless
// also autosomal inheritance fails
init_tprob_mprob(args,fi,mi,ci,tprob,mprob,denovo_allele);
}
else if ( (ca==fa && (cb==ma||cb==mb)) || (cb==fa && (ca==ma||ca==mb)) )
{
if ( ma==mb ) *tprob = 1;
Expand Down
2 changes: 1 addition & 1 deletion test/trio-dnm/trio-dnm.9.2.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
1 . .
1 . .
1 . .
1 . .
. . .
. . .
. . .

0 comments on commit 37cf779

Please sign in to comment.