Skip to content

Commit

Permalink
fixed minore error in variant_type def, now accept also - on top of *
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Berselli authored and Michele Berselli committed Jan 29, 2021
1 parent 447e985 commit ab1da30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions granite/lib/shared_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def variant_type(REF, ALT):
''' return variant type as snv, ins, del '''
if len(ALT.split(',')) > 1:
return 'snv' # TO DECIDE WHAT TO DO, as snv for now
elif len(REF) > len(ALT) or ALT == '*':
elif len(REF) > len(ALT) or ALT in ['*', '-']:
return 'del'
elif len(REF) < len(ALT) or REF == '*':
elif len(REF) < len(ALT) or REF in ['*', '-']:
return 'ins'
#end if
return 'snv'
Expand All @@ -254,9 +254,9 @@ def variant_type_ext(REF, ALT):
return 'mav'
#end if
# normal variant
if len(REF) < len(ALT) or REF == '*':
if len(REF) < len(ALT) or REF in ['*', '-']:
return 'ins'
elif len(REF) > len(ALT) or ALT == '*':
elif len(REF) > len(ALT) or ALT in ['*', '-']:
return 'del'
elif len(REF) == len(ALT) and len(REF) != 1:
return 'mnv'
Expand Down

0 comments on commit ab1da30

Please sign in to comment.