Skip to content

Commit

Permalink
Fix a bug when continuous filter has zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwwang committed Nov 5, 2019
1 parent 61ddc08 commit 9293204
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vcfstats/formula.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ def run(self, variant, passed):
value = [value[sidx] for sidx in self.samples]

if self.term['type'] == 'continuous' and self.subsets:
if self.subsets[0] and any(val < self.subsets[0] for val in value):
if self.subsets[0] != '' and any(val < self.subsets[0] for val in value):
return False
if self.subsets[1] and any(val > self.subsets[1] for val in value):
if self.subsets[1] != '' and any(val > self.subsets[1] for val in value):
return False
if self.term['type'] == 'categorical' and self.subsets:
if any(val not in self.subsets for val in value):
Expand Down

0 comments on commit 9293204

Please sign in to comment.