How to use the protmapper.uniprot_client.get_id_from_mnemonic function in protmapper

To help you get started, we’ve selected a few protmapper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pybel / pybel / src / pybel / grounding.py View on Github external
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:

protmapper

Map protein sites to human reference sequence.

BSD-2-Clause
Latest version published 10 months ago

Package Health Score

51 / 100
Full package analysis

Similar packages