# 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/databases/chebi_client.py
# def _add_prefix(chid):
# def get_pubchem_id(chebi_id):
# def get_chebi_id_from_pubchem(pubchem_id):
# def get_chembl_id(chebi_id):
# def get_chebi_id_from_chembl(chembl_id):
# def get_chebi_id_from_cas(cas_id):
# def get_chebi_name_from_id(chebi_id, offline=True):
# def get_chebi_id_from_name(chebi_name):
# def get_chebi_entry_from_web(chebi_id):
# def _get_chebi_value_from_entry(entry, key):
# def get_chebi_name_from_id_web(chebi_id):
# def get_inchi_key(chebi_id):
# def get_primary_id(chebi_id):
# def get_specific_id(chebi_ids):
#     def isa_cmp(a, b):
# def get_chebi_id_from_hmdb(hmdb_id):
# def _read_chebi_to_pubchem():
# def _read_chebi_to_chembl():
# def _read_cas_to_chebi():
# def _read_hmdb_to_chebi():
# def _read_resource_csv(fname):


import json
import logging
from indra.statements import *
from indra.literature import id_lookup
from indra.databases import hgnc_client, uniprot_client, chebi_client, \
    go_client
            if ev.context and ev.context.species:
                species = ev.context.species
                obj = {}
                obj['name'] = species.name
                obj['taxonomy'] = species.db_refs.get('TAXONOMY') \
                    if species.db_refs is not None else None
            else:
                obj = None
            contexts.append(obj)

            hypothesis = ev.epistemics.get('hypothesis')
            hypotheses.append(hypothesis)
    return {'text': ev_txts,
            'context': contexts,
            'hypothesis': hypotheses}


def _get_is_direct(stmt):
    """Returns true if there is evidence that the statement is a direct
    interaction. If any of the evidences associated with the statement
    indicates a direct interatcion then we assume the interaction
    is direct. If there is no evidence for the interaction being indirect
    then we default to direct."""
    any_indirect = False
    for ev in stmt.evidence:
        if ev.epistemics.get('direct') is True:
            return True
        elif ev.epistemics.get('direct') is False:
            # This guarantees that we have seen at least
            # some evidence that the statement is indirect

# 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/databases/chebi_client.py
# def _add_prefix(chid):
# def get_pubchem_id(chebi_id):
# def get_chebi_id_from_pubchem(pubchem_id):
# def get_chembl_id(chebi_id):
# def get_chebi_id_from_chembl(chembl_id):
# def get_chebi_id_from_cas(cas_id):
# def get_chebi_name_from_id(chebi_id, offline=True):
# def get_chebi_id_from_name(chebi_name):
# def get_chebi_entry_from_web(chebi_id):
# def _get_chebi_value_from_entry(entry, key):
# def get_chebi_name_from_id_web(chebi_id):
# def get_inchi_key(chebi_id):
# def get_primary_id(chebi_id):
# def get_specific_id(chebi_ids):
#     def isa_cmp(a, b):
# def get_chebi_id_from_hmdb(hmdb_id):
# def _read_chebi_to_pubchem():
# def _read_chebi_to_chembl():
# def _read_cas_to_chebi():
# def _read_hmdb_to_chebi():
# def _read_resource_csv(fname):


# Path: indra/assemblers/index_card/assembler.py
import json
import logging
from indra.statements import *
from indra.literature import id_lookup
from indra.databases import hgnc_client, uniprot_client, chebi_client, \
    go_client

            if ev.context and ev.context.species:
                species = ev.context.species
                obj = {}
                obj['name'] = species.name
                obj['taxonomy'] = species.db_refs.get('TAXONOMY') \
                    if species.db_refs is not None else None
            else:
                obj = None
            contexts.append(obj)

            hypothesis = ev.epistemics.get('hypothesis')
            hypotheses.append(hypothesis)
    return {'text': ev_txts,
            'context': contexts,
            'hypothesis': hypotheses}


def _get_is_direct(stmt):
    """Returns true if there is evidence that the statement is a direct
    interaction. If any of the evidences associated with the statement
    indicates a direct interatcion then we assume the interaction
    is direct. If there is no evidence for the interaction being indirect
    then we default to direct."""
    any_indirect = False
    for ev in stmt.evidence:
        if ev.epistemics.get('direct') is True:
            return True
        elif ev.epistemics.get('direct') is False:
            # This guarantees that we have seen at least
            # some evidence that the statement is indirect

            any_indirect = True