Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation #92

Merged
merged 13 commits into from
Sep 24, 2020
25 changes: 25 additions & 0 deletions src/scaffoldmaker/annotation/stellate_terms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
Common resource for stellate annotation terms.
"""

# convention: preferred name, preferred id, followed by any other ids and alternative names
stellate_terms = [
( "stellate arm 1", None),
( "stellate arm 2", None),
( "stellate arm 3", None),
( "stellate face 2-3", None),
( "stellate face 1-2", None),
( "stellate face 3-1", None),
s-fong marked this conversation as resolved.
Show resolved Hide resolved
( "cervicothoracic ganglion", "UBERON:2441", "FMA:6469", "ILX:733799")
]

def get_stellate_term(name : str):
"""
Find term by matching name to any identifier held for a term.
Raise exception if name not found.
:return ( preferred name, preferred id )
"""
for term in stellate_terms:
if name in term:
return ( term[0], term[1] )
raise NameError("Stellate annotation term '" + name + "' not found.")
Loading