# Path: indra/ontology/standardize.py
# def standardize_name_db_refs(db_refs, ontology=None, ns_order=None):
#     """Return a standardized name and db refs dict for a given db refs dict.
# 
#     Parameters
#     ----------
#     db_refs : dict
#         A dict of db refs that may not be standardized, i.e., may be
#         missing an available UP ID corresponding to an existing HGNC ID.
#     ontology : Optional[indra.ontology.IndraOntology]
#         An IndraOntology object, if not provided, the default BioOntology
#         is used.
#     ns_order : Optional[list]
#         A list of namespaces which are in order of priority with higher
#         priority namespaces appearing earlier in the list.
# 
#     Returns
#     -------
#     str or None
#         The standard name based on the db refs, None if not available.
#     dict
#         The db_refs dict with standardized entries.
#     """
#     db_refs = standardize_db_refs(db_refs, ontology=ontology,
#                                   ns_order=ns_order)
#     name = get_standard_name(db_refs, ontology=ontology, ns_order=ns_order)
#     return name, db_refs
# 
# def get_standard_agent(name, db_refs, ontology=None, ns_order=None, **kwargs):
#     """Get a standard agent based on the name, db_refs, and a any other kwargs.
# 
#     name : str
#         The name of the agent that may not be standardized.
#     db_refs : dict
#         A dict of db refs that may not be standardized, i.e., may be
#         missing an available UP ID corresponding to an existing HGNC ID.
#     ontology : Optional[indra.ontology.IndraOntology]
#         An IndraOntology object, if not provided, the default BioOntology
#         is used.
#     ns_order : Optional[list]
#         A list of namespaces which are in order of priority with higher
#         priority namespaces appearing earlier in the list.
#     kwargs :
#         Keyword arguments to pass to :func:`Agent.__init__`.
# 
#     Returns
#     -------
#     Agent
#         A standard agent
#     """
#     standard_name, db_refs = standardize_name_db_refs(db_refs,
#                                                       ontology=ontology,
#                                                       ns_order=ns_order)
#     if standard_name:
#         name = standard_name
#     assert_valid_db_refs(db_refs)
#     return Agent(name, db_refs=db_refs, **kwargs)
# 
# Path: indra/databases/hgnc_client.py
# def get_uniprot_id(hgnc_id):
# def get_entrez_id(hgnc_id):
# def get_hgnc_from_entrez(entrez_id):
# def get_ensembl_id(hgnc_id):
# def get_hgnc_from_ensembl(ensembl_id):
# def get_hgnc_name(hgnc_id):
# def get_hgnc_id(hgnc_name):
# def get_current_hgnc_id(hgnc_name):
# def get_hgnc_from_mouse(mgi_id):
# def get_hgnc_from_rat(rgd_id):
# def get_rat_id(hgnc_id):
# def get_mouse_id(hgnc_id):
# def get_hgnc_entry(hgnc_id):
# def get_gene_type(hgnc_id: str) -> Union[str, None]:
# def is_kinase(gene_name):
# def is_transcription_factor(gene_name):
# def is_phosphatase(gene_name):
# def get_enzymes(hgnc_id: str) -> Set[str]:
# def get_hgncs_from_enzyme(ec_code: str) -> Set[str]:
# def _read_hgnc_maps():
# def _read_kinases():
# def _read_phosphatases():
# def _read_tfs():


import logging
from indra.statements import Inhibition, Agent, Evidence
from indra.statements.validate import assert_valid_db_refs
from indra.ontology.standardize import standardize_name_db_refs, \
    get_standard_agent
from indra.databases import hgnc_client, chembl_client, lincs_client
__all__ = ['TasProcessor']



logger = logging.getLogger(__name__)


CLASS_MAP = {'1': 'Kd < 100nM', '2': '100nM < Kd < 1uM',
             '3': '1uM < Kd < 10uM', '10': 'Kd > 10uM'}


lincs_client_obj = lincs_client.LincsClient()



# Path: indra/ontology/standardize.py
# def standardize_name_db_refs(db_refs, ontology=None, ns_order=None):
#     """Return a standardized name and db refs dict for a given db refs dict.
# 
#     Parameters
#     ----------
#     db_refs : dict
#         A dict of db refs that may not be standardized, i.e., may be
#         missing an available UP ID corresponding to an existing HGNC ID.
#     ontology : Optional[indra.ontology.IndraOntology]
#         An IndraOntology object, if not provided, the default BioOntology
#         is used.
#     ns_order : Optional[list]
#         A list of namespaces which are in order of priority with higher
#         priority namespaces appearing earlier in the list.
# 
#     Returns
#     -------
#     str or None
#         The standard name based on the db refs, None if not available.
#     dict
#         The db_refs dict with standardized entries.
#     """
#     db_refs = standardize_db_refs(db_refs, ontology=ontology,
#                                   ns_order=ns_order)
#     name = get_standard_name(db_refs, ontology=ontology, ns_order=ns_order)
#     return name, db_refs
# 
# def get_standard_agent(name, db_refs, ontology=None, ns_order=None, **kwargs):
#     """Get a standard agent based on the name, db_refs, and a any other kwargs.
# 
#     name : str
#         The name of the agent that may not be standardized.
#     db_refs : dict
#         A dict of db refs that may not be standardized, i.e., may be
#         missing an available UP ID corresponding to an existing HGNC ID.
#     ontology : Optional[indra.ontology.IndraOntology]
#         An IndraOntology object, if not provided, the default BioOntology
#         is used.
#     ns_order : Optional[list]
#         A list of namespaces which are in order of priority with higher
#         priority namespaces appearing earlier in the list.
#     kwargs :
#         Keyword arguments to pass to :func:`Agent.__init__`.
# 
#     Returns
#     -------
#     Agent
#         A standard agent
#     """
#     standard_name, db_refs = standardize_name_db_refs(db_refs,
#                                                       ontology=ontology,
#                                                       ns_order=ns_order)
#     if standard_name:
#         name = standard_name
#     assert_valid_db_refs(db_refs)
#     return Agent(name, db_refs=db_refs, **kwargs)
# 
# Path: indra/databases/hgnc_client.py
# def get_uniprot_id(hgnc_id):
# def get_entrez_id(hgnc_id):
# def get_hgnc_from_entrez(entrez_id):
# def get_ensembl_id(hgnc_id):
# def get_hgnc_from_ensembl(ensembl_id):
# def get_hgnc_name(hgnc_id):
# def get_hgnc_id(hgnc_name):
# def get_current_hgnc_id(hgnc_name):
# def get_hgnc_from_mouse(mgi_id):
# def get_hgnc_from_rat(rgd_id):
# def get_rat_id(hgnc_id):
# def get_mouse_id(hgnc_id):
# def get_hgnc_entry(hgnc_id):
# def get_gene_type(hgnc_id: str) -> Union[str, None]:
# def is_kinase(gene_name):
# def is_transcription_factor(gene_name):
# def is_phosphatase(gene_name):
# def get_enzymes(hgnc_id: str) -> Set[str]:
# def get_hgncs_from_enzyme(ec_code: str) -> Set[str]:
# def _read_hgnc_maps():
# def _read_kinases():
# def _read_phosphatases():
# def _read_tfs():


# Path: indra/sources/tas/processor.py
import logging
from indra.statements import Inhibition, Agent, Evidence
from indra.statements.validate import assert_valid_db_refs
from indra.ontology.standardize import standardize_name_db_refs, \
    get_standard_agent
from indra.databases import hgnc_client, chembl_client, lincs_client

__all__ = ['TasProcessor']



logger = logging.getLogger(__name__)


CLASS_MAP = {'1': 'Kd < 100nM', '2': '100nM < Kd < 1uM',
             '3': '1uM < Kd < 10uM', '10': 'Kd > 10uM'}


lincs_client_obj = lincs_client.LincsClient()



class TasProcessor(object):