Skip to content

Commit

Permalink
Merge pull request #130 from hammerlab/issue-129
Browse files Browse the repository at this point in the history
All effects should have a default `short_description` field
  • Loading branch information
armish committed Oct 20, 2015
2 parents 9327dfc + e75dca4 commit 48cd5ea
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions varcode/effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ def __lt__(self, other):

@property
def short_description(self):
raise ValueError(
"Property short_description not implemented for %s" % (
self.__class__.__name__,))
"""
A short but human-readable description of the effect.
Defaults to class name for most of the non-coding effects,
but is more informative for coding ones.
"""
return self.__class__.__name__.lower()

transcript = None
gene = None
Expand Down Expand Up @@ -115,6 +118,7 @@ class Intragenic(MutationEffect):
apparently does happen sometimes, maybe some genes have two distinct sets
of exons which are never simultaneously expressed?
"""
short_description = "intragenic"

def __init__(self, variant, gene):
MutationEffect.__init__(self, variant)
Expand Down

0 comments on commit 48cd5ea

Please sign in to comment.