Skip to content

Commit

Permalink
use high confidence LoF
Browse files Browse the repository at this point in the history
  • Loading branch information
talavis committed Apr 11, 2019
1 parent f39f3c8 commit c5ca6d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/modules/browser/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_get_flags_from_variant():
fake_variant = {'vep_annotations':[{'LoF': 'LC', 'LoF_flags': 'something'},
{'LoF': 'HC', 'LoF_flags': 'something'}]}
flags = utils.get_flags_from_variant(fake_variant)
assert flags == ['LoF flag']
assert flags == ['LoF', 'LoF flag']

fake_variant = {'mnps': 'no idea', 'vep_annotations':[]}
flags = utils.get_flags_from_variant(fake_variant)
Expand Down
2 changes: 2 additions & 0 deletions backend/modules/browser/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ def get_flags_from_variant(variant:dict):
lof_annotations = [x for x in variant['vep_annotations'] if x['LoF'] != '']
if not lof_annotations:
return flags
if any([x['LoF'] == 'HC' for x in lof_annotations]):
flags.append('LoF')
if all([x['LoF'] != 'HC' for x in lof_annotations]):
flags.append('LC LoF')
if all([x['LoF_flags'] != '' for x in lof_annotations]):
Expand Down

0 comments on commit c5ca6d2

Please sign in to comment.