Skip to content

Commit

Permalink
Correct the child sample depth calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkurowski committed Oct 25, 2022
1 parent d294984 commit 6898463
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vcf2loc.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@
# Keeping only SNV sites.
continue
if args.min_dp is not None:
parent_b_dp = (
0 if args.parent_b is None
else site.genotype_calls[args.parent_a]['DP']
)
child_dp = (
site.depth
- site.genotype_calls[args.parent_a]['DP']
- 0 if args.parent_b is None
else site.genotype_calls[args.parent_a]['DP']
- parent_b_dp
)
if child_dp < args.min_dp:
# Skipping sites with low depth.
Expand Down

0 comments on commit 6898463

Please sign in to comment.