Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple filters #38

Merged
merged 7 commits into from
Jul 24, 2024
Merged

Allow multiple filters #38

merged 7 commits into from
Jul 24, 2024

Conversation

JeremyWesthead
Copy link
Collaborator

Should fix 2 edge cases.

  1. 3 years ago in my initial implementation I made the assumption of only a single filter per VCF row. This isn't true and the assert statement to catch this was checking for >= 0 rather than > 1 so this was never caught. Should now parse VCF filters as a list (as it always should have)
  2. Null calls were being allowed through in cases of >1 filter fail if the first filter was MIN_FRS. This was due to only parsing (and so checking) the first filter. Should be fixed as part of this

Written relatively late (as it suddenly occurred that this was happening and needs fixing before release) so please double check my logic!

Copy link
Member

@philipwfowler philipwfowler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked logic and ran tests locally, including modifying TEST-DNA-2.vcf so FILTER was a list MIN_GCF;MIN_FRS and test failed as expected. Code does assume that (i) a row that passes only contains PASS in the FILTER and (ii) a null row that only contains MIN_FRS would otherwise have passed. Both are reasonable assumptions.

@JeremyWesthead JeremyWesthead merged commit 3f2cda2 into master Jul 24, 2024
2 checks passed
@JeremyWesthead JeremyWesthead deleted the fix/nulls-on-filter-fails branch July 24, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants