Skip to content

Locy Case Study: Drug Repurposing via Biomedical Knowledge Graph

This case study demonstrates probabilistic graph reasoning for drug repurposing — identifying new therapeutic uses for existing approved drugs.

Key Locy features demonstrated: - ALONG — recursive pathway traversal through protein-protein interaction networks - FOLD MNOR — noisy-OR aggregation of independent mechanistic pathway evidence - similar_to — molecular fingerprint similarity for structural analogue discovery - IS NOT — exclusion of known approved indications - ASSUME — counterfactual "what-if" binding simulation - ABDUCE — minimal evidence search for target disease candidates - EXPLAIN RULE — derivation tree inspection for explainable drug-disease predictions

How To Read This Notebook

  • Section 1 sets up helpers, locates data files, and creates an isolated temporary database.
  • Section 2 loads CSV snapshots and builds a focus cohort around 4 drugs with known repurposing stories.
  • Section 3 defines the graph schema (labels, properties, edge types).
  • Section 4 ingests all nodes and edges.
  • Section 5 declares the full Locy program (ALONG, FOLD MNOR, IS NOT, similar_to) and evaluates it.
  • Sections 6-8 demonstrate EXPLAIN RULE, ASSUME, and ABDUCE.
  • Section 9 describes expected outputs; Section 10 runs build-time assertions; Section 11 cleans up.

1) Setup & Data Discovery

Loads helpers, locates prepared CSV data files, and creates an isolated temporary database.

from pathlib import Path
from pprint import pprint
import csv
import json
import os
import shutil
import tempfile

import uni_db


def _read_csv(path: Path) -> list[dict[str, str]]:
    with path.open('r', encoding='utf-8', newline='') as f:
        return list(csv.DictReader(f))


def _esc(value: str) -> str:
    return str(value).replace('\\', '\\\\').replace("'", "\\'")


def _f(value: str) -> float:
    return float(value) if value not in ('', None) else 0.0


def _vec(value: str) -> list[float]:
    return [float(x) for x in json.loads(value)]


def _norm_key(key: object) -> str:
    s = str(key)
    if s.startswith('Variable("') and s.endswith('")'):
        return s[len('Variable("'):-2]
    return s


def _norm_rows(rows: list[dict[object, object]]) -> list[dict[str, object]]:
    return [{_norm_key(k): v for k, v in row.items()} for row in rows]


def _print_tree(node, depth=0, max_depth=3, max_children=5):
    indent = '  ' * depth
    print(f"{indent}- rule={node.get('rule')}, clause={node.get('clause_index')}, bindings={node.get('bindings', {})}")
    if depth >= max_depth:
        return
    children = node.get('children', [])
    for child in children[:max_children]:
        _print_tree(child, depth + 1, max_depth=max_depth, max_children=max_children)
    if len(children) > max_children:
        print(f"{indent}  ... {len(children) - max_children} more child derivations")


_default_candidates = [
    Path('docs/examples/data/locy_drug_repurposing'),
    Path('website/docs/examples/data/locy_drug_repurposing'),
    Path('examples/data/locy_drug_repurposing'),
    Path('../data/locy_drug_repurposing'),
]
if 'LOCY_DATA_DIR' in os.environ:
    DATA_DIR = Path(os.environ['LOCY_DATA_DIR']).resolve()
else:
    DATA_DIR = next(
        (p.resolve() for p in _default_candidates if (p / 'drugs.csv').exists()),
        _default_candidates[0].resolve(),
    )
if not (DATA_DIR / 'drugs.csv').exists():
    raise FileNotFoundError(
        'Expected data under docs/examples/data/locy_drug_repurposing. '
        'Run from website/ (or repo root) or set LOCY_DATA_DIR.'
    )
DB_DIR = tempfile.mkdtemp(prefix='uni_locy_drug_')
db = uni_db.Uni.open(DB_DIR)
session = db.session()
print('DATA_DIR:', DATA_DIR)
print('DB_DIR:', DB_DIR)
DATA_DIR: /home/runner/work/uni-db/uni-db/website/docs/examples/data/locy_drug_repurposing
DB_DIR: /tmp/uni_locy_drug_7gvzezix

2) Load Data & Build Focus Cohort

Loads deterministic CSV snapshots and selects a focus cohort around 4 drugs with known repurposing stories. PPI neighbors are expanded 3 hops to capture multi-step mechanistic pathways.

drugs = _read_csv(DATA_DIR / 'drugs.csv')
proteins = _read_csv(DATA_DIR / 'proteins.csv')
diseases = _read_csv(DATA_DIR / 'diseases.csv')
side_effects = _read_csv(DATA_DIR / 'side_effects.csv')
binds = _read_csv(DATA_DIR / 'binds.csv')
interacts = _read_csv(DATA_DIR / 'interacts.csv')
associated_with = _read_csv(DATA_DIR / 'associated_with.csv')
indicated_for = _read_csv(DATA_DIR / 'indicated_for.csv')
causes_adr = _read_csv(DATA_DIR / 'causes_adr.csv')
notebook_cases = _read_csv(DATA_DIR / 'notebook_cases.csv')

# Focus on 4 drugs with known repurposing stories
focus_drug_ids = {r['drug_id'] for r in notebook_cases}
focus_drugs = [r for r in drugs if r['drug_id'] in focus_drug_ids]

# Include all proteins, diseases, side effects (small dataset)
# Filter edges to focus drugs
focus_binds = [r for r in binds if r['drug_id'] in focus_drug_ids]
focus_protein_ids = {r['protein_id'] for r in focus_binds}
# Also include proteins reachable via PPI from focus targets
for _ in range(2):  # 3-hop expansion
    new_pids = set()
    for r in interacts:
        if r['src_protein_id'] in focus_protein_ids:
            new_pids.add(r['dst_protein_id'])
        if r['dst_protein_id'] in focus_protein_ids:
            new_pids.add(r['src_protein_id'])
    focus_protein_ids.update(new_pids)

focus_proteins = [r for r in proteins if r['protein_id'] in focus_protein_ids]
focus_interacts = [r for r in interacts if r['src_protein_id'] in focus_protein_ids and r['dst_protein_id'] in focus_protein_ids]
focus_assoc = [r for r in associated_with if r['protein_id'] in focus_protein_ids]
focus_disease_ids = {r['disease_id'] for r in focus_assoc}
focus_diseases = [r for r in diseases if r['disease_id'] in focus_disease_ids]
focus_indicated = [r for r in indicated_for if r['drug_id'] in focus_drug_ids]
focus_adr = [r for r in causes_adr if r['drug_id'] in focus_drug_ids]

print('focus drugs:', len(focus_drugs))
print('focus proteins:', len(focus_proteins))
print('focus diseases:', len(focus_diseases))
print('focus binds:', len(focus_binds))
print('focus PPI interactions:', len(focus_interacts))
print('focus gene-disease assoc:', len(focus_assoc))
print('focus indications:', len(focus_indicated))
focus drugs: 4
focus proteins: 41
focus diseases: 17
focus binds: 16
focus PPI interactions: 61
focus gene-disease assoc: 38
focus indications: 6

3) Define Schema

Defines explicit labels, typed properties, vector dimensions, and edge types before ingest.

(
    db.schema()
    .label('Drug')
        .property('drug_id', 'string')
        .property('name', 'string')
        .property('drug_class', 'string')
        .property('approval_status', 'string')
        .vector('fingerprint', 4)
    .done()
    .label('Protein')
        .property('protein_id', 'string')
        .property('name', 'string')
        .property('gene_symbol', 'string')
        .property('family', 'string')
    .done()
    .label('Disease')
        .property('disease_id', 'string')
        .property('name', 'string')
        .property('therapeutic_area', 'string')
    .done()
    .label('SideEffect')
        .property('se_id', 'string')
        .property('name', 'string')
        .property('severity', 'string')
    .done()
    .edge_type('BINDS', ['Drug'], ['Protein'])
        .property('affinity_nm', 'float64')
        .property('confidence', 'float64')
    .done()
    .edge_type('INTERACTS', ['Protein'], ['Protein'])
        .property('string_score', 'float64')
    .done()
    .edge_type('ASSOCIATED_WITH', ['Protein'], ['Disease'])
        .property('gda_score', 'float64')
    .done()
    .edge_type('INDICATED_FOR', ['Drug'], ['Disease'])
        .property('evidence', 'string')
    .done()
    .edge_type('CAUSES_ADR', ['Drug'], ['SideEffect'])
        .property('frequency', 'float64')
    .done()
    .apply()
)
print('Schema created')
Schema created

4) Ingest Graph Facts

Creates all nodes and edges from the focus cohort CSVs using Cypher CREATE/MATCH statements.

tx = session.tx()

for row in focus_drugs:
    fp = _vec(row['fingerprint'])
    tx.execute(
        f"CREATE (:Drug {{drug_id: '{_esc(row['drug_id'])}', name: '{_esc(row['name'])}', "
        f"drug_class: '{_esc(row['drug_class'])}', approval_status: '{_esc(row['approval_status'])}', "
        f"fingerprint: {fp}}})"
    )

for row in focus_proteins:
    tx.execute(
        f"CREATE (:Protein {{protein_id: '{_esc(row['protein_id'])}', name: '{_esc(row['name'])}', "
        f"gene_symbol: '{_esc(row['gene_symbol'])}', family: '{_esc(row['family'])}'}})"
    )

for row in focus_diseases:
    tx.execute(
        f"CREATE (:Disease {{disease_id: '{_esc(row['disease_id'])}', name: '{_esc(row['name'])}', "
        f"therapeutic_area: '{_esc(row['therapeutic_area'])}'}})"
    )

for row in side_effects:
    tx.execute(
        f"CREATE (:SideEffect {{se_id: '{_esc(row['se_id'])}', name: '{_esc(row['name'])}', "
        f"severity: '{_esc(row['severity'])}'}})"
    )

for row in focus_binds:
    tx.execute(
        f"MATCH (d:Drug {{drug_id: '{_esc(row['drug_id'])}'}}), (p:Protein {{protein_id: '{_esc(row['protein_id'])}'}}) "
        f"CREATE (d)-[:BINDS {{affinity_nm: {_f(row['affinity_nm'])}, confidence: {_f(row['confidence'])}}}]->(p)"
    )

for row in focus_interacts:
    tx.execute(
        f"MATCH (p1:Protein {{protein_id: '{_esc(row['src_protein_id'])}'}}), (p2:Protein {{protein_id: '{_esc(row['dst_protein_id'])}'}}) "
        f"CREATE (p1)-[:INTERACTS {{string_score: {_f(row['string_score'])}}}]->(p2)"
    )

for row in focus_assoc:
    tx.execute(
        f"MATCH (p:Protein {{protein_id: '{_esc(row['protein_id'])}'}}), (dis:Disease {{disease_id: '{_esc(row['disease_id'])}'}}) "
        f"CREATE (p)-[:ASSOCIATED_WITH {{gda_score: {_f(row['gda_score'])}}}]->(dis)"
    )

for row in focus_indicated:
    tx.execute(
        f"MATCH (d:Drug {{drug_id: '{_esc(row['drug_id'])}'}}), (dis:Disease {{disease_id: '{_esc(row['disease_id'])}'}}) "
        f"CREATE (d)-[:INDICATED_FOR {{evidence: '{_esc(row['evidence'])}'}}]->(dis)"
    )

for row in focus_adr:
    tx.execute(
        f"MATCH (d:Drug {{drug_id: '{_esc(row['drug_id'])}'}}), (se:SideEffect {{se_id: '{_esc(row['se_id'])}'}}) "
        f"CREATE (d)-[:CAUSES_ADR {{frequency: {_f(row['frequency'])}}}]->(se)"
    )

tx.commit()

counts = session.query("""
MATCH (d:Drug) WITH count(*) AS drugs
MATCH (p:Protein) WITH drugs, count(*) AS proteins
MATCH (dis:Disease) WITH drugs, proteins, count(*) AS diseases
MATCH (se:SideEffect) WITH drugs, proteins, diseases, count(*) AS side_effects
MATCH ()-[b:BINDS]->() WITH drugs, proteins, diseases, side_effects, count(*) AS binds
MATCH ()-[i:INTERACTS]->() WITH drugs, proteins, diseases, side_effects, binds, count(*) AS interactions
MATCH ()-[a:ASSOCIATED_WITH]->()
RETURN drugs, proteins, diseases, side_effects, binds, interactions, count(a) AS associations
""")
print('Graph counts:')
pprint(counts[0])
Graph counts:
Row(drugs=..., proteins=..., diseases=..., side_effects=..., binds=..., interactions=..., associations=...)

5) Baseline Locy Program

The core probabilistic reasoning pipeline:

  1. ppi_reach (base + recursive) — ALONG traverses Protein -> PPI -> ... -> Disease, accumulating strength and hop count. BEST BY keeps the strongest shortest path.
  2. repurposing_signal — Joins Drug->Protein binding with ppi_reach, then FOLD MNOR aggregates independent pathway strengths per drug-disease pair using noisy-OR (probability of at least one pathway being real).
  3. known_indication — captures existing approved drug-disease pairs.
  4. novel_candidateIS NOT filters out known indications, leaving only repurposing candidates.
  5. structural_analoguesimilar_to on molecular fingerprint vectors finds drugs with similar structure that share target diseases.
program = r'''
CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, a.gda_score AS strength

CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[i:INTERACTS]->(p2:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, i.string_score * a.gda_score AS strength

CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[i1:INTERACTS]->(p2:Protein)-[i2:INTERACTS]->(p3:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, i1.string_score * i2.string_score * a.gda_score AS strength

CREATE RULE drug_pathway AS
  MATCH (d:Drug)-[b:BINDS]->(p:Protein)
  WHERE p IS ppi_reach TO dis
  YIELD KEY d, KEY dis, b.confidence * strength AS pathway_score

CREATE RULE repurposing_signal AS
  MATCH (d:Drug)
  WHERE d IS drug_pathway TO dis
  FOLD evidence = MNOR(pathway_score)
  YIELD KEY d, KEY dis, evidence

CREATE RULE known_indication AS
  MATCH (d:Drug)-[:INDICATED_FOR]->(dis:Disease)
  YIELD KEY d, KEY dis

CREATE RULE novel_candidate AS
  MATCH (d:Drug)
  WHERE d IS repurposing_signal TO dis, d IS NOT known_indication TO dis
  YIELD KEY d, KEY dis, evidence

CREATE RULE structural_analogue AS
  MATCH (d1:Drug), (d2:Drug)-[:INDICATED_FOR]->(dis:Disease)
  WHERE d1 <> d2
  YIELD KEY d1, KEY dis, similar_to(d1.fingerprint, d2.fingerprint) AS analogy

QUERY novel_candidate WHERE d = d RETURN d.name AS drug, dis.name AS disease, evidence ORDER BY evidence DESC
QUERY structural_analogue WHERE analogy >= 0.5 RETURN d1.name AS drug, dis.name AS disease, analogy ORDER BY analogy DESC LIMIT 10
'''

baseline_out = session.locy_with(program).with_config({'max_iterations': 400, 'timeout_secs': 180.0}).run()
stats = baseline_out.stats
print('Iterations:', stats.total_iterations)
print('Strata:', stats.strata_evaluated)

novel_rows = []
analogue_rows = []
for i, cmd in enumerate(baseline_out.command_results, start=1):
    print(f'\nCommand #{i}:', cmd.command_type)
    rows = _norm_rows(cmd.rows)
    print('rows:', len(rows))
    pprint(rows[:8])
    if rows and 'evidence' in rows[0]:
        novel_rows = rows
    if rows and 'analogy' in rows[0]:
        analogue_rows = rows

for row in novel_rows:
    e = float(row['evidence'])
    assert 0.0 <= e <= 1.0, f'MNOR score out of range: {e}'
print(f'\nAll {len(novel_rows)} novel candidate scores in [0, 1]')
Iterations: 0
Strata: 6

Command #1: query
rows: 28
[{'disease': 'Ulcerative colitis',
  'drug': 'Baricitinib',
  'evidence': 0.9988304092964354},
 {'disease': 'Crohn disease',
  'drug': 'Thalidomide',
  'evidence': 0.9985616543607686},
 {'disease': 'Psoriasis', 'drug': 'Thalidomide', 'evidence': 0.998248395586102},
 {'disease': 'Rheumatoid arthritis',
  'drug': 'Thalidomide',
  'evidence': 0.9973354714782048},
 {'disease': 'Ulcerative colitis',
  'drug': 'Thalidomide',
  'evidence': 0.9949905941732247},
 {'disease': 'Crohn disease',
  'drug': 'Baricitinib',
  'evidence': 0.9803830581115444},
 {'disease': 'Psoriasis', 'drug': 'Baricitinib', 'evidence': 0.977384295021714},
 {'disease': 'Colorectal cancer',
  'drug': 'Thalidomide',
  'evidence': 0.96473230345402}]

Command #2: query
rows: 3
[{'analogy': 0.8074702356715628, 'disease': 'COVID-19', 'drug': 'Thalidomide'},
 {'analogy': 0.8074702356715628,
  'disease': 'Rheumatoid arthritis',
  'drug': 'Thalidomide'},
 {'analogy': 0.8074702356715628,
  'disease': 'Multiple myeloma',
  'drug': 'Baricitinib'}]

All 28 novel candidate scores in [0, 1]

6) EXPLAIN RULE

Inspects the derivation tree behind a specific drug-disease prediction. Target: Baricitinib -> COVID-19 — expected to show multiple mechanistic pathways through JAK1/JAK2 (cytokine storm) and AAK1 (viral endocytosis).

program_explain = r'''
CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, a.gda_score AS strength

CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[i:INTERACTS]->(p2:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, i.string_score * a.gda_score AS strength

CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[i1:INTERACTS]->(p2:Protein)-[i2:INTERACTS]->(p3:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, i1.string_score * i2.string_score * a.gda_score AS strength

CREATE RULE drug_pathway AS
  MATCH (d:Drug)-[b:BINDS]->(p:Protein)
  WHERE p IS ppi_reach TO dis
  YIELD KEY d, KEY dis, b.confidence * strength AS pathway_score

CREATE RULE repurposing_signal AS
  MATCH (d:Drug)
  WHERE d IS drug_pathway TO dis
  FOLD evidence = MNOR(pathway_score)
  YIELD KEY d, KEY dis, evidence

EXPLAIN RULE repurposing_signal WHERE d.name = 'Baricitinib' AND dis.name = 'COVID-19'
'''

explain_out = session.locy_with(program_explain).with_config({'max_iterations': 200, 'timeout_secs': 60.0}).run()
explain_cmd = next(cmd for cmd in explain_out.command_results if cmd.command_type == 'explain')
tree = explain_cmd.tree
print('Derivation tree for Baricitinib -> COVID-19:')
_print_tree(tree, max_depth=4, max_children=5)
Derivation tree for Baricitinib -> COVID-19:
- rule=repurposing_signal, clause=0, bindings={}
  - rule=repurposing_signal, clause=0, bindings={'pathway_score': 0.8025599999999999, 'evidence': None, 'd': Node(id=3, labels=["Drug"], properties={'drug_class': 'JAK_inhibitor', 'drug_id': 'DRUG_004', 'approval_status': 'approved', 'name': 'Baricitinib', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'overflow_json': None}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'})}
    - rule=drug_pathway, clause=0, bindings={'strength': 0.8448, 'pathway_score': 0.8025599999999999, 'p': Node(id=7, labels=["Protein"], properties={'protein_id': 'PROT_004', 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1', 'family': 'kinase'}), 'd': Node(id=3, labels=["Drug"], properties={'overflow_json': None, 'drug_id': 'DRUG_004', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'approval_status': 'approved', 'name': 'Baricitinib', 'drug_class': 'JAK_inhibitor'}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'confidence': 0.96, 'affinity_nm': 5.9})}
      - rule=ppi_reach, clause=1, bindings={'strength': 0.8448, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'gene_symbol': 'STAT3', 'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'p': Node(id=7, labels=["Protein"], properties={'overflow_json': None, 'protein_id': 'PROT_004', 'name': 'Janus kinase 1', 'family': 'kinase', 'gene_symbol': 'JAK1'})}
      - rule=ppi_reach, clause=1, bindings={'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'p': Node(id=7, labels=["Protein"], properties={'family': 'kinase', 'gene_symbol': 'JAK1', 'overflow_json': None, 'name': 'Janus kinase 1', 'protein_id': 'PROT_004'}), 'strength': 0.6932159999999999, 'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3', 'family': 'transcription_factor'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96})}
    - rule=drug_pathway, clause=0, bindings={'p': Node(id=8, labels=["Protein"], properties={'name': 'Janus kinase 2', 'family': 'kinase', 'protein_id': 'PROT_005', 'gene_symbol': 'JAK2'}), 'pathway_score': 0.6585552, 'strength': 0.836, 'd': Node(id=3, labels=["Drug"], properties={'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'overflow_json': None, 'approval_status': 'approved', 'drug_id': 'DRUG_004', 'name': 'Baricitinib'}), 'b': Edge(id=9, type='BINDS', start=0, end=0, properties={'affinity_nm': 5.7, 'confidence': 0.96}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'})}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'family': 'transcription_factor', 'gene_symbol': 'STAT3'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95}), 'strength': 0.836, 'p': Node(id=8, labels=["Protein"], properties={'name': 'Janus kinase 2', 'gene_symbol': 'JAK2', 'protein_id': 'PROT_005', 'overflow_json': None, 'family': 'kinase'}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'})}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'gene_symbol': 'STAT3'}), 'p': Node(id=8, labels=["Protein"], properties={'protein_id': 'PROT_005', 'overflow_json': None, 'gene_symbol': 'JAK2', 'name': 'Janus kinase 2', 'family': 'kinase'}), 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'strength': 0.685995, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
    - rule=drug_pathway, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'strength': 0.8448, 'pathway_score': 0.811008, 'p': Node(id=7, labels=["Protein"], properties={'gene_symbol': 'JAK1', 'name': 'Janus kinase 1', 'protein_id': 'PROT_004', 'family': 'kinase'}), 'd': Node(id=3, labels=["Drug"], properties={'approval_status': 'approved', 'drug_class': 'JAK_inhibitor', 'name': 'Baricitinib', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'drug_id': 'DRUG_004', 'overflow_json': None}), 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'confidence': 0.96, 'affinity_nm': 5.9})}
      - rule=ppi_reach, clause=1, bindings={'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'gene_symbol': 'STAT3', 'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3'}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'}), 'strength': 0.8448, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p': Node(id=7, labels=["Protein"], properties={'family': 'kinase', 'protein_id': 'PROT_004', 'overflow_json': None, 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1'})}
      - rule=ppi_reach, clause=1, bindings={'strength': 0.6932159999999999, 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'p': Node(id=7, labels=["Protein"], properties={'gene_symbol': 'JAK1', 'family': 'kinase', 'name': 'Janus kinase 1', 'protein_id': 'PROT_004', 'overflow_json': None}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'family': 'transcription_factor'})}
    - rule=drug_pathway, clause=0, bindings={'pathway_score': 0.66548736, 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'p': Node(id=7, labels=["Protein"], properties={'family': 'kinase', 'protein_id': 'PROT_004', 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1'}), 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'confidence': 0.96, 'affinity_nm': 5.9}), 'strength': 0.8448, 'd': Node(id=3, labels=["Drug"], properties={'approval_status': 'approved', 'name': 'Baricitinib', 'overflow_json': None, 'drug_id': 'DRUG_004', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'drug_class': 'JAK_inhibitor'})}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'}), 'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'protein_id': 'PROT_022', 'family': 'transcription_factor'}), 'p': Node(id=7, labels=["Protein"], properties={'name': 'Janus kinase 1', 'overflow_json': None, 'family': 'kinase', 'gene_symbol': 'JAK1', 'protein_id': 'PROT_004'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.8448, 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96})}
      - rule=ppi_reach, clause=1, bindings={'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'p': Node(id=7, labels=["Protein"], properties={'family': 'kinase', 'overflow_json': None, 'protein_id': 'PROT_004', 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1'}), 'p2': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.6932159999999999}
    - rule=drug_pathway, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'p': Node(id=14, labels=["Protein"], properties={'gene_symbol': 'AAK1', 'protein_id': 'PROT_011', 'name': 'AP2-associated kinase 1', 'family': 'kinase'}), 'strength': 0.7989999999999999, 'd': Node(id=3, labels=["Drug"], properties={'approval_status': 'approved', 'drug_id': 'DRUG_004', 'name': 'Baricitinib', 'overflow_json': None, 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'drug_class': 'JAK_inhibitor'}), 'pathway_score': 0.41641600000000006, 'b': Edge(id=11, type='BINDS', start=0, end=0, properties={'affinity_nm': 17.0, 'confidence': 0.88})}
      - rule=ppi_reach, clause=1, bindings={'i': Edge(id=34, type='INTERACTS', start=0, end=0, properties={'string_score': 0.85}), 'p2': Node(id=15, labels=["Protein"], properties={'gene_symbol': 'ACE2', 'name': 'Angiotensin-converting enzyme 2', 'protein_id': 'PROT_012', 'family': 'enzyme'}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'a': Edge(id=91, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.94}), 'p': Node(id=14, labels=["Protein"], properties={'name': 'AP2-associated kinase 1', 'family': 'kinase', 'gene_symbol': 'AAK1', 'overflow_json': None, 'protein_id': 'PROT_011'}), 'strength': 0.7989999999999999}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=15, labels=["Protein"], properties={'protein_id': 'PROT_012', 'name': 'Angiotensin-converting enzyme 2', 'gene_symbol': 'ACE2', 'family': 'enzyme'}), 'p': Node(id=14, labels=["Protein"], properties={'protein_id': 'PROT_011', 'name': 'AP2-associated kinase 1', 'gene_symbol': 'AAK1', 'overflow_json': None, 'family': 'kinase'}), 'strength': 0.71162, 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'a': Edge(id=91, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.94}), 'i': Edge(id=34, type='INTERACTS', start=0, end=0, properties={'string_score': 0.85})}
    ... 6 more child derivations
  - rule=repurposing_signal, clause=0, bindings={'d': Node(id=3, labels=["Drug"], properties={'overflow_json': None, 'approval_status': 'approved', 'drug_class': 'JAK_inhibitor', 'name': 'Baricitinib', 'drug_id': 'DRUG_004', 'fingerprint': [-0.33, 0.49, 0.71, -0.18]}), 'evidence': None, 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'pathway_score': 0.8025599999999999}
    - rule=drug_pathway, clause=0, bindings={'d': Node(id=3, labels=["Drug"], properties={'name': 'Baricitinib', 'drug_id': 'DRUG_004', 'overflow_json': None, 'drug_class': 'JAK_inhibitor', 'approval_status': 'approved', 'fingerprint': [-0.33, 0.49, 0.71, -0.18]}), 'b': Edge(id=11, type='BINDS', start=0, end=0, properties={'confidence': 0.88, 'affinity_nm': 17.0}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'pathway_score': 0.8025599999999999, 'p': Node(id=14, labels=["Protein"], properties={'family': 'kinase', 'gene_symbol': 'AAK1', 'protein_id': 'PROT_011', 'name': 'AP2-associated kinase 1'}), 'strength': 0.7989999999999999}
      - rule=ppi_reach, clause=1, bindings={'strength': 0.7989999999999999, 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'}), 'a': Edge(id=91, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.94}), 'p': Node(id=14, labels=["Protein"], properties={'protein_id': 'PROT_011', 'family': 'kinase', 'overflow_json': None, 'name': 'AP2-associated kinase 1', 'gene_symbol': 'AAK1'}), 'i': Edge(id=34, type='INTERACTS', start=0, end=0, properties={'string_score': 0.85}), 'p2': Node(id=15, labels=["Protein"], properties={'name': 'Angiotensin-converting enzyme 2', 'family': 'enzyme', 'protein_id': 'PROT_012', 'gene_symbol': 'ACE2'})}
      - rule=ppi_reach, clause=1, bindings={'strength': 0.71162, 'p': Node(id=14, labels=["Protein"], properties={'overflow_json': None, 'name': 'AP2-associated kinase 1', 'gene_symbol': 'AAK1', 'protein_id': 'PROT_011', 'family': 'kinase'}), 'p2': Node(id=15, labels=["Protein"], properties={'family': 'enzyme', 'protein_id': 'PROT_012', 'gene_symbol': 'ACE2', 'name': 'Angiotensin-converting enzyme 2'}), 'a': Edge(id=91, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.94}), 'i': Edge(id=34, type='INTERACTS', start=0, end=0, properties={'string_score': 0.85}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'})}
    - rule=drug_pathway, clause=0, bindings={'pathway_score': 0.6585552, 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'confidence': 0.96, 'affinity_nm': 5.9}), 'd': Node(id=3, labels=["Drug"], properties={'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'name': 'Baricitinib', 'drug_id': 'DRUG_004', 'drug_class': 'JAK_inhibitor', 'approval_status': 'approved', 'overflow_json': None}), 'strength': 0.8448, 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'p': Node(id=7, labels=["Protein"], properties={'family': 'kinase', 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1', 'protein_id': 'PROT_004'})}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'strength': 0.8448, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p': Node(id=7, labels=["Protein"], properties={'gene_symbol': 'JAK1', 'family': 'kinase', 'protein_id': 'PROT_004', 'name': 'Janus kinase 1', 'overflow_json': None}), 'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'family': 'transcription_factor', 'protein_id': 'PROT_022'})}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'family': 'transcription_factor'}), 'strength': 0.6932159999999999, 'p': Node(id=7, labels=["Protein"], properties={'name': 'Janus kinase 1', 'family': 'kinase', 'gene_symbol': 'JAK1', 'overflow_json': None, 'protein_id': 'PROT_004'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
    - rule=drug_pathway, clause=0, bindings={'d': Node(id=3, labels=["Drug"], properties={'overflow_json': None, 'name': 'Baricitinib', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'drug_class': 'JAK_inhibitor', 'approval_status': 'approved', 'drug_id': 'DRUG_004'}), 'strength': 0.88, 'pathway_score': 0.811008, 'p': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3'}), 'b': Edge(id=15, type='BINDS', start=0, end=0, properties={'confidence': 0.66, 'affinity_nm': 180.0}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'})}
      - rule=ppi_reach, clause=0, bindings={'strength': 0.88, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'p': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'family': 'transcription_factor', 'overflow_json': None, 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3'})}
      - rule=ppi_reach, clause=0, bindings={'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'protein_id': 'PROT_022', 'overflow_json': None, 'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'strength': 0.7221}
      - rule=ppi_reach, clause=0, bindings={'strength': 0.6573599999999999, 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'p': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'family': 'transcription_factor', 'overflow_json': None, 'protein_id': 'PROT_022'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
    - rule=drug_pathway, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'd': Node(id=3, labels=["Drug"], properties={'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'approval_status': 'approved', 'overflow_json': None, 'drug_id': 'DRUG_004', 'name': 'Baricitinib', 'drug_class': 'JAK_inhibitor'}), 'strength': 0.8008000000000001, 'b': Edge(id=10, type='BINDS', start=0, end=0, properties={'affinity_nm': 560.0, 'confidence': 0.52}), 'p': Node(id=9, labels=["Protein"], properties={'name': 'Janus kinase 3', 'protein_id': 'PROT_006', 'family': 'kinase', 'gene_symbol': 'JAK3'}), 'pathway_score': 0.66548736}
      - rule=ppi_reach, clause=1, bindings={'i': Edge(id=18, type='INTERACTS', start=0, end=0, properties={'string_score': 0.91}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p': Node(id=9, labels=["Protein"], properties={'name': 'Janus kinase 3', 'overflow_json': None, 'protein_id': 'PROT_006', 'gene_symbol': 'JAK3', 'family': 'kinase'}), 'strength': 0.8008000000000001, 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3'})}
      - rule=ppi_reach, clause=1, bindings={'strength': 0.657111, 'p': Node(id=9, labels=["Protein"], properties={'protein_id': 'PROT_006', 'name': 'Janus kinase 3', 'gene_symbol': 'JAK3', 'overflow_json': None, 'family': 'kinase'}), 'i': Edge(id=18, type='INTERACTS', start=0, end=0, properties={'string_score': 0.91}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p2': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'protein_id': 'PROT_022'}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'})}
    - rule=drug_pathway, clause=0, bindings={'pathway_score': 0.41641600000000006, 'p': Node(id=8, labels=["Protein"], properties={'family': 'kinase', 'protein_id': 'PROT_005', 'gene_symbol': 'JAK2', 'name': 'Janus kinase 2'}), 'b': Edge(id=9, type='BINDS', start=0, end=0, properties={'confidence': 0.96, 'affinity_nm': 5.7}), 'd': Node(id=3, labels=["Drug"], properties={'overflow_json': None, 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'drug_id': 'DRUG_004', 'name': 'Baricitinib', 'approval_status': 'approved', 'drug_class': 'JAK_inhibitor'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'strength': 0.836}
      - rule=ppi_reach, clause=1, bindings={'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95}), 'p': Node(id=8, labels=["Protein"], properties={'protein_id': 'PROT_005', 'family': 'kinase', 'gene_symbol': 'JAK2', 'name': 'Janus kinase 2', 'overflow_json': None}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3'}), 'strength': 0.836, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95}), 'p': Node(id=8, labels=["Protein"], properties={'gene_symbol': 'JAK2', 'name': 'Janus kinase 2', 'family': 'kinase', 'protein_id': 'PROT_005', 'overflow_json': None}), 'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'family': 'transcription_factor', 'gene_symbol': 'STAT3'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.685995}
    ... 6 more child derivations
  - rule=repurposing_signal, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'd': Node(id=3, labels=["Drug"], properties={'drug_id': 'DRUG_004', 'approval_status': 'approved', 'name': 'Baricitinib', 'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'overflow_json': None}), 'pathway_score': 0.8025599999999999, 'evidence': None}
    - rule=drug_pathway, clause=0, bindings={'b': Edge(id=10, type='BINDS', start=0, end=0, properties={'affinity_nm': 560.0, 'confidence': 0.52}), 'p': Node(id=9, labels=["Protein"], properties={'gene_symbol': 'JAK3', 'protein_id': 'PROT_006', 'family': 'kinase', 'name': 'Janus kinase 3'}), 'pathway_score': 0.8025599999999999, 'strength': 0.8008000000000001, 'd': Node(id=3, labels=["Drug"], properties={'drug_class': 'JAK_inhibitor', 'overflow_json': None, 'drug_id': 'DRUG_004', 'approval_status': 'approved', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'name': 'Baricitinib'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'})}
      - rule=ppi_reach, clause=1, bindings={'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3'}), 'p': Node(id=9, labels=["Protein"], properties={'family': 'kinase', 'name': 'Janus kinase 3', 'overflow_json': None, 'protein_id': 'PROT_006', 'gene_symbol': 'JAK3'}), 'strength': 0.8008000000000001, 'i': Edge(id=18, type='INTERACTS', start=0, end=0, properties={'string_score': 0.91})}
      - rule=ppi_reach, clause=1, bindings={'strength': 0.657111, 'i': Edge(id=18, type='INTERACTS', start=0, end=0, properties={'string_score': 0.91}), 'p': Node(id=9, labels=["Protein"], properties={'overflow_json': None, 'gene_symbol': 'JAK3', 'protein_id': 'PROT_006', 'family': 'kinase', 'name': 'Janus kinase 3'}), 'p2': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'})}
    - rule=drug_pathway, clause=0, bindings={'p': Node(id=9, labels=["Protein"], properties={'name': 'Janus kinase 3', 'protein_id': 'PROT_006', 'family': 'kinase', 'gene_symbol': 'JAK3'}), 'strength': 0.8008000000000001, 'd': Node(id=3, labels=["Drug"], properties={'name': 'Baricitinib', 'drug_id': 'DRUG_004', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'approval_status': 'approved', 'overflow_json': None, 'drug_class': 'JAK_inhibitor'}), 'b': Edge(id=10, type='BINDS', start=0, end=0, properties={'affinity_nm': 560.0, 'confidence': 0.52}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'pathway_score': 0.6585552}
      - rule=ppi_reach, clause=1, bindings={'i': Edge(id=18, type='INTERACTS', start=0, end=0, properties={'string_score': 0.91}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'p': Node(id=9, labels=["Protein"], properties={'gene_symbol': 'JAK3', 'protein_id': 'PROT_006', 'family': 'kinase', 'name': 'Janus kinase 3', 'overflow_json': None}), 'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'protein_id': 'PROT_022'}), 'strength': 0.8008000000000001}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'i': Edge(id=18, type='INTERACTS', start=0, end=0, properties={'string_score': 0.91}), 'p2': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'protein_id': 'PROT_022'}), 'p': Node(id=9, labels=["Protein"], properties={'family': 'kinase', 'gene_symbol': 'JAK3', 'name': 'Janus kinase 3', 'overflow_json': None, 'protein_id': 'PROT_006'}), 'strength': 0.657111, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
    - rule=drug_pathway, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'confidence': 0.96, 'affinity_nm': 5.9}), 'pathway_score': 0.811008, 'strength': 0.8448, 'p': Node(id=7, labels=["Protein"], properties={'gene_symbol': 'JAK1', 'protein_id': 'PROT_004', 'family': 'kinase', 'name': 'Janus kinase 1'}), 'd': Node(id=3, labels=["Drug"], properties={'approval_status': 'approved', 'drug_id': 'DRUG_004', 'overflow_json': None, 'name': 'Baricitinib', 'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18]})}
      - rule=ppi_reach, clause=1, bindings={'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'family': 'transcription_factor', 'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3'}), 'p': Node(id=7, labels=["Protein"], properties={'overflow_json': None, 'family': 'kinase', 'protein_id': 'PROT_004', 'name': 'Janus kinase 1', 'gene_symbol': 'JAK1'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.8448}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'strength': 0.6932159999999999, 'p': Node(id=7, labels=["Protein"], properties={'family': 'kinase', 'protein_id': 'PROT_004', 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1', 'overflow_json': None}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3'})}
    - rule=drug_pathway, clause=0, bindings={'pathway_score': 0.66548736, 'p': Node(id=8, labels=["Protein"], properties={'family': 'kinase', 'gene_symbol': 'JAK2', 'name': 'Janus kinase 2', 'protein_id': 'PROT_005'}), 'strength': 0.836, 'd': Node(id=3, labels=["Drug"], properties={'name': 'Baricitinib', 'drug_id': 'DRUG_004', 'approval_status': 'approved', 'drug_class': 'JAK_inhibitor', 'overflow_json': None, 'fingerprint': [-0.33, 0.49, 0.71, -0.18]}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'b': Edge(id=9, type='BINDS', start=0, end=0, properties={'affinity_nm': 5.7, 'confidence': 0.96})}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'gene_symbol': 'STAT3'}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'strength': 0.836, 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p': Node(id=8, labels=["Protein"], properties={'overflow_json': None, 'gene_symbol': 'JAK2', 'family': 'kinase', 'name': 'Janus kinase 2', 'protein_id': 'PROT_005'})}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95}), 'strength': 0.685995, 'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3'}), 'p': Node(id=8, labels=["Protein"], properties={'name': 'Janus kinase 2', 'gene_symbol': 'JAK2', 'family': 'kinase', 'protein_id': 'PROT_005', 'overflow_json': None})}
    - rule=drug_pathway, clause=0, bindings={'pathway_score': 0.41641600000000006, 'p': Node(id=7, labels=["Protein"], properties={'family': 'kinase', 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1', 'protein_id': 'PROT_004'}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'}), 'd': Node(id=3, labels=["Drug"], properties={'overflow_json': None, 'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'drug_id': 'DRUG_004', 'name': 'Baricitinib', 'approval_status': 'approved'}), 'strength': 0.8448, 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'affinity_nm': 5.9, 'confidence': 0.96})}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'gene_symbol': 'STAT3', 'protein_id': 'PROT_022'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.8448, 'p': Node(id=7, labels=["Protein"], properties={'protein_id': 'PROT_004', 'gene_symbol': 'JAK1', 'overflow_json': None, 'family': 'kinase', 'name': 'Janus kinase 1'}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'})}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'p': Node(id=7, labels=["Protein"], properties={'protein_id': 'PROT_004', 'overflow_json': None, 'family': 'kinase', 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.6932159999999999, 'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'family': 'transcription_factor', 'gene_symbol': 'STAT3'})}
    ... 6 more child derivations
  - rule=repurposing_signal, clause=0, bindings={'evidence': None, 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'd': Node(id=3, labels=["Drug"], properties={'approval_status': 'approved', 'drug_class': 'JAK_inhibitor', 'drug_id': 'DRUG_004', 'name': 'Baricitinib', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'overflow_json': None}), 'pathway_score': 0.8025599999999999}
    - rule=drug_pathway, clause=0, bindings={'p': Node(id=8, labels=["Protein"], properties={'name': 'Janus kinase 2', 'protein_id': 'PROT_005', 'gene_symbol': 'JAK2', 'family': 'kinase'}), 'pathway_score': 0.8025599999999999, 'b': Edge(id=9, type='BINDS', start=0, end=0, properties={'affinity_nm': 5.7, 'confidence': 0.96}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'strength': 0.836, 'd': Node(id=3, labels=["Drug"], properties={'drug_id': 'DRUG_004', 'drug_class': 'JAK_inhibitor', 'overflow_json': None, 'name': 'Baricitinib', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'approval_status': 'approved'})}
      - rule=ppi_reach, clause=1, bindings={'p': Node(id=8, labels=["Protein"], properties={'gene_symbol': 'JAK2', 'protein_id': 'PROT_005', 'name': 'Janus kinase 2', 'family': 'kinase', 'overflow_json': None}), 'strength': 0.836, 'p2': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'family': 'transcription_factor', 'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3'}), 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'})}
      - rule=ppi_reach, clause=1, bindings={'p': Node(id=8, labels=["Protein"], properties={'overflow_json': None, 'family': 'kinase', 'gene_symbol': 'JAK2', 'name': 'Janus kinase 2', 'protein_id': 'PROT_005'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'p2': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'protein_id': 'PROT_022'}), 'strength': 0.685995, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95})}
    - rule=drug_pathway, clause=0, bindings={'p': Node(id=9, labels=["Protein"], properties={'family': 'kinase', 'protein_id': 'PROT_006', 'gene_symbol': 'JAK3', 'name': 'Janus kinase 3'}), 'pathway_score': 0.6585552, 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'}), 'strength': 0.8008000000000001, 'b': Edge(id=10, type='BINDS', start=0, end=0, properties={'confidence': 0.52, 'affinity_nm': 560.0}), 'd': Node(id=3, labels=["Drug"], properties={'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'name': 'Baricitinib', 'approval_status': 'approved', 'drug_id': 'DRUG_004', 'overflow_json': None})}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'family': 'transcription_factor'}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'p': Node(id=9, labels=["Protein"], properties={'overflow_json': None, 'name': 'Janus kinase 3', 'gene_symbol': 'JAK3', 'protein_id': 'PROT_006', 'family': 'kinase'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'i': Edge(id=18, type='INTERACTS', start=0, end=0, properties={'string_score': 0.91}), 'strength': 0.8008000000000001}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'p': Node(id=9, labels=["Protein"], properties={'family': 'kinase', 'gene_symbol': 'JAK3', 'name': 'Janus kinase 3', 'overflow_json': None, 'protein_id': 'PROT_006'}), 'strength': 0.657111, 'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'i': Edge(id=18, type='INTERACTS', start=0, end=0, properties={'string_score': 0.91})}
    - rule=drug_pathway, clause=0, bindings={'strength': 0.8448, 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'affinity_nm': 5.9, 'confidence': 0.96}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'p': Node(id=7, labels=["Protein"], properties={'name': 'Janus kinase 1', 'gene_symbol': 'JAK1', 'family': 'kinase', 'protein_id': 'PROT_004'}), 'pathway_score': 0.811008, 'd': Node(id=3, labels=["Drug"], properties={'name': 'Baricitinib', 'drug_id': 'DRUG_004', 'overflow_json': None, 'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'approval_status': 'approved'})}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'family': 'transcription_factor', 'protein_id': 'PROT_022'}), 'strength': 0.8448, 'p': Node(id=7, labels=["Protein"], properties={'name': 'Janus kinase 1', 'overflow_json': None, 'family': 'kinase', 'protein_id': 'PROT_004', 'gene_symbol': 'JAK1'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
      - rule=ppi_reach, clause=1, bindings={'strength': 0.6932159999999999, 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'p2': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'family': 'transcription_factor'}), 'p': Node(id=7, labels=["Protein"], properties={'protein_id': 'PROT_004', 'overflow_json': None, 'family': 'kinase', 'name': 'Janus kinase 1', 'gene_symbol': 'JAK1'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
    - rule=drug_pathway, clause=0, bindings={'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'confidence': 0.96, 'affinity_nm': 5.9}), 'p': Node(id=7, labels=["Protein"], properties={'name': 'Janus kinase 1', 'family': 'kinase', 'protein_id': 'PROT_004', 'gene_symbol': 'JAK1'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'strength': 0.8448, 'd': Node(id=3, labels=["Drug"], properties={'drug_id': 'DRUG_004', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'name': 'Baricitinib', 'drug_class': 'JAK_inhibitor', 'overflow_json': None, 'approval_status': 'approved'}), 'pathway_score': 0.66548736}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.8448, 'p': Node(id=7, labels=["Protein"], properties={'family': 'kinase', 'protein_id': 'PROT_004', 'gene_symbol': 'JAK1', 'name': 'Janus kinase 1', 'overflow_json': None}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96})}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.6932159999999999, 'p': Node(id=7, labels=["Protein"], properties={'overflow_json': None, 'gene_symbol': 'JAK1', 'family': 'kinase', 'protein_id': 'PROT_004', 'name': 'Janus kinase 1'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96})}
    - rule=drug_pathway, clause=0, bindings={'p': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'protein_id': 'PROT_022'}), 'b': Edge(id=15, type='BINDS', start=0, end=0, properties={'confidence': 0.66, 'affinity_nm': 180.0}), 'pathway_score': 0.41641600000000006, 'd': Node(id=3, labels=["Drug"], properties={'overflow_json': None, 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'approval_status': 'approved', 'drug_id': 'DRUG_004', 'drug_class': 'JAK_inhibitor', 'name': 'Baricitinib'}), 'strength': 0.88, 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'})}
      - rule=ppi_reach, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'}), 'strength': 0.88, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'protein_id': 'PROT_022', 'overflow_json': None})}
      - rule=ppi_reach, clause=0, bindings={'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'gene_symbol': 'STAT3', 'overflow_json': None, 'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3'}), 'strength': 0.7221, 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'})}
      - rule=ppi_reach, clause=0, bindings={'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'p': Node(id=25, labels=["Protein"], properties={'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'overflow_json': None, 'gene_symbol': 'STAT3', 'protein_id': 'PROT_022'}), 'strength': 0.6573599999999999}
    ... 6 more child derivations
  - rule=repurposing_signal, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'pathway_score': 0.8025599999999999, 'evidence': None, 'd': Node(id=3, labels=["Drug"], properties={'name': 'Baricitinib', 'drug_id': 'DRUG_004', 'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'approval_status': 'approved', 'overflow_json': None})}
    - rule=drug_pathway, clause=0, bindings={'p': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'protein_id': 'PROT_022'}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'}), 'strength': 0.88, 'd': Node(id=3, labels=["Drug"], properties={'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'approval_status': 'approved', 'overflow_json': None, 'drug_id': 'DRUG_004', 'drug_class': 'JAK_inhibitor', 'name': 'Baricitinib'}), 'b': Edge(id=15, type='BINDS', start=0, end=0, properties={'confidence': 0.66, 'affinity_nm': 180.0}), 'pathway_score': 0.8025599999999999}
      - rule=ppi_reach, clause=0, bindings={'p': Node(id=25, labels=["Protein"], properties={'overflow_json': None, 'protein_id': 'PROT_022', 'family': 'transcription_factor', 'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3'}), 'strength': 0.88, 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
      - rule=ppi_reach, clause=0, bindings={'strength': 0.7221, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'p': Node(id=25, labels=["Protein"], properties={'overflow_json': None, 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor'})}
      - rule=ppi_reach, clause=0, bindings={'strength': 0.6573599999999999, 'p': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'family': 'transcription_factor', 'overflow_json': None}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'})}
    - rule=drug_pathway, clause=0, bindings={'pathway_score': 0.6585552, 'd': Node(id=3, labels=["Drug"], properties={'name': 'Baricitinib', 'approval_status': 'approved', 'overflow_json': None, 'drug_id': 'DRUG_004', 'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18]}), 'b': Edge(id=15, type='BINDS', start=0, end=0, properties={'affinity_nm': 180.0, 'confidence': 0.66}), 'p': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3'}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'strength': 0.88}
      - rule=ppi_reach, clause=0, bindings={'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.88, 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'p': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'protein_id': 'PROT_022', 'family': 'transcription_factor', 'overflow_json': None, 'name': 'Signal transducer and activator of transcription 3'})}
      - rule=ppi_reach, clause=0, bindings={'p': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3', 'overflow_json': None, 'gene_symbol': 'STAT3', 'family': 'transcription_factor'}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'strength': 0.7221, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
      - rule=ppi_reach, clause=0, bindings={'p': Node(id=25, labels=["Protein"], properties={'overflow_json': None, 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor', 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.6573599999999999, 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'name': 'COVID-19', 'disease_id': 'DIS_004'})}
    - rule=drug_pathway, clause=0, bindings={'pathway_score': 0.811008, 'p': Node(id=7, labels=["Protein"], properties={'protein_id': 'PROT_004', 'family': 'kinase', 'name': 'Janus kinase 1', 'gene_symbol': 'JAK1'}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'd': Node(id=3, labels=["Drug"], properties={'approval_status': 'approved', 'drug_id': 'DRUG_004', 'drug_class': 'JAK_inhibitor', 'overflow_json': None, 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'name': 'Baricitinib'}), 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'affinity_nm': 5.9, 'confidence': 0.96}), 'strength': 0.8448}
      - rule=ppi_reach, clause=1, bindings={'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3'}), 'dis': Node(id=48, labels=["Disease"], properties={'therapeutic_area': 'infectious', 'disease_id': 'DIS_004', 'name': 'COVID-19'}), 'p': Node(id=7, labels=["Protein"], properties={'name': 'Janus kinase 1', 'family': 'kinase', 'overflow_json': None, 'protein_id': 'PROT_004', 'gene_symbol': 'JAK1'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.8448, 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96})}
      - rule=ppi_reach, clause=1, bindings={'p': Node(id=7, labels=["Protein"], properties={'protein_id': 'PROT_004', 'name': 'Janus kinase 1', 'family': 'kinase', 'overflow_json': None, 'gene_symbol': 'JAK1'}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'strength': 0.6932159999999999, 'p2': Node(id=25, labels=["Protein"], properties={'protein_id': 'PROT_022', 'gene_symbol': 'STAT3', 'name': 'Signal transducer and activator of transcription 3', 'family': 'transcription_factor'}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96})}
    - rule=drug_pathway, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'}), 'pathway_score': 0.66548736, 'strength': 0.836, 'p': Node(id=8, labels=["Protein"], properties={'name': 'Janus kinase 2', 'gene_symbol': 'JAK2', 'protein_id': 'PROT_005', 'family': 'kinase'}), 'd': Node(id=3, labels=["Drug"], properties={'name': 'Baricitinib', 'overflow_json': None, 'drug_class': 'JAK_inhibitor', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'drug_id': 'DRUG_004', 'approval_status': 'approved'}), 'b': Edge(id=9, type='BINDS', start=0, end=0, properties={'confidence': 0.96, 'affinity_nm': 5.7})}
      - rule=ppi_reach, clause=1, bindings={'p': Node(id=8, labels=["Protein"], properties={'gene_symbol': 'JAK2', 'overflow_json': None, 'name': 'Janus kinase 2', 'protein_id': 'PROT_005', 'family': 'kinase'}), 'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'therapeutic_area': 'infectious', 'disease_id': 'DIS_004'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p2': Node(id=25, labels=["Protein"], properties={'gene_symbol': 'STAT3', 'protein_id': 'PROT_022', 'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3'}), 'strength': 0.836, 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95})}
      - rule=ppi_reach, clause=1, bindings={'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'i': Edge(id=17, type='INTERACTS', start=0, end=0, properties={'string_score': 0.95}), 'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'protein_id': 'PROT_022', 'gene_symbol': 'STAT3'}), 'strength': 0.685995, 'p': Node(id=8, labels=["Protein"], properties={'protein_id': 'PROT_005', 'family': 'kinase', 'gene_symbol': 'JAK2', 'name': 'Janus kinase 2', 'overflow_json': None}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88})}
    - rule=drug_pathway, clause=0, bindings={'dis': Node(id=48, labels=["Disease"], properties={'name': 'COVID-19', 'disease_id': 'DIS_004', 'therapeutic_area': 'infectious'}), 'b': Edge(id=8, type='BINDS', start=0, end=0, properties={'affinity_nm': 5.9, 'confidence': 0.96}), 'pathway_score': 0.41641600000000006, 'p': Node(id=7, labels=["Protein"], properties={'gene_symbol': 'JAK1', 'protein_id': 'PROT_004', 'name': 'Janus kinase 1', 'family': 'kinase'}), 'd': Node(id=3, labels=["Drug"], properties={'approval_status': 'approved', 'fingerprint': [-0.33, 0.49, 0.71, -0.18], 'drug_id': 'DRUG_004', 'overflow_json': None, 'name': 'Baricitinib', 'drug_class': 'JAK_inhibitor'}), 'strength': 0.8448}
      - rule=ppi_reach, clause=1, bindings={'p': Node(id=7, labels=["Protein"], properties={'gene_symbol': 'JAK1', 'name': 'Janus kinase 1', 'protein_id': 'PROT_004', 'overflow_json': None, 'family': 'kinase'}), 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'gene_symbol': 'STAT3', 'protein_id': 'PROT_022', 'name': 'Signal transducer and activator of transcription 3'}), 'strength': 0.8448, 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'therapeutic_area': 'infectious', 'name': 'COVID-19'})}
      - rule=ppi_reach, clause=1, bindings={'i': Edge(id=16, type='INTERACTS', start=0, end=0, properties={'string_score': 0.96}), 'strength': 0.6932159999999999, 'a': Edge(id=90, type='ASSOCIATED_WITH', start=0, end=0, properties={'gda_score': 0.88}), 'p2': Node(id=25, labels=["Protein"], properties={'family': 'transcription_factor', 'name': 'Signal transducer and activator of transcription 3', 'gene_symbol': 'STAT3', 'protein_id': 'PROT_022'}), 'dis': Node(id=48, labels=["Disease"], properties={'disease_id': 'DIS_004', 'name': 'COVID-19', 'therapeutic_area': 'infectious'}), 'p': Node(id=7, labels=["Protein"], properties={'overflow_json': None, 'protein_id': 'PROT_004', 'name': 'Janus kinase 1', 'gene_symbol': 'JAK1', 'family': 'kinase'})}
    ... 6 more child derivations
  ... 6 more child derivations

7) ASSUME — Counterfactual Binding Simulation

"What if Metformin also binds EGFR at high confidence?"

This temporarily adds a hypothetical BINDS edge and re-evaluates the repurposing signal. After evaluation, the hypothetical edge is rolled back — no persistent graph mutation.

assume_program = r'''
CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, a.gda_score AS strength

CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[i:INTERACTS]->(p2:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, i.string_score * a.gda_score AS strength

CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[i1:INTERACTS]->(p2:Protein)-[i2:INTERACTS]->(p3:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, i1.string_score * i2.string_score * a.gda_score AS strength

CREATE RULE drug_pathway AS
  MATCH (d:Drug)-[b:BINDS]->(p:Protein)
  WHERE p IS ppi_reach TO dis
  YIELD KEY d, KEY dis, b.confidence * strength AS pathway_score

CREATE RULE repurposing_signal AS
  MATCH (d:Drug)
  WHERE d IS drug_pathway TO dis
  FOLD evidence = MNOR(pathway_score)
  YIELD KEY d, KEY dis, evidence

ASSUME {
  MATCH (d:Drug {name: 'Metformin'}), (p:Protein {gene_symbol: 'EGFR'})
  CREATE (d)-[:BINDS {affinity_nm: 50.0, confidence: 0.85}]->(p)
} THEN {
  QUERY repurposing_signal WHERE d.name = 'Metformin' RETURN dis.name AS disease, evidence ORDER BY evidence DESC
}
'''

assume_out = session.locy_with(assume_program).with_config({'max_iterations': 200, 'timeout_secs': 60.0}).run()
assume_cmd = next(cmd for cmd in assume_out.command_results if cmd.command_type == 'assume')
assume_rows = assume_cmd.rows
print('Metformin repurposing signals with hypothetical EGFR binding:')
pprint(_norm_rows(assume_rows)[:10])

rollback_check = session.query("MATCH (:Drug {name: 'Metformin'})-[b:BINDS]->(:Protein {gene_symbol: 'EGFR'}) RETURN count(b) AS c")
print('Rollback check (should be 0):', rollback_check[0]['c'])
Metformin repurposing signals with hypothetical EGFR binding:
[{'disease': 'COVID-19', 'evidence': 0.9999774304385927},
 {'disease': 'Rheumatoid arthritis', 'evidence': 0.9999646121076352},
 {'disease': 'Type 2 diabetes', 'evidence': 0.9996058960762946},
 {'disease': 'Ulcerative colitis', 'evidence': 0.9988304092964354},
 {'disease': 'Crohn disease', 'evidence': 0.9985616543607686},
 {'disease': 'Psoriasis', 'evidence': 0.998248395586102},
 {'disease': 'Rheumatoid arthritis', 'evidence': 0.9973354714782048},
 {'disease': 'Ulcerative colitis', 'evidence': 0.9949905941732247},
 {'disease': 'Lung cancer', 'evidence': 0.9873452731670781},
 {'disease': 'Multiple myeloma', 'evidence': 0.980929646496}]
Rollback check (should be 0): 0

"What minimal binding evidence would make Metformin a candidate for Alzheimer disease?"

ABDUCE searches for the smallest set of graph modifications (new bindings, altered scores) that would cause the target drug-disease pair to appear in the repurposing signal.

program_abduce = r'''
CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, a.gda_score AS strength

CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[i:INTERACTS]->(p2:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, i.string_score * a.gda_score AS strength

CREATE RULE ppi_reach AS
  MATCH (p:Protein)-[i1:INTERACTS]->(p2:Protein)-[i2:INTERACTS]->(p3:Protein)-[a:ASSOCIATED_WITH]->(dis:Disease)
  YIELD KEY p, KEY dis, i1.string_score * i2.string_score * a.gda_score AS strength

CREATE RULE drug_pathway AS
  MATCH (d:Drug)-[b:BINDS]->(p:Protein)
  WHERE p IS ppi_reach TO dis
  YIELD KEY d, KEY dis, b.confidence * strength AS pathway_score

CREATE RULE repurposing_signal AS
  MATCH (d:Drug)
  WHERE d IS drug_pathway TO dis
  FOLD evidence = MNOR(pathway_score)
  YIELD KEY d, KEY dis, evidence

ABDUCE repurposing_signal WHERE d.name = 'Metformin' AND dis.name = 'Alzheimer disease'
'''

abduce_out = session.locy_with(program_abduce).with_config({'max_abduce_candidates': 120, 'max_abduce_results': 12, 'timeout_secs': 180.0}).run()
abduce_cmd = next(cmd for cmd in abduce_out.command_results if cmd.command_type == 'abduce')
mods = abduce_cmd.modifications
print('Abduced modifications for Metformin -> Alzheimer disease:')
for i, item in enumerate(mods[:8], start=1):
    print(f'\nCandidate #{i}')
    pprint(item)
Abduced modifications for Metformin -> Alzheimer disease:

9) What To Expect

  • Novel candidates: Drug-Disease pairs with MNOR evidence scores in [0, 1], ordered by descending evidence. Known indications are excluded.
  • Baricitinib -> COVID-19: The EXPLAIN RULE derivation tree should show multiple pathway derivations through JAK1/JAK2 (cytokine storm pathway) and AAK1 (viral endocytosis pathway).
  • ASSUME (Metformin + EGFR): Adds a hypothetical EGFR binding for Metformin and shows updated repurposing signal scores. The binding is rolled back after evaluation.
  • ABDUCE (Metformin -> Alzheimer disease): Finds minimal graph modifications (e.g., new protein bindings or PPI edges) that would make Metformin a repurposing candidate for Alzheimer disease.
  • Structural analogues: Drug pairs with similar molecular fingerprints (via similar_to) that share target disease areas, filtered to analogy >= 0.5.

10) Build-Time Assertions

These checks keep notebook execution meaningful in CI/docs builds.

assert novel_rows, 'Expected non-empty novel candidate rows'
assert analogue_rows, 'Expected non-empty structural analogue rows'
assert all(0.0 <= float(r['evidence']) <= 1.0 for r in novel_rows), 'MNOR scores must be in [0,1]'
assert tree, 'Expected EXPLAIN RULE to produce a derivation tree'
assert tree.get('children') or tree.get('rule'), 'Expected derivation tree to have structure'
assert assume_rows, 'Expected ASSUME to produce result rows'
assert rollback_check[0]['c'] == 0, 'Expected ASSUME rollback (no persistent EGFR binding)'
if not mods:
    print('Note: ABDUCE returned no modifications (may need higher timeout or different target)')
else:
    print(f'ABDUCE found {len(mods)} modifications')
print('All notebook assertions passed.')
Note: ABDUCE returned no modifications (may need higher timeout or different target)
All notebook assertions passed.

11) Cleanup

Removes the temporary on-disk database created for this run.

shutil.rmtree(DB_DIR, ignore_errors=True)
print('Cleaned up', DB_DIR)
Cleaned up /tmp/uni_locy_drug_7gvzezix