genewise: only show variants that meet the require number of optional filters
reported by
MODIFY
docs/content/history.rst
docs/content/history.rst
@@ -10,6 +10,7 @@ Release History
======
#. Allow `--gt-filter` to specify the gt_type, e.g. `(gt_quals).(=HET).(<20).(all)` (thanks Jessica for suggesting)
#. Add `--gene-where` argument to `comp_hets` tool to dictate how variants are restricted to genes. (thanks Jessica for suggesting)
+#. genewise: don't show any variants that don't meet the required number of optional filters.
0.20.0
======

MODIFY
gemini/genewise.py
gemini/genewise.py
@@ -68,7 +68,9 @@ def gen_results(rows, gt_filters, gt_req_filters, min_filters, min_variants, col
# track that this filter passed.
gene_passed_filters[i] = True
row_passed_filters.append(i)
- if row_passed_filters:
+ # make sure that some non-required filters passed in order to display
+ # the row.
+ if row_passed_filters and sum(isinstance(f, int) for f in row_passed_filters) >= (min_filters - len(gt_req_filters)):
row.print_fields['variant_filters'] = ",".join(map(str, row_passed_filters))
subset.append(row)
if len(gene_passed_filters) < min_filters or len(subset) < min_variants:

MODIFY
gemini/version.py
gemini/version.py
-__version__ = "0.20.0"
+__version__ = "0.20.1"

genewise: only show variants that meet the require number of optional filters

reported by @jxchong