Source code for indra.sources.crog.processor

# -*- coding: utf-8 -*-

"""Processor for the `Chemical Roles Graph (CRoG)

from typing import Optional

from ..utils import RemoteProcessor

__all__ = [

CROG_URL = '' \

[docs]class CrogProcessor(RemoteProcessor): """A processor for the Chemical Roles Graph. Parameters ---------- url : An optional URL. If none given, defaults to :data:`indra.sources.crog.processor.CROG_URL`. """ def __init__(self, url: Optional[str] = None): super().__init__(url=url or CROG_URL)
[docs] def extract_statements(self): super().extract_statements() for stmt in self.statements: # We remap the source API to crog to align with the belief model for ev in stmt.evidence: ev.source_api = 'crog' # We also change the name of targets whose names are ECCODEs to # have the EC prefix in their name for agent in stmt.real_agent_list(): if == agent.db_refs.get('ECCODE'): = 'EC %s' %