# 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():


from copy import deepcopy
from indra.databases import hgnc_client
from indra.statements import Agent, IncreaseAmount, DecreaseAmount, Evidence
            target_agent = get_grounded_agent(target)
            if effect == 'Activation':
                stmt_cls = IncreaseAmount
            elif effect == 'Repression':
                stmt_cls = DecreaseAmount
            else:
                continue
            pmids = refs.split(';')
            for pmid in pmids:
                stmt = make_stmt(stmt_cls, tf_agent, target_agent, pmid)
                self.statements.append(stmt)


def make_stmt(stmt_cls, tf_agent, target_agent, pmid):
    """Return a Statement based on its type, agents, and PMID."""
    ev = Evidence(source_api='trrust', pmid=pmid)
    return stmt_cls(deepcopy(tf_agent), deepcopy(target_agent),
                    evidence=[ev])


def get_grounded_agent(gene_name):
    """Return a grounded Agent based on an HGNC symbol."""
    db_refs = {'TEXT': gene_name}
    if gene_name in hgnc_map:
        gene_name = hgnc_map[gene_name]
    hgnc_id = hgnc_client.get_hgnc_id(gene_name)
    if not hgnc_id:
        hgnc_id = hgnc_client.get_current_hgnc_id(gene_name)
    if hgnc_id:
        db_refs['HGNC'] = hgnc_id

# 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/trrust/processor.py
from copy import deepcopy
from indra.databases import hgnc_client
from indra.statements import Agent, IncreaseAmount, DecreaseAmount, Evidence

            target_agent = get_grounded_agent(target)
            if effect == 'Activation':
                stmt_cls = IncreaseAmount
            elif effect == 'Repression':
                stmt_cls = DecreaseAmount
            else:
                continue
            pmids = refs.split(';')
            for pmid in pmids:
                stmt = make_stmt(stmt_cls, tf_agent, target_agent, pmid)
                self.statements.append(stmt)


def make_stmt(stmt_cls, tf_agent, target_agent, pmid):
    """Return a Statement based on its type, agents, and PMID."""
    ev = Evidence(source_api='trrust', pmid=pmid)
    return stmt_cls(deepcopy(tf_agent), deepcopy(target_agent),
                    evidence=[ev])


def get_grounded_agent(gene_name):
    """Return a grounded Agent based on an HGNC symbol."""
    db_refs = {'TEXT': gene_name}
    if gene_name in hgnc_map:
        gene_name = hgnc_map[gene_name]
    hgnc_id = hgnc_client.get_hgnc_id(gene_name)
    if not hgnc_id:
        hgnc_id = hgnc_client.get_current_hgnc_id(gene_name)
    if hgnc_id:
        db_refs['HGNC'] = hgnc_id

        up_id = hgnc_client.get_uniprot_id(hgnc_id)