Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

Commit

Permalink
Fix DUP_LOF annotation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RCollins13 committed Jan 15, 2019
1 parent 16fb627 commit eef0fc9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions svtk/annotation/classify_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,21 @@ def classify_dup(disrupt_dict):
"""
elements = disrupt_dict.keys()
if 'CDS' in elements:
# duplication internal to exon
# duplication internal to exon - LOF
if 'BOTH-INSIDE' in disrupt_dict['CDS']:
return 'DUP_LOF'
return 'LOF'

# duplication internal to gene, disrupting exon, is LoF
# duplication internal to gene, wholly contained within exon, is LOF
# duplication internal to gene, spanning at least one exon, is DUP_LOF
# duplication spanning gene is copy gain
# duplication overlapping gene is no effect (one good copy left)
if 'gene' in elements:
if 'BOTH-INSIDE' in disrupt_dict['gene']:
return 'DUP_LOF'
elif 'SPAN' in disrupt_dict['gene']:
if 'SPAN' in disrupt_dict['gene']:
return 'COPY_GAIN'
elif 'BOTH-INSIDE' in disrupt_dict['gene'] \
and 'CDS' in elements \
and 'SPAN' in disrupt_dict['CDS']:
return 'DUP_LOF'
else:
return 'DUP_PARTIAL'

Expand Down

0 comments on commit eef0fc9

Please # to comment.