Skip to content

Commit

Permalink
Fix bug with G1K freqs in SV filtration (#619)
Browse files Browse the repository at this point in the history
Closes: #619
Related-Issue: #619
Projected-Results-Impact: require-revalidation
  • Loading branch information
holtgrewe committed Aug 26, 2022
1 parent f0f1cc2 commit d1dd3a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions HISTORY.rst
Expand Up @@ -47,6 +47,7 @@ End-User Summary
- Adding distinct de novo genotype setting (#562).
- Adding section presets for SV filtration (#616).
- Adjusting SV filtration presets (#616).
- Fix bug with thousand genomes frequencies in SV filtration (#619).

Full Change List
================
Expand Down Expand Up @@ -89,6 +90,7 @@ Full Change List
- Adding distinct de novo genotype setting (#562).
- Adding section presets for SV filtration (#616).
- Adjusting SV filtration presets (#616).
- Fix bug with thousand genomes frequencies in SV filtration (#619).

------
v1.2.0
Expand Down
3 changes: 2 additions & 1 deletion svs/queries.py
Expand Up @@ -385,14 +385,15 @@ def extend_fields(self, _query_parts):
def extend_conditions(self, _query_parts):
result = []
for token, _, _ in self.TOKEN_MODEL_FIELD:
entity = "alleles" if token == "g1k" else "carriers"
if (
self.kwargs.get("%s_enabled" % token, False)
and ("%s_overlap_count" % token) in self.fields
and self.kwargs.get("%s_max_carriers" % token) is not None
):
result.append(
self.fields["%s_overlap_count" % token]
<= self.kwargs["%s_max_carriers" % token]
<= self.kwargs["%s_max_%s" % (token, entity)]
)
return result

Expand Down

0 comments on commit d1dd3a6

Please sign in to comment.