Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
concept[IDENTIFIER] = _mapped[IDENTIFIER]
concept[NAME] = _mapped[NAME]
return True
elif prefix == 'bel' and name in compartment_mapping:
_mapped = compartment_mapping[name]
concept[NAMESPACE] = _mapped[NAMESPACE]
concept[IDENTIFIER] = _mapped[IDENTIFIER]
concept[NAME] = _mapped[NAME]
return True
elif prefix == 'bel':
logger.warning('could not figure out how to map bel ! %s', name)
return False
if prefix == 'uniprot':
# assume identifier given as name
identifier = get_id_from_mnemonic(name)
if identifier is not None:
concept[IDENTIFIER] = identifier
return True
mnemomic = get_mnemonic(name, web_fallback=True)
if mnemomic is not None:
concept[IDENTIFIER] = name
concept[NAME] = mnemomic
return True
logger.warning('could not interpret uniprot name: %s', name)
return False
try:
id_name_mapping = get_name_id_mapping(prefix)
except (NoOboFoundry, MissingOboBuild) as e: