Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,12 @@ from io import BytesIO
|
|
| 9 |
from PIL import Image
|
| 10 |
from datetime import datetime
|
| 11 |
from pathlib import Path
|
|
|
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
BG = "#0f172a"
|
| 14 |
CARD = "#1e293b"
|
| 15 |
ACC = "#f97316"
|
|
@@ -22,6 +27,7 @@ BORDER = "#334155"
|
|
| 22 |
|
| 23 |
LOG_PATH = Path("/tmp/lab_journal.csv")
|
| 24 |
|
|
|
|
| 25 |
def log_entry(tab, inputs, result, note=""):
|
| 26 |
try:
|
| 27 |
write_header = not LOG_PATH.exists()
|
|
@@ -45,7 +51,7 @@ def save_note(note, tab, last_result):
|
|
| 45 |
log_entry(tab, "", last_result, note)
|
| 46 |
return "✅ Saved!", load_journal()
|
| 47 |
|
| 48 |
-
#
|
| 49 |
MIRNA_DB = {
|
| 50 |
"BRCA2": [
|
| 51 |
{"miRNA":"hsa-miR-148a-3p","log2FC":-0.70,"padj":0.013,"targets":"DNMT1, AKT2","pathway":"Epigenetic reprogramming"},
|
|
@@ -69,6 +75,7 @@ MIRNA_DB = {
|
|
| 69 |
{"miRNA":"hsa-miR-215-5p","log2FC":-0.51,"padj":0.038,"targets":"DTL, DHFR","pathway":"DNA damage response"},
|
| 70 |
],
|
| 71 |
}
|
|
|
|
| 72 |
SIRNA_DB = {
|
| 73 |
"LUAD": [
|
| 74 |
{"Gene":"SPC24","dCERES":-0.175,"log2FC":1.13,"Drug_status":"Novel","siRNA":"GCAGCUGAAGAAACUGAAU"},
|
|
@@ -92,6 +99,7 @@ SIRNA_DB = {
|
|
| 92 |
{"Gene":"PKMYT1","dCERES":-0.122,"log2FC":1.07,"Drug_status":"Clinical","siRNA":"GACGCUCAAGAUGCAGAUU"},
|
| 93 |
],
|
| 94 |
}
|
|
|
|
| 95 |
CERNA = [
|
| 96 |
{"lncRNA":"CYTOR","miRNA":"hsa-miR-138-5p","target":"AKT1","pathway":"TREM2 core signaling"},
|
| 97 |
{"lncRNA":"CYTOR","miRNA":"hsa-miR-138-5p","target":"NFKB1","pathway":"Neuroinflammation"},
|
|
@@ -99,6 +107,7 @@ CERNA = [
|
|
| 99 |
{"lncRNA":"GAS5","miRNA":"hsa-miR-222-3p","target":"IL1B","pathway":"Neuroinflammation"},
|
| 100 |
{"lncRNA":"HOTAIRM1","miRNA":"hsa-miR-9-5p","target":"TREM2","pathway":"Direct TREM2 regulation"},
|
| 101 |
]
|
|
|
|
| 102 |
ASO = [
|
| 103 |
{"lncRNA":"GAS5","position":119,"accessibility":0.653,"GC_pct":50,"Tm":47.2,"priority":"HIGH"},
|
| 104 |
{"lncRNA":"CYTOR","position":507,"accessibility":0.653,"GC_pct":50,"Tm":46.8,"priority":"HIGH"},
|
|
@@ -106,6 +115,7 @@ ASO = [
|
|
| 106 |
{"lncRNA":"LINC00847","position":89,"accessibility":0.598,"GC_pct":56,"Tm":48.3,"priority":"MEDIUM"},
|
| 107 |
{"lncRNA":"ZFAS1","position":312,"accessibility":0.571,"GC_pct":48,"Tm":45.5,"priority":"MEDIUM"},
|
| 108 |
]
|
|
|
|
| 109 |
FGFR3 = {
|
| 110 |
"P1 (hairpin loop)": [
|
| 111 |
{"Compound":"CHEMBL1575701","RNA_score":0.809,"Toxicity":0.01,"Final_score":0.793},
|
|
@@ -122,6 +132,7 @@ FGFR3 = {
|
|
| 122 |
{"Compound":"Berberine","RNA_score":0.735,"Toxicity":3.2,"Final_score":0.708},
|
| 123 |
],
|
| 124 |
}
|
|
|
|
| 125 |
VARIANT_DB = {
|
| 126 |
"BRCA1:p.R1699Q": {"score":0.03,"cls":"Benign","conf":"High"},
|
| 127 |
"BRCA1:p.R1699W": {"score":0.97,"cls":"Pathogenic","conf":"High"},
|
|
@@ -131,22 +142,71 @@ VARIANT_DB = {
|
|
| 131 |
"EGFR:p.L858R": {"score":0.96,"cls":"Pathogenic","conf":"High"},
|
| 132 |
"ALK:p.F1174L": {"score":0.94,"cls":"Pathogenic","conf":"High"},
|
| 133 |
}
|
|
|
|
| 134 |
PLAIN = {
|
| 135 |
"Pathogenic": "This variant is likely to cause disease. Clinical follow-up is strongly recommended.",
|
| 136 |
"Likely Pathogenic": "This variant is probably harmful. Discuss with your doctor.",
|
| 137 |
"Benign": "This variant is likely harmless. Common in the general population.",
|
| 138 |
"Likely Benign": "This variant is probably harmless. No strong reason for concern.",
|
| 139 |
}
|
|
|
|
| 140 |
BM_W = {
|
| 141 |
"CTHRC1":0.18,"FHL2":0.15,"LDHA":0.14,"P4HA1":0.13,
|
| 142 |
"SERPINH1":0.12,"ABCA8":-0.11,"CA4":-0.10,"CKB":-0.09,
|
| 143 |
"NNMT":0.08,"CACNA2D2":-0.07
|
| 144 |
}
|
|
|
|
| 145 |
PROTEINS = ["albumin","apolipoprotein","fibrinogen","vitronectin",
|
| 146 |
"clusterin","igm","iga","igg","complement","transferrin",
|
| 147 |
"alpha-2-macroglobulin"]
|
| 148 |
|
| 149 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
def predict_mirna(gene):
|
| 151 |
df = pd.DataFrame(MIRNA_DB.get(gene, []))
|
| 152 |
log_entry("S1-B | S1-R2 | miRNA", gene, f"{len(df)} miRNAs")
|
|
@@ -300,55 +360,7 @@ def extract_corona(text):
|
|
| 300 |
log_entry("S1-D | S1-R10 | NLP", text[:80], f"proteins={len(out['corona_proteins'])}")
|
| 301 |
return json.dumps(out, indent=2), summary
|
| 302 |
|
| 303 |
-
|
| 304 |
-
# ── S1-F · PHYLO-RARE DATABASES ───────────────────────────────────────────────
|
| 305 |
-
|
| 306 |
-
# S1-R12b · DIPG — H3K27M + CSF LNP + Circadian
|
| 307 |
-
DIPG_VARIANTS = [
|
| 308 |
-
{"Variant":"H3K27M (H3F3A)","Freq_pct":78,"Pathway":"PRC2 inhibition → global H3K27me3 loss","Drug_status":"ONC201 (clinical)","Circadian_gene":"BMAL1 suppressed"},
|
| 309 |
-
{"Variant":"ACVR1 p.R206H","Freq_pct":21,"Pathway":"BMP/SMAD hyperactivation","Drug_status":"LDN-193189 (preclinical)","Circadian_gene":"PER1 disrupted"},
|
| 310 |
-
{"Variant":"PIK3CA p.H1047R","Freq_pct":15,"Pathway":"PI3K/AKT/mTOR","Drug_status":"Copanlisib (clinical)","Circadian_gene":"CRY1 altered"},
|
| 311 |
-
{"Variant":"TP53 p.R248W","Freq_pct":14,"Pathway":"DNA damage response loss","Drug_status":"APR-246 (clinical)","Circadian_gene":"p53-CLOCK axis"},
|
| 312 |
-
{"Variant":"PDGFRA amp","Freq_pct":13,"Pathway":"RTK/RAS signalling","Drug_status":"Avapritinib (clinical)","Circadian_gene":"REV-ERB altered"},
|
| 313 |
-
]
|
| 314 |
-
DIPG_CSF_LNP = [
|
| 315 |
-
{"Formulation":"MC3-DSPC-Chol-PEG","Size_nm":92,"Zeta_mV":-4.1,"CSF_protein":"Beta2-microglobulin","ApoE_pct":12.4,"BBB_est":0.41,"Priority":"HIGH"},
|
| 316 |
-
{"Formulation":"DLin-KC2-DSPE-PEG","Size_nm":87,"Zeta_mV":-3.8,"CSF_protein":"Cystatin C","ApoE_pct":14.1,"BBB_est":0.47,"Priority":"HIGH"},
|
| 317 |
-
{"Formulation":"C12-200-DOPE-PEG","Size_nm":103,"Zeta_mV":-5.2,"CSF_protein":"Albumin (low)","ApoE_pct":9.8,"BBB_est":0.33,"Priority":"MEDIUM"},
|
| 318 |
-
{"Formulation":"DODAP-DSPC-Chol","Size_nm":118,"Zeta_mV":-2.1,"CSF_protein":"Transferrin","ApoE_pct":7.2,"BBB_est":0.24,"Priority":"LOW"},
|
| 319 |
-
]
|
| 320 |
-
|
| 321 |
-
# S1-R12c · UVM — GNAQ/GNA11 + Vitreous corona + m6A
|
| 322 |
-
UVM_VARIANTS = [
|
| 323 |
-
{"Variant":"GNAQ p.Q209L","Freq_pct":46,"Pathway":"PLCβ → PKC → MAPK","Drug_status":"Darovasertib (clinical)","m6A_writer":"METTL3 upregulated"},
|
| 324 |
-
{"Variant":"GNA11 p.Q209L","Freq_pct":32,"Pathway":"PLCβ → PKC → MAPK","Drug_status":"Darovasertib (clinical)","m6A_writer":"WTAP upregulated"},
|
| 325 |
-
{"Variant":"BAP1 loss","Freq_pct":47,"Pathway":"Chromatin remodeling → metastasis","Drug_status":"No approved (HDAC trials)","m6A_writer":"FTO overexpressed"},
|
| 326 |
-
{"Variant":"SF3B1 p.R625H","Freq_pct":19,"Pathway":"Splicing alteration → neoepitopes","Drug_status":"H3B-8800 (clinical)","m6A_writer":"METTL14 altered"},
|
| 327 |
-
{"Variant":"EIF1AX p.A113_splice","Freq_pct":14,"Pathway":"Translation initiation","Drug_status":"Novel — no drug","m6A_writer":"YTHDF2 suppressed"},
|
| 328 |
-
]
|
| 329 |
-
UVM_VITREOUS_LNP = [
|
| 330 |
-
{"Formulation":"SM-102-DSPC-Chol-PEG","Vitreal_protein":"Hyaluronan-binding","Size_nm":95,"Zeta_mV":-3.2,"Retention_h":18,"Priority":"HIGH"},
|
| 331 |
-
{"Formulation":"Lipid-H-DOPE-PEG","Vitreal_protein":"Vitronectin dominant","Size_nm":88,"Zeta_mV":-4.0,"Retention_h":22,"Priority":"HIGH"},
|
| 332 |
-
{"Formulation":"DOTAP-DSPC-PEG","Vitreal_protein":"Albumin wash-out","Size_nm":112,"Zeta_mV":+2.1,"Retention_h":6,"Priority":"LOW"},
|
| 333 |
-
{"Formulation":"MC3-DPPC-Chol","Vitreal_protein":"Clusterin-rich","Size_nm":101,"Zeta_mV":-2.8,"Retention_h":14,"Priority":"MEDIUM"},
|
| 334 |
-
]
|
| 335 |
-
|
| 336 |
-
# S1-R12d · pAML — FLT3-ITD + BM niche corona + Ferroptosis
|
| 337 |
-
PAML_VARIANTS = [
|
| 338 |
-
{"Variant":"FLT3-ITD","Freq_pct":25,"Pathway":"RTK constitutive activation → JAK/STAT","Drug_status":"Midostaurin (approved)","Ferroptosis":"GPX4 suppressed"},
|
| 339 |
-
{"Variant":"NPM1 c.860_863dupTCAG","Freq_pct":30,"Pathway":"Nuclear export deregulation","Drug_status":"APR-548 combo (clinical)","Ferroptosis":"SLC7A11 upregulated"},
|
| 340 |
-
{"Variant":"DNMT3A p.R882H","Freq_pct":18,"Pathway":"Epigenetic dysregulation","Drug_status":"Azacitidine (approved)","Ferroptosis":"ACSL4 altered"},
|
| 341 |
-
{"Variant":"CEBPA biallelic","Freq_pct":8,"Pathway":"Myeloid differentiation block","Drug_status":"Novel target","Ferroptosis":"NRF2 pathway"},
|
| 342 |
-
{"Variant":"IDH1/2 mutation","Freq_pct":15,"Pathway":"2-HG oncometabolite → TET2 inhibition","Drug_status":"Enasidenib (approved)","Ferroptosis":"Iron metabolism disrupted"},
|
| 343 |
-
]
|
| 344 |
-
PAML_BM_LNP = [
|
| 345 |
-
{"Formulation":"ALC-0315-DSPC-Chol-PEG","BM_protein":"ApoE + Clusterin","Size_nm":98,"Zeta_mV":-3.5,"Marrow_uptake_pct":34,"Priority":"HIGH"},
|
| 346 |
-
{"Formulation":"MC3-DOPE-Chol-PEG","BM_protein":"Fibronectin dominant","Size_nm":105,"Zeta_mV":-4.2,"Marrow_uptake_pct":28,"Priority":"HIGH"},
|
| 347 |
-
{"Formulation":"DLin-MC3-DPPC","BM_protein":"Vitronectin-rich","Size_nm":91,"Zeta_mV":-2.9,"Marrow_uptake_pct":19,"Priority":"MEDIUM"},
|
| 348 |
-
{"Formulation":"Cationic-DOTAP-Chol","BM_protein":"Opsonin-heavy","Size_nm":132,"Zeta_mV":+8.1,"Marrow_uptake_pct":8,"Priority":"LOW"},
|
| 349 |
-
]
|
| 350 |
-
|
| 351 |
-
# ── S1-F · PHYLO-RARE LOGIC ───────────────────────────────────────────────────
|
| 352 |
def dipg_variants(sort_by):
|
| 353 |
df = pd.DataFrame(DIPG_VARIANTS).sort_values(
|
| 354 |
"Freq_pct" if sort_by == "Frequency" else "Drug_status", ascending=False)
|
|
@@ -430,31 +442,31 @@ def paml_ferroptosis(variant):
|
|
| 430 |
)
|
| 431 |
return summary, Image.open(buf)
|
| 432 |
|
| 433 |
-
#
|
| 434 |
def section_header(code, name, tagline, projects_html):
|
| 435 |
return (
|
| 436 |
-
f"<div style=
|
| 437 |
-
f"border-radius:8px;margin-bottom:12px;
|
| 438 |
-
f"<div style=
|
| 439 |
-
f"<span style=
|
| 440 |
-
f"<span style=
|
| 441 |
-
f"<span style=
|
| 442 |
-
f"<div style=
|
| 443 |
f"</div>"
|
| 444 |
)
|
| 445 |
|
| 446 |
def proj_badge(code, title, metric=""):
|
| 447 |
-
m = (f"<span style=
|
| 448 |
-
f"font-size:10px;margin-left:6px
|
| 449 |
return (
|
| 450 |
-
f"<div style=
|
| 451 |
-
f"padding:8px 12px;border-radius:0 6px 6px 0;margin-bottom:8px;
|
| 452 |
-
f"<span style=
|
| 453 |
-
f"<span style=
|
| 454 |
f"</div>"
|
| 455 |
)
|
| 456 |
|
| 457 |
-
#
|
| 458 |
css = f"""
|
| 459 |
body, .gradio-container {{ background: {BG} !important; color: {TXT} !important; }}
|
| 460 |
|
|
@@ -473,7 +485,7 @@ body, .gradio-container {{ background: {BG} !important; color: {TXT} !important;
|
|
| 473 |
background: {BG} !important;
|
| 474 |
}}
|
| 475 |
|
| 476 |
-
/* INNER sub-tab bar —
|
| 477 |
.inner-tabs .tab-nav button {{
|
| 478 |
color: {DIM} !important;
|
| 479 |
background: {BG} !important;
|
|
@@ -498,12 +510,25 @@ body, .gradio-container {{ background: {BG} !important; color: {TXT} !important;
|
|
| 498 |
padding: 14px !important;
|
| 499 |
}}
|
| 500 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 501 |
h1, h2, h3 {{ color: {ACC} !important; }}
|
| 502 |
.gr-button-primary {{ background: {ACC} !important; border: none !important; }}
|
| 503 |
footer {{ display: none !important; }}
|
| 504 |
"""
|
| 505 |
|
| 506 |
-
#
|
| 507 |
MAP_HTML = f"""
|
| 508 |
<div style="background:{CARD};padding:22px;border-radius:8px;font-family:monospace;
|
| 509 |
font-size:13px;line-height:2.0;color:{TXT}">
|
|
@@ -514,62 +539,60 @@ MAP_HTML = f"""
|
|
| 514 |
|
| 515 |
<span style="color:{ACC2};font-weight:600">S1-A · PHYLO-GENOMICS</span>
|
| 516 |
<span style="color:{DIM}"> — What breaks in DNA</span><br>
|
| 517 |
-
├─ <b>S1-
|
| 518 |
<span style="color:{GRN}"> AUC=0.939 ✅</span><br>
|
| 519 |
-
├─ <b>S1-R1b</b> Somatic classifier
|
| 520 |
<span style="color:#f59e0b"> 🔶 In progress</span><br>
|
| 521 |
-
└─ <b>S1-
|
| 522 |
<span style="color:{DIM}"> 🔴 Planned</span><br><br>
|
| 523 |
|
| 524 |
<span style="color:{ACC2};font-weight:600">S1-B · PHYLO-RNA</span>
|
| 525 |
<span style="color:{DIM}"> — How to silence it via RNA</span><br>
|
| 526 |
-
├─ <b>S1-
|
| 527 |
<span style="color:{GRN}"> ✅</span><br>
|
| 528 |
-
├─ <b>S1-
|
| 529 |
<span style="color:{GRN}"> ✅</span><br>
|
| 530 |
-
├─ <b>S1-
|
| 531 |
<span style="color:{GRN}"> ✅</span><br>
|
| 532 |
-
└─ <b>S1-
|
| 533 |
<span style="color:{GRN}"> ✅</span><br><br>
|
| 534 |
|
| 535 |
<span style="color:{ACC2};font-weight:600">S1-C · PHYLO-DRUG</span>
|
| 536 |
<span style="color:{DIM}"> — Which molecule treats it</span><br>
|
| 537 |
-
├─ <b>S1-
|
| 538 |
<span style="color:{GRN}"> ✅</span><br>
|
| 539 |
-
├─ <b>S1-
|
| 540 |
<span style="color:#f59e0b"> 🔶</span><br>
|
| 541 |
-
└─ <b>S1-
|
| 542 |
<span style="color:{DIM}"> 🔴 Frontier</span><br><br>
|
| 543 |
|
| 544 |
<span style="color:{ACC2};font-weight:600">S1-D · PHYLO-LNP</span>
|
| 545 |
<span style="color:{DIM}"> — How to deliver the drug</span><br>
|
| 546 |
-
├─ <b>S1-
|
| 547 |
<span style="color:{GRN}"> AUC=0.791 ✅</span><br>
|
| 548 |
-
├─ <b>S1-
|
| 549 |
<span style="color:{GRN}"> ✅</span><br>
|
| 550 |
-
├─ <b>S1-
|
| 551 |
<span style="color:{GRN}"> ✅</span><br>
|
| 552 |
-
├─ <b>S1-
|
| 553 |
<span style="color:{GRN}"> F1=0.71 ✅</span><br>
|
| 554 |
-
└─ <b>S1-
|
| 555 |
<span style="color:{DIM}"> 🔴 0 prior studies</span><br><br>
|
| 556 |
|
| 557 |
<span style="color:{ACC2};font-weight:600">S1-E · PHYLO-BIOMARKERS</span>
|
| 558 |
<span style="color:{DIM}"> — Detect without biopsy</span><br>
|
| 559 |
-
├─ <b>S1-
|
| 560 |
<span style="color:{GRN}"> AUC=0.992* ✅</span><br>
|
| 561 |
-
|
| 562 |
-
<span style="color:#f59e0b"> 🔶</span><br>
|
| 563 |
-
└─ <b>S1-R9c</b> ctDNA gap analysis
|
| 564 |
-
<span style="color:{DIM}"> 🔴</span><br><br>
|
| 565 |
|
| 566 |
<span style="color:{ACC2};font-weight:600">S1-F · PHYLO-RARE</span>
|
| 567 |
<span style="color:{DIM}"> — Where almost nobody has looked yet (<300 cases/yr)</span><br>
|
| 568 |
-
├─ <b>S1-
|
| 569 |
<span style="color:#f59e0b"> 🔶 In development</span><br>
|
| 570 |
-
├─ <b>S1-
|
| 571 |
<span style="color:#f59e0b"> 🔶 In development</span><br>
|
| 572 |
-
└─ <b>S1-
|
| 573 |
<span style="color:#f59e0b"> 🔶 In development</span><br><br>
|
| 574 |
|
| 575 |
<span style="color:{DIM};font-size:11px">
|
|
@@ -579,9 +602,8 @@ MAP_HTML = f"""
|
|
| 579 |
</div>
|
| 580 |
"""
|
| 581 |
|
| 582 |
-
#
|
| 583 |
with gr.Blocks(css=css, title="K R&D Lab · S1 Biomedical") as demo:
|
| 584 |
-
|
| 585 |
gr.Markdown(
|
| 586 |
"# 🔬 K R&D Lab · Science Sphere — S1 Biomedical\n"
|
| 587 |
"**Oksana Kolisnyk** · [KOSATIKS GROUP](https://kosatiks-group.pp.ua) | "
|
|
@@ -590,406 +612,410 @@ with gr.Blocks(css=css, title="K R&D Lab · S1 Biomedical") as demo:
|
|
| 590 |
"*Research only. Not clinical advice.*"
|
| 591 |
)
|
| 592 |
|
| 593 |
-
#
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
with gr.Tabs(elem_classes="outer-tabs"):
|
| 597 |
-
|
| 598 |
-
# ── 🗺️ MAP ─────────────────────────────────────────
|
| 599 |
with gr.TabItem("🗺️ Lab Map"):
|
| 600 |
gr.HTML(MAP_HTML)
|
| 601 |
|
| 602 |
-
#
|
| 603 |
with gr.TabItem("🧬 PHYLO-GENOMICS"):
|
| 604 |
gr.HTML(section_header(
|
| 605 |
"S1-A", "PHYLO-GENOMICS", "— What breaks in DNA",
|
| 606 |
-
"
|
| 607 |
))
|
| 608 |
-
with gr.Tabs(elem_classes="inner-tabs"):
|
| 609 |
-
|
| 610 |
-
with gr.TabItem("
|
| 611 |
-
gr.
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
|
|
|
|
|
|
| 632 |
with gr.TabItem("🔬 PHYLO-RNA"):
|
| 633 |
gr.HTML(section_header(
|
| 634 |
"S1-B", "PHYLO-RNA", "— How to silence it via RNA",
|
| 635 |
-
"
|
| 636 |
))
|
| 637 |
with gr.Tabs(elem_classes="inner-tabs"):
|
| 638 |
-
|
| 639 |
-
with gr.TabItem("
|
| 640 |
-
gr.
|
| 641 |
-
|
| 642 |
-
|
| 643 |
-
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
| 654 |
-
|
| 655 |
-
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 666 |
with gr.TabItem("💊 PHYLO-DRUG"):
|
| 667 |
gr.HTML(section_header(
|
| 668 |
"S1-C", "PHYLO-DRUG", "— Which molecule treats it",
|
| 669 |
-
"
|
| 670 |
))
|
| 671 |
with gr.Tabs(elem_classes="inner-tabs"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 672 |
|
| 673 |
-
|
| 674 |
-
gr.HTML(proj_badge("S1-C · PHYLO-DRUG · S1-R5",
|
| 675 |
-
"FGFR3 RNA-Directed Drug Discovery · ChEMBL screen",
|
| 676 |
-
"top score 0.793"))
|
| 677 |
-
g4 = gr.Radio(["P1 (hairpin loop)","P10 (G-quadruplex)"],
|
| 678 |
-
value="P1 (hairpin loop)", label="Target pocket")
|
| 679 |
-
b4 = gr.Button("Screen Compounds", variant="primary")
|
| 680 |
-
o4t = gr.Dataframe(label="Top 5 candidates")
|
| 681 |
-
o4p = gr.Image(label="Binding scores")
|
| 682 |
-
gr.Examples([["P1 (hairpin loop)"],["P10 (G-quadruplex)"]], inputs=[g4])
|
| 683 |
-
b4.click(predict_drug, [g4], [o4t, o4p])
|
| 684 |
-
|
| 685 |
-
with gr.TabItem("S1-R13 · Frontier 🔴⭐"):
|
| 686 |
-
gr.HTML(proj_badge("S1-C · PHYLO-DRUG · S1-R13",
|
| 687 |
-
"m6A × Ferroptosis × Circadian — Pan-cancer triad", "🔴 Frontier"))
|
| 688 |
-
gr.Markdown(
|
| 689 |
-
"> **Research gap:** This triple intersection has never been studied as an integrated system.\n\n"
|
| 690 |
-
"> **Planned datasets:** TCGA-PAAD · GEO m6A atlases · Circadian gene panels\n\n"
|
| 691 |
-
"> **Expected timeline:** Q3 2026"
|
| 692 |
-
)
|
| 693 |
-
|
| 694 |
-
# ── 🧪 S1-D · PHYLO-LNP ────────────────────────────
|
| 695 |
with gr.TabItem("🧪 PHYLO-LNP"):
|
| 696 |
gr.HTML(section_header(
|
| 697 |
-
"S1-D", "PHYLO-LNP", "— How to deliver the drug
|
| 698 |
-
"
|
| 699 |
))
|
| 700 |
with gr.Tabs(elem_classes="inner-tabs"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 701 |
|
| 702 |
-
|
| 703 |
-
gr.HTML(proj_badge("S1-D · PHYLO-LNP · S1-R6",
|
| 704 |
-
"LNP Protein Corona (Serum)", "AUC = 0.791"))
|
| 705 |
-
with gr.Row():
|
| 706 |
-
sz = gr.Slider(50,300,value=100,step=1,label="Size (nm)")
|
| 707 |
-
zt = gr.Slider(-40,10,value=-5,step=1,label="Zeta (mV)")
|
| 708 |
-
with gr.Row():
|
| 709 |
-
pg = gr.Slider(0,5,value=1.5,step=0.1,label="PEG mol%")
|
| 710 |
-
lp = gr.Dropdown(["Ionizable","Cationic","Anionic","Neutral"],value="Ionizable",label="Lipid type")
|
| 711 |
-
b6 = gr.Button("Predict", variant="primary"); o6 = gr.Markdown()
|
| 712 |
-
gr.Examples([[100,-5,1.5,"Ionizable"],[80,5,0.5,"Cationic"]], inputs=[sz,zt,pg,lp])
|
| 713 |
-
b6.click(predict_corona, [sz,zt,pg,lp], o6)
|
| 714 |
-
|
| 715 |
-
with gr.TabItem("S1-R7 · Flow"):
|
| 716 |
-
gr.HTML(proj_badge("S1-D · PHYLO-LNP · S1-R7",
|
| 717 |
-
"Flow Corona — Vroman Effect · albumin→ApoE kinetics"))
|
| 718 |
-
with gr.Row():
|
| 719 |
-
s8 = gr.Slider(50,300,value=100,step=1,label="Size (nm)")
|
| 720 |
-
z8 = gr.Slider(-40,10,value=-5,step=1,label="Zeta (mV)")
|
| 721 |
-
pg8 = gr.Slider(0,5,value=1.5,step=0.1,label="PEG mol%")
|
| 722 |
-
with gr.Row():
|
| 723 |
-
ch8 = gr.Dropdown(["Ionizable","Cationic","Anionic","Neutral"],value="Ionizable",label="Charge")
|
| 724 |
-
fl8 = gr.Slider(0,40,value=20,step=1,label="Flow cm/s (aorta=40)")
|
| 725 |
-
b8 = gr.Button("Model Vroman Effect", variant="primary")
|
| 726 |
-
o8t = gr.Markdown(); o8p = gr.Image(label="Kinetics")
|
| 727 |
-
gr.Examples([[100,-5,1.5,"Ionizable",40],[150,5,0.5,"Cationic",10]], inputs=[s8,z8,pg8,ch8,fl8])
|
| 728 |
-
b8.click(predict_flow, [s8,z8,pg8,ch8,fl8], [o8t,o8p])
|
| 729 |
-
|
| 730 |
-
with gr.TabItem("S1-R8 · Brain"):
|
| 731 |
-
gr.HTML(proj_badge("S1-D · PHYLO-LNP · S1-R8",
|
| 732 |
-
"LNP Brain Delivery — ApoE% + BBB probability"))
|
| 733 |
-
smi = gr.Textbox(label="Ionizable lipid SMILES",
|
| 734 |
-
value="CC(C)CC(=O)OCC(COC(=O)CC(C)C)OC(=O)CC(C)C")
|
| 735 |
-
with gr.Row():
|
| 736 |
-
pk = gr.Slider(4,8,value=6.5,step=0.1,label="pKa")
|
| 737 |
-
zt9 = gr.Slider(-20,10,value=-3,step=1,label="Zeta (mV)")
|
| 738 |
-
b9 = gr.Button("Predict BBB Crossing", variant="primary")
|
| 739 |
-
o9t = gr.Markdown(); o9p = gr.Image(label="Radar profile")
|
| 740 |
-
gr.Examples([["CC(C)CC(=O)OCC(COC(=O)CC(C)C)OC(=O)CC(C)C",6.5,-3]], inputs=[smi,pk,zt9])
|
| 741 |
-
b9.click(predict_bbb, [smi,pk,zt9], [o9t,o9p])
|
| 742 |
-
|
| 743 |
-
with gr.TabItem("S1-R10 · NLP"):
|
| 744 |
-
gr.HTML(proj_badge("S1-D · PHYLO-LNP · S1-R10",
|
| 745 |
-
"AutoCorona NLP — structured data from PMC abstracts", "F1 = 0.71"))
|
| 746 |
-
txt = gr.Textbox(lines=5,label="Paper abstract",placeholder="Paste abstract here...")
|
| 747 |
-
b10 = gr.Button("Extract Data", variant="primary")
|
| 748 |
-
o10j = gr.Code(label="Extracted JSON", language="json")
|
| 749 |
-
o10f = gr.Textbox(label="Validation flags")
|
| 750 |
-
gr.Examples([[
|
| 751 |
-
"LNPs composed of MC3, DSPC, Cholesterol (50:10:40 mol%) with 1.5% PEG-DMG. "
|
| 752 |
-
"Hydrodynamic diameter was 98 nm, zeta potential -3.2 mV, PDI 0.12. "
|
| 753 |
-
"Incubated in human plasma. Corona: albumin, apolipoprotein E, fibrinogen."
|
| 754 |
-
]], inputs=[txt])
|
| 755 |
-
b10.click(extract_corona, txt, [o10j, o10f])
|
| 756 |
-
|
| 757 |
-
with gr.TabItem("S1-R11 · CSF/BM 🔴⭐"):
|
| 758 |
-
gr.HTML(proj_badge("S1-D · PHYLO-LNP · S1-R11",
|
| 759 |
-
"LNP Corona in CSF · Vitreous · Bone Marrow", "🔴 0 prior studies"))
|
| 760 |
-
gr.Markdown(
|
| 761 |
-
"> **Research gap:** Protein corona has only been characterized in serum/plasma. "
|
| 762 |
-
"CSF, vitreous humor, and bone marrow interstitial fluid remain completely unstudied.\n\n"
|
| 763 |
-
"> **Target cancers:** DIPG (CSF) · UVM (vitreous) · pAML (bone marrow)\n\n"
|
| 764 |
-
"> **Expected timeline:** Q2–Q3 2026"
|
| 765 |
-
)
|
| 766 |
-
|
| 767 |
-
# ── 🩸 S1-E · PHYLO-BIOMARKERS ─────────────────────
|
| 768 |
with gr.TabItem("🩸 PHYLO-BIOMARKERS"):
|
| 769 |
gr.HTML(section_header(
|
| 770 |
-
"S1-E", "PHYLO-BIOMARKERS", "— Detect
|
| 771 |
-
"
|
| 772 |
))
|
| 773 |
with gr.Tabs(elem_classes="inner-tabs"):
|
| 774 |
-
|
| 775 |
-
|
| 776 |
-
|
| 777 |
-
|
| 778 |
-
|
| 779 |
-
|
| 780 |
-
|
| 781 |
-
|
| 782 |
-
|
| 783 |
-
|
| 784 |
-
|
| 785 |
-
|
| 786 |
-
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
gr.Markdown("> Coming next — validates S1-R9 results against GEO plasma proteomics datasets.")
|
| 801 |
-
|
| 802 |
-
# ── 📓 JOURNAL ──────────────────────────────────────
|
| 803 |
-
# ── 🧠 S1-F · PHYLO-RARE ───────────────────────────
|
| 804 |
with gr.TabItem("🧠 PHYLO-RARE"):
|
| 805 |
gr.HTML(section_header(
|
| 806 |
"S1-F", "PHYLO-RARE", "— Where almost nobody has looked yet",
|
| 807 |
-
"<b style='color:#ef4444'>⚠️
|
| 808 |
-
"
|
| 809 |
-
"S1-R12c UVM (GNAQ/GNA11) 🔶 · "
|
| 810 |
-
"S1-R12d pAML (FLT3-ITD) 🔶"
|
| 811 |
))
|
| 812 |
with gr.Tabs(elem_classes="inner-tabs"):
|
| 813 |
-
|
| 814 |
-
with gr.TabItem("
|
| 815 |
-
gr.
|
| 816 |
-
"
|
| 817 |
-
|
| 818 |
-
"PBTA · GSE126319"
|
| 819 |
-
))
|
| 820 |
-
gr.Markdown(
|
| 821 |
-
"> **Why DIPG?** Diffuse Intrinsic Pontine Glioma — median survival 9–11 months. "
|
| 822 |
-
"H3K27M oncohistone in **78%** cases. "
|
| 823 |
-
"CSF delivery is the only viable route past the brainstem BBB. "
|
| 824 |
-
"Circadian disruption (BMAL1 suppression) newly linked — **0 prior LNP studies**."
|
| 825 |
-
)
|
| 826 |
-
with gr.Tabs(elem_classes="inner-tabs"):
|
| 827 |
-
with gr.TabItem("Variants"):
|
| 828 |
-
sort_d = gr.Radio(["Frequency", "Drug status"], value="Frequency", label="Sort by")
|
| 829 |
-
b_dv = gr.Button("Load DIPG Variants", variant="primary")
|
| 830 |
-
o_dv = gr.Dataframe(label="H3K27M co-mutations · PBTA/GSE126319")
|
| 831 |
-
b_dv.click(dipg_variants, [sort_d], o_dv)
|
| 832 |
-
with gr.TabItem("CSF LNP Formulations"):
|
| 833 |
-
with gr.Row():
|
| 834 |
-
d_peg = gr.Slider(0.5, 3.0, value=1.5, step=0.1, label="PEG mol%")
|
| 835 |
-
d_size = gr.Slider(60, 150, value=90, step=5, label="Target size (nm)")
|
| 836 |
-
b_dc = gr.Button("Rank CSF Formulations", variant="primary")
|
| 837 |
-
o_dct = gr.Dataframe(label="CSF LNP ranking")
|
| 838 |
-
o_dcp = gr.Image(label="ApoE% in CSF corona")
|
| 839 |
-
b_dc.click(dipg_csf, [d_peg, d_size], [o_dct, o_dcp])
|
| 840 |
-
with gr.TabItem("Research Gap"):
|
| 841 |
gr.Markdown(
|
| 842 |
-
"**
|
| 843 |
-
"
|
| 844 |
-
"
|
| 845 |
-
"
|
| 846 |
-
"| Delivery | CED convection | LNP corona **in CSF** |\n"
|
| 847 |
-
"| Biology | PRC2 inhibition | Ferroptosis in H3K27M+ DIPG |"
|
| 848 |
)
|
| 849 |
-
|
| 850 |
-
|
| 851 |
-
|
| 852 |
-
|
| 853 |
-
|
| 854 |
-
|
| 855 |
-
|
| 856 |
-
|
| 857 |
-
|
| 858 |
-
|
| 859 |
-
|
| 860 |
-
|
| 861 |
-
|
| 862 |
-
|
| 863 |
-
|
| 864 |
-
|
| 865 |
-
|
| 866 |
-
|
| 867 |
-
|
| 868 |
-
|
| 869 |
-
|
| 870 |
-
|
| 871 |
-
|
| 872 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 873 |
gr.Markdown(
|
| 874 |
-
"**
|
| 875 |
-
"
|
| 876 |
-
"
|
| 877 |
-
"
|
| 878 |
-
"| Delivery | Intravitreal injection | LNP corona **in vitreous humor** |\n"
|
| 879 |
-
"| Biology | PLCβ→PKC→MAPK | GNAQ × METTL3 × YTHDF2 axis |"
|
| 880 |
)
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
| 884 |
-
|
| 885 |
-
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
|
| 901 |
-
|
| 902 |
-
|
| 903 |
-
|
| 904 |
-
|
| 905 |
-
with gr.TabItem("BM Niche LNP"):
|
| 906 |
-
gr.Dataframe(
|
| 907 |
-
value=pd.DataFrame(PAML_BM_LNP),
|
| 908 |
-
label="Bone marrow niche LNP candidates · TARGET-AML context"
|
| 909 |
-
)
|
| 910 |
-
with gr.TabItem("Research Gap"):
|
| 911 |
gr.Markdown(
|
| 912 |
-
"**
|
| 913 |
-
"
|
| 914 |
-
"
|
| 915 |
-
"
|
| 916 |
-
"| Delivery | Liposomal daunorubicin | LNP corona **in bone marrow** |\n"
|
| 917 |
-
"| Biology | Midostaurin inhibits FLT3 | Ferroptosis SL + FLT3i |"
|
| 918 |
)
|
| 919 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 920 |
with gr.TabItem("📓 Journal"):
|
| 921 |
gr.Markdown("### Lab Journal\nEvery tool call auto-logged with project code.")
|
| 922 |
with gr.Row():
|
| 923 |
note_text = gr.Textbox(label="📝 Observation", placeholder="What did you discover?", lines=3)
|
| 924 |
-
note_tab = gr.Textbox(label="Project code (e.g. S1-
|
| 925 |
note_last = gr.Textbox(visible=False)
|
| 926 |
save_btn = gr.Button("💾 Save", variant="primary")
|
| 927 |
save_msg = gr.Markdown()
|
| 928 |
journal_df = gr.Dataframe(label="📋 Full History", value=load_journal(), interactive=False)
|
| 929 |
refresh_btn = gr.Button("🔄 Refresh")
|
| 930 |
refresh_btn.click(load_journal, [], journal_df)
|
| 931 |
-
save_btn.click(save_note, [note_text,note_tab,note_last], [save_msg,journal_df])
|
| 932 |
|
| 933 |
-
#
|
| 934 |
with gr.TabItem("📚 Learning"):
|
| 935 |
gr.Markdown("""
|
| 936 |
## 🧪 Guided Investigations — S1 Biomedical
|
| 937 |
> 🟢 Beginner → 🟡 Intermediate → 🔴 Advanced
|
| 938 |
|
| 939 |
---
|
| 940 |
-
### 🟢 Case 1 · S1-A ·
|
| 941 |
**Why does the same position give two different outcomes?**
|
| 942 |
-
1. PHYLO-GENOMICS → OpenVariant → `BRCA1:p.R1699Q` → Benign
|
| 943 |
2. Enter `BRCA1:p.R1699W` → Pathogenic
|
| 944 |
3. Same position, different amino acid — Q (polar) vs W (bulky-aromatic)
|
| 945 |
|
| 946 |
---
|
| 947 |
-
### 🟢 Case 2 · S1-D ·
|
| 948 |
**How does PEG% control which protein coats the nanoparticle?**
|
| 949 |
-
1. PHYLO-LNP → Corona → Ionizable, Zeta=−5, PEG=**0.5%** → note protein
|
| 950 |
2. Change PEG=**2.5%** → compare
|
| 951 |
-
3.
|
| 952 |
|
| 953 |
---
|
| 954 |
-
### 🟡 Case 3 · S1-D ·
|
| 955 |
**Does blood flow reshape the corona over time?**
|
| 956 |
-
1. PHYLO-LNP → Flow → Flow=0 → observe ApoE curve
|
| 957 |
2. Flow=40 (arterial) → compare
|
| 958 |
3. At what minute does ApoE dominate?
|
| 959 |
|
| 960 |
---
|
| 961 |
-
### 🟡 Case 4 · S1-B ·
|
| 962 |
**Which cancer has the most novel (undrugged) siRNA targets?**
|
| 963 |
-
1. PHYLO-RNA → siRNA → LUAD → count "Novel"
|
| 964 |
2. Repeat BRCA, COAD
|
| 965 |
|
| 966 |
---
|
| 967 |
-
### 🔴 Case 5 · S1-E ·
|
| 968 |
**Minimum protein signal that flips to CANCER?**
|
| 969 |
-
1. PHYLO-BIOMARKERS → Liquid Biopsy → all=0 → HEALTHY
|
| 970 |
2. Set CTHRC1=2.5, FHL2=2.0, LDHA=1.8 → observe
|
| 971 |
3. Reset. Increase only CTHRC1 step by step.
|
| 972 |
|
| 973 |
---
|
| 974 |
-
### 🔴 Case 6 ·
|
| 975 |
-
1. PHYLO-RNA → miRNA → TP53 → find top targets (BCL2, CDK6)
|
| 976 |
-
2. PHYLO-DRUG → FGFR3 → check CDK6 pathway overlap
|
| 977 |
-
3. PHYLO-RNA → siRNA → BRCA → does CDK6 appear?
|
| 978 |
|
| 979 |
---
|
| 980 |
### 📖 Tool Index
|
| 981 |
| Code | Module | Tool | Metric |
|
| 982 |
|------|--------|------|--------|
|
| 983 |
-
| S1-
|
| 984 |
-
| S1-
|
| 985 |
-
| S1-
|
| 986 |
-
| S1-
|
| 987 |
-
| S1-
|
| 988 |
-
| S1-
|
| 989 |
-
| S1-
|
| 990 |
-
| S1-
|
| 991 |
-
| S1-
|
| 992 |
-
| S1-
|
| 993 |
""")
|
| 994 |
|
| 995 |
gr.Markdown(
|
|
|
|
| 9 |
from PIL import Image
|
| 10 |
from datetime import datetime
|
| 11 |
from pathlib import Path
|
| 12 |
+
import os
|
| 13 |
|
| 14 |
+
# Вимкнення телеметрії Gradio (щоб уникнути непотрібних запитів)
|
| 15 |
+
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
| 16 |
+
|
| 17 |
+
# Кольори (ваші)
|
| 18 |
BG = "#0f172a"
|
| 19 |
CARD = "#1e293b"
|
| 20 |
ACC = "#f97316"
|
|
|
|
| 27 |
|
| 28 |
LOG_PATH = Path("/tmp/lab_journal.csv")
|
| 29 |
|
| 30 |
+
# ---------- Логування ----------
|
| 31 |
def log_entry(tab, inputs, result, note=""):
|
| 32 |
try:
|
| 33 |
write_header = not LOG_PATH.exists()
|
|
|
|
| 51 |
log_entry(tab, "", last_result, note)
|
| 52 |
return "✅ Saved!", load_journal()
|
| 53 |
|
| 54 |
+
# ---------- Бази даних (ваші) ----------
|
| 55 |
MIRNA_DB = {
|
| 56 |
"BRCA2": [
|
| 57 |
{"miRNA":"hsa-miR-148a-3p","log2FC":-0.70,"padj":0.013,"targets":"DNMT1, AKT2","pathway":"Epigenetic reprogramming"},
|
|
|
|
| 75 |
{"miRNA":"hsa-miR-215-5p","log2FC":-0.51,"padj":0.038,"targets":"DTL, DHFR","pathway":"DNA damage response"},
|
| 76 |
],
|
| 77 |
}
|
| 78 |
+
|
| 79 |
SIRNA_DB = {
|
| 80 |
"LUAD": [
|
| 81 |
{"Gene":"SPC24","dCERES":-0.175,"log2FC":1.13,"Drug_status":"Novel","siRNA":"GCAGCUGAAGAAACUGAAU"},
|
|
|
|
| 99 |
{"Gene":"PKMYT1","dCERES":-0.122,"log2FC":1.07,"Drug_status":"Clinical","siRNA":"GACGCUCAAGAUGCAGAUU"},
|
| 100 |
],
|
| 101 |
}
|
| 102 |
+
|
| 103 |
CERNA = [
|
| 104 |
{"lncRNA":"CYTOR","miRNA":"hsa-miR-138-5p","target":"AKT1","pathway":"TREM2 core signaling"},
|
| 105 |
{"lncRNA":"CYTOR","miRNA":"hsa-miR-138-5p","target":"NFKB1","pathway":"Neuroinflammation"},
|
|
|
|
| 107 |
{"lncRNA":"GAS5","miRNA":"hsa-miR-222-3p","target":"IL1B","pathway":"Neuroinflammation"},
|
| 108 |
{"lncRNA":"HOTAIRM1","miRNA":"hsa-miR-9-5p","target":"TREM2","pathway":"Direct TREM2 regulation"},
|
| 109 |
]
|
| 110 |
+
|
| 111 |
ASO = [
|
| 112 |
{"lncRNA":"GAS5","position":119,"accessibility":0.653,"GC_pct":50,"Tm":47.2,"priority":"HIGH"},
|
| 113 |
{"lncRNA":"CYTOR","position":507,"accessibility":0.653,"GC_pct":50,"Tm":46.8,"priority":"HIGH"},
|
|
|
|
| 115 |
{"lncRNA":"LINC00847","position":89,"accessibility":0.598,"GC_pct":56,"Tm":48.3,"priority":"MEDIUM"},
|
| 116 |
{"lncRNA":"ZFAS1","position":312,"accessibility":0.571,"GC_pct":48,"Tm":45.5,"priority":"MEDIUM"},
|
| 117 |
]
|
| 118 |
+
|
| 119 |
FGFR3 = {
|
| 120 |
"P1 (hairpin loop)": [
|
| 121 |
{"Compound":"CHEMBL1575701","RNA_score":0.809,"Toxicity":0.01,"Final_score":0.793},
|
|
|
|
| 132 |
{"Compound":"Berberine","RNA_score":0.735,"Toxicity":3.2,"Final_score":0.708},
|
| 133 |
],
|
| 134 |
}
|
| 135 |
+
|
| 136 |
VARIANT_DB = {
|
| 137 |
"BRCA1:p.R1699Q": {"score":0.03,"cls":"Benign","conf":"High"},
|
| 138 |
"BRCA1:p.R1699W": {"score":0.97,"cls":"Pathogenic","conf":"High"},
|
|
|
|
| 142 |
"EGFR:p.L858R": {"score":0.96,"cls":"Pathogenic","conf":"High"},
|
| 143 |
"ALK:p.F1174L": {"score":0.94,"cls":"Pathogenic","conf":"High"},
|
| 144 |
}
|
| 145 |
+
|
| 146 |
PLAIN = {
|
| 147 |
"Pathogenic": "This variant is likely to cause disease. Clinical follow-up is strongly recommended.",
|
| 148 |
"Likely Pathogenic": "This variant is probably harmful. Discuss with your doctor.",
|
| 149 |
"Benign": "This variant is likely harmless. Common in the general population.",
|
| 150 |
"Likely Benign": "This variant is probably harmless. No strong reason for concern.",
|
| 151 |
}
|
| 152 |
+
|
| 153 |
BM_W = {
|
| 154 |
"CTHRC1":0.18,"FHL2":0.15,"LDHA":0.14,"P4HA1":0.13,
|
| 155 |
"SERPINH1":0.12,"ABCA8":-0.11,"CA4":-0.10,"CKB":-0.09,
|
| 156 |
"NNMT":0.08,"CACNA2D2":-0.07
|
| 157 |
}
|
| 158 |
+
|
| 159 |
PROTEINS = ["albumin","apolipoprotein","fibrinogen","vitronectin",
|
| 160 |
"clusterin","igm","iga","igg","complement","transferrin",
|
| 161 |
"alpha-2-macroglobulin"]
|
| 162 |
|
| 163 |
+
# ---------- Дані для рідкісних раків ----------
|
| 164 |
+
DIPG_VARIANTS = [
|
| 165 |
+
{"Variant":"H3K27M (H3F3A)","Freq_pct":78,"Pathway":"PRC2 inhibition → global H3K27me3 loss","Drug_status":"ONC201 (clinical)","Circadian_gene":"BMAL1 suppressed"},
|
| 166 |
+
{"Variant":"ACVR1 p.R206H","Freq_pct":21,"Pathway":"BMP/SMAD hyperactivation","Drug_status":"LDN-193189 (preclinical)","Circadian_gene":"PER1 disrupted"},
|
| 167 |
+
{"Variant":"PIK3CA p.H1047R","Freq_pct":15,"Pathway":"PI3K/AKT/mTOR","Drug_status":"Copanlisib (clinical)","Circadian_gene":"CRY1 altered"},
|
| 168 |
+
{"Variant":"TP53 p.R248W","Freq_pct":14,"Pathway":"DNA damage response loss","Drug_status":"APR-246 (clinical)","Circadian_gene":"p53-CLOCK axis"},
|
| 169 |
+
{"Variant":"PDGFRA amp","Freq_pct":13,"Pathway":"RTK/RAS signalling","Drug_status":"Avapritinib (clinical)","Circadian_gene":"REV-ERB altered"},
|
| 170 |
+
]
|
| 171 |
+
|
| 172 |
+
DIPG_CSF_LNP = [
|
| 173 |
+
{"Formulation":"MC3-DSPC-Chol-PEG","Size_nm":92,"Zeta_mV":-4.1,"CSF_protein":"Beta2-microglobulin","ApoE_pct":12.4,"BBB_est":0.41,"Priority":"HIGH"},
|
| 174 |
+
{"Formulation":"DLin-KC2-DSPE-PEG","Size_nm":87,"Zeta_mV":-3.8,"CSF_protein":"Cystatin C","ApoE_pct":14.1,"BBB_est":0.47,"Priority":"HIGH"},
|
| 175 |
+
{"Formulation":"C12-200-DOPE-PEG","Size_nm":103,"Zeta_mV":-5.2,"CSF_protein":"Albumin (low)","ApoE_pct":9.8,"BBB_est":0.33,"Priority":"MEDIUM"},
|
| 176 |
+
{"Formulation":"DODAP-DSPC-Chol","Size_nm":118,"Zeta_mV":-2.1,"CSF_protein":"Transferrin","ApoE_pct":7.2,"BBB_est":0.24,"Priority":"LOW"},
|
| 177 |
+
]
|
| 178 |
+
|
| 179 |
+
UVM_VARIANTS = [
|
| 180 |
+
{"Variant":"GNAQ p.Q209L","Freq_pct":46,"Pathway":"PLCβ → PKC → MAPK","Drug_status":"Darovasertib (clinical)","m6A_writer":"METTL3 upregulated"},
|
| 181 |
+
{"Variant":"GNA11 p.Q209L","Freq_pct":32,"Pathway":"PLCβ → PKC → MAPK","Drug_status":"Darovasertib (clinical)","m6A_writer":"WTAP upregulated"},
|
| 182 |
+
{"Variant":"BAP1 loss","Freq_pct":47,"Pathway":"Chromatin remodeling → metastasis","Drug_status":"No approved (HDAC trials)","m6A_writer":"FTO overexpressed"},
|
| 183 |
+
{"Variant":"SF3B1 p.R625H","Freq_pct":19,"Pathway":"Splicing alteration → neoepitopes","Drug_status":"H3B-8800 (clinical)","m6A_writer":"METTL14 altered"},
|
| 184 |
+
{"Variant":"EIF1AX p.A113_splice","Freq_pct":14,"Pathway":"Translation initiation","Drug_status":"Novel — no drug","m6A_writer":"YTHDF2 suppressed"},
|
| 185 |
+
]
|
| 186 |
+
|
| 187 |
+
UVM_VITREOUS_LNP = [
|
| 188 |
+
{"Formulation":"SM-102-DSPC-Chol-PEG","Vitreal_protein":"Hyaluronan-binding","Size_nm":95,"Zeta_mV":-3.2,"Retention_h":18,"Priority":"HIGH"},
|
| 189 |
+
{"Formulation":"Lipid-H-DOPE-PEG","Vitreal_protein":"Vitronectin dominant","Size_nm":88,"Zeta_mV":-4.0,"Retention_h":22,"Priority":"HIGH"},
|
| 190 |
+
{"Formulation":"DOTAP-DSPC-PEG","Vitreal_protein":"Albumin wash-out","Size_nm":112,"Zeta_mV":+2.1,"Retention_h":6,"Priority":"LOW"},
|
| 191 |
+
{"Formulation":"MC3-DPPC-Chol","Vitreal_protein":"Clusterin-rich","Size_nm":101,"Zeta_mV":-2.8,"Retention_h":14,"Priority":"MEDIUM"},
|
| 192 |
+
]
|
| 193 |
+
|
| 194 |
+
PAML_VARIANTS = [
|
| 195 |
+
{"Variant":"FLT3-ITD","Freq_pct":25,"Pathway":"RTK constitutive activation → JAK/STAT","Drug_status":"Midostaurin (approved)","Ferroptosis":"GPX4 suppressed"},
|
| 196 |
+
{"Variant":"NPM1 c.860_863dupTCAG","Freq_pct":30,"Pathway":"Nuclear export deregulation","Drug_status":"APR-548 combo (clinical)","Ferroptosis":"SLC7A11 upregulated"},
|
| 197 |
+
{"Variant":"DNMT3A p.R882H","Freq_pct":18,"Pathway":"Epigenetic dysregulation","Drug_status":"Azacitidine (approved)","Ferroptosis":"ACSL4 altered"},
|
| 198 |
+
{"Variant":"CEBPA biallelic","Freq_pct":8,"Pathway":"Myeloid differentiation block","Drug_status":"Novel target","Ferroptosis":"NRF2 pathway"},
|
| 199 |
+
{"Variant":"IDH1/2 mutation","Freq_pct":15,"Pathway":"2-HG oncometabolite → TET2 inhibition","Drug_status":"Enasidenib (approved)","Ferroptosis":"Iron metabolism disrupted"},
|
| 200 |
+
]
|
| 201 |
+
|
| 202 |
+
PAML_BM_LNP = [
|
| 203 |
+
{"Formulation":"ALC-0315-DSPC-Chol-PEG","BM_protein":"ApoE + Clusterin","Size_nm":98,"Zeta_mV":-3.5,"Marrow_uptake_pct":34,"Priority":"HIGH"},
|
| 204 |
+
{"Formulation":"MC3-DOPE-Chol-PEG","BM_protein":"Fibronectin dominant","Size_nm":105,"Zeta_mV":-4.2,"Marrow_uptake_pct":28,"Priority":"HIGH"},
|
| 205 |
+
{"Formulation":"DLin-MC3-DPPC","BM_protein":"Vitronectin-rich","Size_nm":91,"Zeta_mV":-2.9,"Marrow_uptake_pct":19,"Priority":"MEDIUM"},
|
| 206 |
+
{"Formulation":"Cationic-DOTAP-Chol","BM_protein":"Opsonin-heavy","Size_nm":132,"Zeta_mV":+8.1,"Marrow_uptake_pct":8,"Priority":"LOW"},
|
| 207 |
+
]
|
| 208 |
+
|
| 209 |
+
# ---------- Функції логіки (ваші, без змін) ----------
|
| 210 |
def predict_mirna(gene):
|
| 211 |
df = pd.DataFrame(MIRNA_DB.get(gene, []))
|
| 212 |
log_entry("S1-B | S1-R2 | miRNA", gene, f"{len(df)} miRNAs")
|
|
|
|
| 360 |
log_entry("S1-D | S1-R10 | NLP", text[:80], f"proteins={len(out['corona_proteins'])}")
|
| 361 |
return json.dumps(out, indent=2), summary
|
| 362 |
|
| 363 |
+
# ---------- Функції для рідкісних раків ----------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 364 |
def dipg_variants(sort_by):
|
| 365 |
df = pd.DataFrame(DIPG_VARIANTS).sort_values(
|
| 366 |
"Freq_pct" if sort_by == "Frequency" else "Drug_status", ascending=False)
|
|
|
|
| 442 |
)
|
| 443 |
return summary, Image.open(buf)
|
| 444 |
|
| 445 |
+
# ---------- Хелпери для UI ----------
|
| 446 |
def section_header(code, name, tagline, projects_html):
|
| 447 |
return (
|
| 448 |
+
f"<div style='background:{BG};border:1px solid {BORDER};padding:14px 18px;"
|
| 449 |
+
f"border-radius:8px;margin-bottom:12px;'>"
|
| 450 |
+
f"<div style='display:flex;align-items:baseline;gap:10px;'>"
|
| 451 |
+
f"<span style='color:{ACC2};font-size:16px;font-weight:700'>{code}</span>"
|
| 452 |
+
f"<span style='color:{TXT};font-size:14px;font-weight:600'>{name}</span>"
|
| 453 |
+
f"<span style='color:{DIM};font-size:12px'>{tagline}</span></div>"
|
| 454 |
+
f"<div style='margin-top:8px;font-size:12px;color:{DIM}'>{projects_html}</div>"
|
| 455 |
f"</div>"
|
| 456 |
)
|
| 457 |
|
| 458 |
def proj_badge(code, title, metric=""):
|
| 459 |
+
m = (f"<span style='background:#0f2a3f;color:{ACC2};padding:1px 7px;border-radius:3px;"
|
| 460 |
+
f"font-size:10px;margin-left:6px'>{metric}</span>") if metric else ""
|
| 461 |
return (
|
| 462 |
+
f"<div style='background:{CARD};border-left:3px solid {ACC};"
|
| 463 |
+
f"padding:8px 12px;border-radius:0 6px 6px 0;margin-bottom:8px;'>"
|
| 464 |
+
f"<span style='color:{DIM};font-size:11px'>{code}</span>{m}<br>"
|
| 465 |
+
f"<span style='color:{TXT};font-size:14px;font-weight:600'>{title}</span>"
|
| 466 |
f"</div>"
|
| 467 |
)
|
| 468 |
|
| 469 |
+
# ---------- CSS ----------
|
| 470 |
css = f"""
|
| 471 |
body, .gradio-container {{ background: {BG} !important; color: {TXT} !important; }}
|
| 472 |
|
|
|
|
| 485 |
background: {BG} !important;
|
| 486 |
}}
|
| 487 |
|
| 488 |
+
/* INNER sub-tab bar — R1, R2, etc. */
|
| 489 |
.inner-tabs .tab-nav button {{
|
| 490 |
color: {DIM} !important;
|
| 491 |
background: {BG} !important;
|
|
|
|
| 510 |
padding: 14px !important;
|
| 511 |
}}
|
| 512 |
|
| 513 |
+
/* Третій рівень вкладок (a, b) */
|
| 514 |
+
.sub-sub-tabs .tab-nav button {{
|
| 515 |
+
color: {DIM} !important;
|
| 516 |
+
background: {CARD} !important;
|
| 517 |
+
font-size: 11px !important;
|
| 518 |
+
padding: 3px 8px !important;
|
| 519 |
+
border-radius: 3px 3px 0 0 !important;
|
| 520 |
+
}}
|
| 521 |
+
.sub-sub-tabs .tab-nav button.selected {{
|
| 522 |
+
color: {ACC} !important;
|
| 523 |
+
background: {BG} !important;
|
| 524 |
+
}}
|
| 525 |
+
|
| 526 |
h1, h2, h3 {{ color: {ACC} !important; }}
|
| 527 |
.gr-button-primary {{ background: {ACC} !important; border: none !important; }}
|
| 528 |
footer {{ display: none !important; }}
|
| 529 |
"""
|
| 530 |
|
| 531 |
+
# ---------- MAP HTML ----------
|
| 532 |
MAP_HTML = f"""
|
| 533 |
<div style="background:{CARD};padding:22px;border-radius:8px;font-family:monospace;
|
| 534 |
font-size:13px;line-height:2.0;color:{TXT}">
|
|
|
|
| 539 |
|
| 540 |
<span style="color:{ACC2};font-weight:600">S1-A · PHYLO-GENOMICS</span>
|
| 541 |
<span style="color:{DIM}"> — What breaks in DNA</span><br>
|
| 542 |
+
├─ <b>S1-A · R1a</b> OpenVariant
|
| 543 |
<span style="color:{GRN}"> AUC=0.939 ✅</span><br>
|
| 544 |
+
├─ <b>S1-A · R1b</b> Somatic classifier
|
| 545 |
<span style="color:#f59e0b"> 🔶 In progress</span><br>
|
| 546 |
+
└─ <b>S1-A · R2a</b> Rare variants (DIPG · UVM)
|
| 547 |
<span style="color:{DIM}"> 🔴 Planned</span><br><br>
|
| 548 |
|
| 549 |
<span style="color:{ACC2};font-weight:600">S1-B · PHYLO-RNA</span>
|
| 550 |
<span style="color:{DIM}"> — How to silence it via RNA</span><br>
|
| 551 |
+
├─ <b>S1-B · R1a</b> miRNA silencing (BRCA2)
|
| 552 |
<span style="color:{GRN}"> ✅</span><br>
|
| 553 |
+
├─ <b>S1-B · R2a</b> siRNA synthetic lethal (LUAD · BRCA · COAD)
|
| 554 |
<span style="color:{GRN}"> ✅</span><br>
|
| 555 |
+
├─ <b>S1-B · R3a</b> lncRNA-TREM2 ceRNA network
|
| 556 |
<span style="color:{GRN}"> ✅</span><br>
|
| 557 |
+
└─ <b>S1-B · R3b</b> ASO designer
|
| 558 |
<span style="color:{GRN}"> ✅</span><br><br>
|
| 559 |
|
| 560 |
<span style="color:{ACC2};font-weight:600">S1-C · PHYLO-DRUG</span>
|
| 561 |
<span style="color:{DIM}"> — Which molecule treats it</span><br>
|
| 562 |
+
├─ <b>S1-C · R1a</b> FGFR3 RNA-directed compounds
|
| 563 |
<span style="color:{GRN}"> ✅</span><br>
|
| 564 |
+
├─ <b>S1-C · R1b</b> Synthetic lethal drug mapping
|
| 565 |
<span style="color:#f59e0b"> 🔶</span><br>
|
| 566 |
+
└─ <b>S1-C · R2a</b> m6A × Ferroptosis × Circadian ⭐
|
| 567 |
<span style="color:{DIM}"> 🔴 Frontier</span><br><br>
|
| 568 |
|
| 569 |
<span style="color:{ACC2};font-weight:600">S1-D · PHYLO-LNP</span>
|
| 570 |
<span style="color:{DIM}"> — How to deliver the drug</span><br>
|
| 571 |
+
├─ <b>S1-D · R1a</b> LNP corona (serum)
|
| 572 |
<span style="color:{GRN}"> AUC=0.791 ✅</span><br>
|
| 573 |
+
├─ <b>S1-D · R2a</b> Flow corona — Vroman effect
|
| 574 |
<span style="color:{GRN}"> ✅</span><br>
|
| 575 |
+
├─ <b>S1-D · R3a</b> LNP brain / BBB / ApoE
|
| 576 |
<span style="color:{GRN}"> ✅</span><br>
|
| 577 |
+
├─ <b>S1-D · R4a</b> AutoCorona NLP
|
| 578 |
<span style="color:{GRN}"> F1=0.71 ✅</span><br>
|
| 579 |
+
└─ <b>S1-D · R5a</b> CSF · Vitreous · Bone Marrow ⭐
|
| 580 |
<span style="color:{DIM}"> 🔴 0 prior studies</span><br><br>
|
| 581 |
|
| 582 |
<span style="color:{ACC2};font-weight:600">S1-E · PHYLO-BIOMARKERS</span>
|
| 583 |
<span style="color:{DIM}"> — Detect without biopsy</span><br>
|
| 584 |
+
├─ <b>S1-E · R1a</b> Liquid Biopsy classifier
|
| 585 |
<span style="color:{GRN}"> AUC=0.992* ✅</span><br>
|
| 586 |
+
└─ <b>S1-E · R1b</b> Protein panel validator
|
| 587 |
+
<span style="color:#f59e0b"> 🔶</span><br><br>
|
|
|
|
|
|
|
| 588 |
|
| 589 |
<span style="color:{ACC2};font-weight:600">S1-F · PHYLO-RARE</span>
|
| 590 |
<span style="color:{DIM}"> — Where almost nobody has looked yet (<300 cases/yr)</span><br>
|
| 591 |
+
├─ <b>S1-F · R1a</b> DIPG toolkit (H3K27M + CSF LNP + Circadian)
|
| 592 |
<span style="color:#f59e0b"> 🔶 In development</span><br>
|
| 593 |
+
├─ <b>S1-F · R2a</b> UVM toolkit (GNAQ/GNA11 + vitreous + m6A)
|
| 594 |
<span style="color:#f59e0b"> 🔶 In development</span><br>
|
| 595 |
+
└─ <b>S1-F · R3a</b> pAML toolkit (FLT3-ITD + BM niche + ferroptosis)
|
| 596 |
<span style="color:#f59e0b"> 🔶 In development</span><br><br>
|
| 597 |
|
| 598 |
<span style="color:{DIM};font-size:11px">
|
|
|
|
| 602 |
</div>
|
| 603 |
"""
|
| 604 |
|
| 605 |
+
# ---------- ПОБУДОВА UI ----------
|
| 606 |
with gr.Blocks(css=css, title="K R&D Lab · S1 Biomedical") as demo:
|
|
|
|
| 607 |
gr.Markdown(
|
| 608 |
"# 🔬 K R&D Lab · Science Sphere — S1 Biomedical\n"
|
| 609 |
"**Oksana Kolisnyk** · [KOSATIKS GROUP](https://kosatiks-group.pp.ua) | "
|
|
|
|
| 612 |
"*Research only. Not clinical advice.*"
|
| 613 |
)
|
| 614 |
|
| 615 |
+
# Основний рівень вкладок (категорії)
|
| 616 |
+
with gr.Tabs(elem_classes="outer-tabs") as outer_tabs:
|
| 617 |
+
# 1. Карта лабораторії
|
|
|
|
|
|
|
|
|
|
| 618 |
with gr.TabItem("🗺️ Lab Map"):
|
| 619 |
gr.HTML(MAP_HTML)
|
| 620 |
|
| 621 |
+
# 2. S1-A · PHYLO-GENOMICS
|
| 622 |
with gr.TabItem("🧬 PHYLO-GENOMICS"):
|
| 623 |
gr.HTML(section_header(
|
| 624 |
"S1-A", "PHYLO-GENOMICS", "— What breaks in DNA",
|
| 625 |
+
"R1a OpenVariant ✅ · R1b Somatic classifier 🔶"
|
| 626 |
))
|
| 627 |
+
with gr.Tabs(elem_classes="inner-tabs") as inner_tabs:
|
| 628 |
+
# R1 · Variant classification
|
| 629 |
+
with gr.TabItem("R1 · Variant classification"):
|
| 630 |
+
with gr.Tabs(elem_classes="sub-sub-tabs") as sub_tabs:
|
| 631 |
+
# R1a · OpenVariant
|
| 632 |
+
with gr.TabItem("R1a · OpenVariant"):
|
| 633 |
+
gr.HTML(proj_badge("S1-A · R1a", "OpenVariant — SNV Pathogenicity Classifier", "AUC=0.939"))
|
| 634 |
+
hgvs = gr.Textbox(label="HGVS notation", placeholder="BRCA1:p.R1699Q")
|
| 635 |
+
gr.Markdown("**Or enter functional scores manually:**")
|
| 636 |
+
with gr.Row():
|
| 637 |
+
sift = gr.Slider(0,1,value=0.5,step=0.01,label="SIFT (0=damaging)")
|
| 638 |
+
pp = gr.Slider(0,1,value=0.5,step=0.01,label="PolyPhen-2")
|
| 639 |
+
gn = gr.Slider(0,0.01,value=0.001,step=0.0001,label="gnomAD AF")
|
| 640 |
+
b_v = gr.Button("Predict Pathogenicity", variant="primary")
|
| 641 |
+
o_v = gr.HTML()
|
| 642 |
+
gr.Examples([["BRCA1:p.R1699Q",0.82,0.05,0.0012],
|
| 643 |
+
["TP53:p.R248W",0.00,1.00,0.0],
|
| 644 |
+
["BRCA2:p.D2723A",0.01,0.98,0.0]],
|
| 645 |
+
inputs=[hgvs,sift,pp,gn], cache_examples=False)
|
| 646 |
+
b_v.click(predict_variant, [hgvs,sift,pp,gn], o_v)
|
| 647 |
+
# R1b · Somatic Classifier (в розробці)
|
| 648 |
+
with gr.TabItem("R1b · Somatic Classifier 🔶"):
|
| 649 |
+
gr.HTML(proj_badge("S1-A · R1b", "Somatic Mutation Classifier — BRCA · LUAD panels", "🔶 In progress"))
|
| 650 |
+
gr.Markdown("> This module is in active development. Coming in the next release.")
|
| 651 |
+
|
| 652 |
+
# 3. S1-B · PHYLO-RNA
|
| 653 |
with gr.TabItem("🔬 PHYLO-RNA"):
|
| 654 |
gr.HTML(section_header(
|
| 655 |
"S1-B", "PHYLO-RNA", "— How to silence it via RNA",
|
| 656 |
+
"R1a miRNA ✅ · R2a siRNA ✅ · R3a lncRNA ✅ · R3b ASO ✅"
|
| 657 |
))
|
| 658 |
with gr.Tabs(elem_classes="inner-tabs"):
|
| 659 |
+
# R1 · miRNA silencing
|
| 660 |
+
with gr.TabItem("R1 · miRNA silencing"):
|
| 661 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 662 |
+
with gr.TabItem("R1a · BRCA2 miRNA"):
|
| 663 |
+
gr.HTML(proj_badge("S1-B · R1a", "miRNA Silencing — BRCA2"))
|
| 664 |
+
g1 = gr.Dropdown(["BRCA2","BRCA1","TP53"], value="BRCA2", label="Gene")
|
| 665 |
+
b1 = gr.Button("Find miRNAs", variant="primary")
|
| 666 |
+
o1 = gr.Dataframe(label="Top 5 downregulated miRNAs")
|
| 667 |
+
gr.Examples([["BRCA2"],["BRCA1"],["TP53"]], inputs=[g1])
|
| 668 |
+
b1.click(predict_mirna, [g1], o1)
|
| 669 |
+
# R2 · siRNA SL
|
| 670 |
+
with gr.TabItem("R2 · siRNA SL"):
|
| 671 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 672 |
+
with gr.TabItem("R2a · TP53 siRNA"):
|
| 673 |
+
gr.HTML(proj_badge("S1-B · R2a", "siRNA Synthetic Lethal — TP53-null"))
|
| 674 |
+
g2 = gr.Dropdown(["LUAD","BRCA","COAD"], value="LUAD", label="Cancer type")
|
| 675 |
+
b2 = gr.Button("Find Targets", variant="primary")
|
| 676 |
+
o2 = gr.Dataframe(label="Top 5 synthetic lethal targets")
|
| 677 |
+
gr.Examples([["LUAD"],["BRCA"],["COAD"]], inputs=[g2], cache_examples=False)
|
| 678 |
+
b2.click(predict_sirna, [g2], o2)
|
| 679 |
+
# R3 · lncRNA + ASO
|
| 680 |
+
with gr.TabItem("R3 · lncRNA + ASO"):
|
| 681 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 682 |
+
with gr.TabItem("R3a · lncRNA-TREM2"):
|
| 683 |
+
gr.HTML(proj_badge("S1-B · R3a", "lncRNA-TREM2 ceRNA Network"))
|
| 684 |
+
b3a = gr.Button("Load ceRNA", variant="primary")
|
| 685 |
+
o3a = gr.Dataframe(label="ceRNA Network (R3a)")
|
| 686 |
+
b3a.click(lambda: pd.DataFrame(CERNA), [], o3a)
|
| 687 |
+
with gr.TabItem("R3b · ASO Designer"):
|
| 688 |
+
gr.HTML(proj_badge("S1-B · R3b", "ASO Designer"))
|
| 689 |
+
b3b = gr.Button("Load ASO Candidates", variant="primary")
|
| 690 |
+
o3b = gr.Dataframe(label="ASO Candidates (R3b)")
|
| 691 |
+
b3b.click(lambda: pd.DataFrame(ASO), [], o3b)
|
| 692 |
+
|
| 693 |
+
# 4. S1-C · PHYLO-DRUG
|
| 694 |
with gr.TabItem("💊 PHYLO-DRUG"):
|
| 695 |
gr.HTML(section_header(
|
| 696 |
"S1-C", "PHYLO-DRUG", "— Which molecule treats it",
|
| 697 |
+
"R1a FGFR3 ✅ · R1b SL drug mapping 🔶 · R2a m6A×Ferroptosis×Circadian 🔴⭐"
|
| 698 |
))
|
| 699 |
with gr.Tabs(elem_classes="inner-tabs"):
|
| 700 |
+
# R1 · RNA-directed drug
|
| 701 |
+
with gr.TabItem("R1 · RNA-directed drug"):
|
| 702 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 703 |
+
with gr.TabItem("R1a · FGFR3 RNA Drug"):
|
| 704 |
+
gr.HTML(proj_badge("S1-C · R1a", "FGFR3 RNA-Directed Drug Discovery", "top score 0.793"))
|
| 705 |
+
g4 = gr.Radio(["P1 (hairpin loop)","P10 (G-quadruplex)"],
|
| 706 |
+
value="P1 (hairpin loop)", label="Target pocket")
|
| 707 |
+
b4 = gr.Button("Screen Compounds", variant="primary")
|
| 708 |
+
o4t = gr.Dataframe(label="Top 5 candidates")
|
| 709 |
+
o4p = gr.Image(label="Binding scores")
|
| 710 |
+
gr.Examples([["P1 (hairpin loop)"],["P10 (G-quadruplex)"]], inputs=[g4])
|
| 711 |
+
b4.click(predict_drug, [g4], [o4t, o4p])
|
| 712 |
+
with gr.TabItem("R1b · SL Drug Mapping 🔶"):
|
| 713 |
+
gr.HTML(proj_badge("S1-C · R1b", "Synthetic Lethal Drug Mapping", "🔶 In progress"))
|
| 714 |
+
gr.Markdown("> In development. Coming soon.")
|
| 715 |
+
# R2 · Frontier
|
| 716 |
+
with gr.TabItem("R2 · Frontier"):
|
| 717 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 718 |
+
with gr.TabItem("R2a · m6A×Ferroptosis×Circadian 🔴⭐"):
|
| 719 |
+
gr.HTML(proj_badge("S1-C · R2a", "m6A × Ferroptosis × Circadian", "🔴 Frontier"))
|
| 720 |
+
gr.Markdown(
|
| 721 |
+
"> **Research gap:** This triple intersection has never been studied as an integrated system.\n\n"
|
| 722 |
+
"> **Planned datasets:** TCGA-PAAD · GEO m6A atlases · Circadian gene panels\n\n"
|
| 723 |
+
"> **Expected timeline:** Q3 2026"
|
| 724 |
+
)
|
| 725 |
|
| 726 |
+
# 5. S1-D · PHYLO-LNP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 727 |
with gr.TabItem("🧪 PHYLO-LNP"):
|
| 728 |
gr.HTML(section_header(
|
| 729 |
+
"S1-D", "PHYLO-LNP", "— How to deliver the drug",
|
| 730 |
+
"R1a Corona ✅ · R2a Flow ✅ · R3a Brain ✅ · R4a NLP ✅ · R5a CSF/BM 🔴⭐"
|
| 731 |
))
|
| 732 |
with gr.Tabs(elem_classes="inner-tabs"):
|
| 733 |
+
# R1 · Serum corona
|
| 734 |
+
with gr.TabItem("R1 · Serum corona"):
|
| 735 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 736 |
+
with gr.TabItem("R1a · LNP Corona ML"):
|
| 737 |
+
gr.HTML(proj_badge("S1-D · R1a", "LNP Protein Corona (Serum)", "AUC=0.791"))
|
| 738 |
+
with gr.Row():
|
| 739 |
+
sz = gr.Slider(50,300,value=100,step=1,label="Size (nm)")
|
| 740 |
+
zt = gr.Slider(-40,10,value=-5,step=1,label="Zeta (mV)")
|
| 741 |
+
with gr.Row():
|
| 742 |
+
pg = gr.Slider(0,5,value=1.5,step=0.1,label="PEG mol%")
|
| 743 |
+
lp = gr.Dropdown(["Ionizable","Cationic","Anionic","Neutral"],value="Ionizable",label="Lipid type")
|
| 744 |
+
b6 = gr.Button("Predict", variant="primary"); o6 = gr.Markdown()
|
| 745 |
+
gr.Examples([[100,-5,1.5,"Ionizable"],[80,5,0.5,"Cationic"]], inputs=[sz,zt,pg,lp])
|
| 746 |
+
b6.click(predict_corona, [sz,zt,pg,lp], o6)
|
| 747 |
+
# R2 · Flow corona
|
| 748 |
+
with gr.TabItem("R2 · Flow corona"):
|
| 749 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 750 |
+
with gr.TabItem("R2a · Flow Corona"):
|
| 751 |
+
gr.HTML(proj_badge("S1-D · R2a", "Flow Corona — Vroman Effect"))
|
| 752 |
+
with gr.Row():
|
| 753 |
+
s8 = gr.Slider(50,300,value=100,step=1,label="Size (nm)")
|
| 754 |
+
z8 = gr.Slider(-40,10,value=-5,step=1,label="Zeta (mV)")
|
| 755 |
+
pg8 = gr.Slider(0,5,value=1.5,step=0.1,label="PEG mol%")
|
| 756 |
+
with gr.Row():
|
| 757 |
+
ch8 = gr.Dropdown(["Ionizable","Cationic","Anionic","Neutral"],value="Ionizable",label="Charge")
|
| 758 |
+
fl8 = gr.Slider(0,40,value=20,step=1,label="Flow cm/s (aorta=40)")
|
| 759 |
+
b8 = gr.Button("Model Vroman Effect", variant="primary")
|
| 760 |
+
o8t = gr.Markdown(); o8p = gr.Image(label="Kinetics")
|
| 761 |
+
gr.Examples([[100,-5,1.5,"Ionizable",40],[150,5,0.5,"Cationic",10]], inputs=[s8,z8,pg8,ch8,fl8])
|
| 762 |
+
b8.click(predict_flow, [s8,z8,pg8,ch8,fl8], [o8t,o8p])
|
| 763 |
+
# R3 · Brain BBB
|
| 764 |
+
with gr.TabItem("R3 · Brain BBB"):
|
| 765 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 766 |
+
with gr.TabItem("R3a · LNP Brain"):
|
| 767 |
+
gr.HTML(proj_badge("S1-D · R3a", "LNP Brain Delivery"))
|
| 768 |
+
smi = gr.Textbox(label="Ionizable lipid SMILES",
|
| 769 |
+
value="CC(C)CC(=O)OCC(COC(=O)CC(C)C)OC(=O)CC(C)C")
|
| 770 |
+
with gr.Row():
|
| 771 |
+
pk = gr.Slider(4,8,value=6.5,step=0.1,label="pKa")
|
| 772 |
+
zt9 = gr.Slider(-20,10,value=-3,step=1,label="Zeta (mV)")
|
| 773 |
+
b9 = gr.Button("Predict BBB Crossing", variant="primary")
|
| 774 |
+
o9t = gr.Markdown(); o9p = gr.Image(label="Radar profile")
|
| 775 |
+
gr.Examples([["CC(C)CC(=O)OCC(COC(=O)CC(C)C)OC(=O)CC(C)C",6.5,-3]], inputs=[smi,pk,zt9])
|
| 776 |
+
b9.click(predict_bbb, [smi,pk,zt9], [o9t,o9p])
|
| 777 |
+
# R4 · NLP
|
| 778 |
+
with gr.TabItem("R4 · NLP"):
|
| 779 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 780 |
+
with gr.TabItem("R4a · AutoCorona NLP"):
|
| 781 |
+
gr.HTML(proj_badge("S1-D · R4a", "AutoCorona NLP", "F1=0.71"))
|
| 782 |
+
txt = gr.Textbox(lines=5,label="Paper abstract",placeholder="Paste abstract here...")
|
| 783 |
+
b10 = gr.Button("Extract Data", variant="primary")
|
| 784 |
+
o10j = gr.Code(label="Extracted JSON", language="json")
|
| 785 |
+
o10f = gr.Textbox(label="Validation flags")
|
| 786 |
+
gr.Examples([[
|
| 787 |
+
"LNPs composed of MC3, DSPC, Cholesterol (50:10:40 mol%) with 1.5% PEG-DMG. "
|
| 788 |
+
"Hydrodynamic diameter was 98 nm, zeta potential -3.2 mV, PDI 0.12. "
|
| 789 |
+
"Incubated in human plasma. Corona: albumin, apolipoprotein E, fibrinogen."
|
| 790 |
+
]], inputs=[txt])
|
| 791 |
+
b10.click(extract_corona, txt, [o10j, o10f])
|
| 792 |
+
# R5 · Exotic fluids
|
| 793 |
+
with gr.TabItem("R5 · Exotic fluids 🔴⭐"):
|
| 794 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 795 |
+
with gr.TabItem("R5a · CSF/Vitreous/BM"):
|
| 796 |
+
gr.HTML(proj_badge("S1-D · R5a", "LNP Corona in CSF · Vitreous · Bone Marrow", "🔴 0 prior studies"))
|
| 797 |
+
gr.Markdown(
|
| 798 |
+
"> **Research gap:** Protein corona has only been characterized in serum/plasma. "
|
| 799 |
+
"CSF, vitreous humor, and bone marrow interstitial fluid remain completely unstudied.\n\n"
|
| 800 |
+
"> **Target cancers:** DIPG (CSF) · UVM (vitreous) · pAML (bone marrow)\n\n"
|
| 801 |
+
"> **Expected timeline:** Q2–Q3 2026"
|
| 802 |
+
)
|
| 803 |
|
| 804 |
+
# 6. S1-E · PHYLO-BIOMARKERS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 805 |
with gr.TabItem("🩸 PHYLO-BIOMARKERS"):
|
| 806 |
gr.HTML(section_header(
|
| 807 |
+
"S1-E", "PHYLO-BIOMARKERS", "— Detect without biopsy",
|
| 808 |
+
"R1a Liquid Biopsy ✅ · R1b Protein validator 🔶"
|
| 809 |
))
|
| 810 |
with gr.Tabs(elem_classes="inner-tabs"):
|
| 811 |
+
with gr.TabItem("R1 · Liquid biopsy"):
|
| 812 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 813 |
+
with gr.TabItem("R1a · Liquid Biopsy"):
|
| 814 |
+
gr.HTML(proj_badge("S1-E · R1a", "Liquid Biopsy Classifier", "AUC=0.992*"))
|
| 815 |
+
with gr.Row():
|
| 816 |
+
p1=gr.Slider(-3,3,value=0,step=0.1,label="CTHRC1")
|
| 817 |
+
p2=gr.Slider(-3,3,value=0,step=0.1,label="FHL2")
|
| 818 |
+
p3=gr.Slider(-3,3,value=0,step=0.1,label="LDHA")
|
| 819 |
+
p4=gr.Slider(-3,3,value=0,step=0.1,label="P4HA1")
|
| 820 |
+
p5=gr.Slider(-3,3,value=0,step=0.1,label="SERPINH1")
|
| 821 |
+
with gr.Row():
|
| 822 |
+
p6=gr.Slider(-3,3,value=0,step=0.1,label="ABCA8")
|
| 823 |
+
p7=gr.Slider(-3,3,value=0,step=0.1,label="CA4")
|
| 824 |
+
p8=gr.Slider(-3,3,value=0,step=0.1,label="CKB")
|
| 825 |
+
p9=gr.Slider(-3,3,value=0,step=0.1,label="NNMT")
|
| 826 |
+
p10=gr.Slider(-3,3,value=0,step=0.1,label="CACNA2D2")
|
| 827 |
+
b7=gr.Button("Classify", variant="primary")
|
| 828 |
+
o7t=gr.HTML(); o7p=gr.Image(label="Feature contributions")
|
| 829 |
+
gr.Examples([[2,2,1.5,1.8,1.6,-1,-1.2,-0.8,1.4,-1.1],[0]*10],
|
| 830 |
+
inputs=[p1,p2,p3,p4,p5,p6,p7,p8,p9,p10])
|
| 831 |
+
b7.click(predict_cancer, [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10], [o7t,o7p])
|
| 832 |
+
with gr.TabItem("R1b · Protein Validator 🔶"):
|
| 833 |
+
gr.HTML(proj_badge("S1-E · R1b", "Protein Panel Validator", "🔶 In progress"))
|
| 834 |
+
gr.Markdown("> Coming next — validates R1a results against GEO plasma proteomics datasets.")
|
| 835 |
+
|
| 836 |
+
# 7. S1-F · PHYLO-RARE
|
|
|
|
|
|
|
|
|
|
|
|
|
| 837 |
with gr.TabItem("🧠 PHYLO-RARE"):
|
| 838 |
gr.HTML(section_header(
|
| 839 |
"S1-F", "PHYLO-RARE", "— Where almost nobody has looked yet",
|
| 840 |
+
"<b style='color:#ef4444'>⚠️ <300 cases/yr · <5% survival · 0–1 prior studies per gap</b><br>"
|
| 841 |
+
"R1a DIPG 🔶 · R2a UVM 🔶 · R3a pAML 🔶"
|
|
|
|
|
|
|
| 842 |
))
|
| 843 |
with gr.Tabs(elem_classes="inner-tabs"):
|
| 844 |
+
# R1 · DIPG
|
| 845 |
+
with gr.TabItem("R1 · DIPG"):
|
| 846 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 847 |
+
with gr.TabItem("R1a · DIPG Toolkit"):
|
| 848 |
+
gr.HTML(proj_badge("S1-F · R1a", "DIPG Toolkit", "PBTA · GSE126319"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 849 |
gr.Markdown(
|
| 850 |
+
"> **Why DIPG?** Diffuse Intrinsic Pontine Glioma — median survival 9–11 months. "
|
| 851 |
+
"H3K27M oncohistone in **78%** cases. "
|
| 852 |
+
"CSF delivery is the only viable route past the brainstem BBB. "
|
| 853 |
+
"Circadian disruption (BMAL1 suppression) newly linked — **0 prior LNP studies**."
|
|
|
|
|
|
|
| 854 |
)
|
| 855 |
+
with gr.Tabs():
|
| 856 |
+
with gr.TabItem("Variants"):
|
| 857 |
+
sort_d = gr.Radio(["Frequency", "Drug status"], value="Frequency", label="Sort by")
|
| 858 |
+
b_dv = gr.Button("Load DIPG Variants", variant="primary")
|
| 859 |
+
o_dv = gr.Dataframe(label="H3K27M co-mutations · PBTA/GSE126319")
|
| 860 |
+
b_dv.click(dipg_variants, [sort_d], o_dv)
|
| 861 |
+
with gr.TabItem("CSF LNP"):
|
| 862 |
+
with gr.Row():
|
| 863 |
+
d_peg = gr.Slider(0.5, 3.0, value=1.5, step=0.1, label="PEG mol%")
|
| 864 |
+
d_size = gr.Slider(60, 150, value=90, step=5, label="Target size (nm)")
|
| 865 |
+
b_dc = gr.Button("Rank CSF Formulations", variant="primary")
|
| 866 |
+
o_dct = gr.Dataframe(label="CSF LNP ranking")
|
| 867 |
+
o_dcp = gr.Image(label="ApoE% in CSF corona")
|
| 868 |
+
b_dc.click(dipg_csf, [d_peg, d_size], [o_dct, o_dcp])
|
| 869 |
+
with gr.TabItem("Research Gap"):
|
| 870 |
+
gr.Markdown(
|
| 871 |
+
"**Data:** PBTA (n=240) · GSE126319 (n=28) · GTEx circadian genes\n\n"
|
| 872 |
+
"| Layer | Known | This study gap |\n"
|
| 873 |
+
"|-------|-------|----------------|\n"
|
| 874 |
+
"| Genomics | H3K27M freq=78% | H3K27M × BMAL1/CLOCK |\n"
|
| 875 |
+
"| Delivery | CED convection | LNP corona **in CSF** |\n"
|
| 876 |
+
"| Biology | PRC2 inhibition | Ferroptosis in H3K27M+ DIPG |"
|
| 877 |
+
)
|
| 878 |
+
# R2 · UVM
|
| 879 |
+
with gr.TabItem("R2 · UVM"):
|
| 880 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 881 |
+
with gr.TabItem("R2a · UVM Toolkit"):
|
| 882 |
+
gr.HTML(proj_badge("S1-F · R2a", "UVM Toolkit", "TCGA-UVM n=80"))
|
| 883 |
gr.Markdown(
|
| 884 |
+
"> **Why UVM?** Uveal Melanoma — metastatic 5-yr survival **15%**. "
|
| 885 |
+
"GNAQ/GNA11 mutations in 78% cases. "
|
| 886 |
+
"Vitreous humor protein corona has **never been profiled**. "
|
| 887 |
+
"METTL3/WTAP upregulated in GNAQ+ tumors — 0 therapeutic studies."
|
|
|
|
|
|
|
| 888 |
)
|
| 889 |
+
with gr.Tabs():
|
| 890 |
+
with gr.TabItem("Variants + m6A"):
|
| 891 |
+
b_uv = gr.Button("Load UVM Variants", variant="primary")
|
| 892 |
+
o_uv = gr.Dataframe(label="GNAQ/GNA11 map · TCGA-UVM")
|
| 893 |
+
b_uv.click(uvm_variants, [], o_uv)
|
| 894 |
+
with gr.TabItem("Vitreous LNP"):
|
| 895 |
+
b_uw = gr.Button("Rank Vitreous Formulations", variant="primary")
|
| 896 |
+
o_uwt = gr.Dataframe(label="Vitreous LNP retention ranking")
|
| 897 |
+
o_uwp = gr.Image(label="Retention (hours)")
|
| 898 |
+
b_uw.click(uvm_vitreous, [], [o_uwt, o_uwp])
|
| 899 |
+
with gr.TabItem("Research Gap"):
|
| 900 |
+
gr.Markdown(
|
| 901 |
+
"**Data:** TCGA-UVM (n=80) · GEO m6A atlases · Vitreous proteomics\n\n"
|
| 902 |
+
"| Layer | Known | This study gap |\n"
|
| 903 |
+
"|-------|-------|----------------|\n"
|
| 904 |
+
"| Genomics | GNAQ/GNA11 mutations | m6A landscape GNAQ+ vs GNA11+ |\n"
|
| 905 |
+
"| Delivery | Intravitreal injection | LNP corona **in vitreous humor** |\n"
|
| 906 |
+
"| Biology | PLCβ→PKC→MAPK | GNAQ × METTL3 × YTHDF2 axis |"
|
| 907 |
+
)
|
| 908 |
+
# R3 · pAML
|
| 909 |
+
with gr.TabItem("R3 · pAML"):
|
| 910 |
+
with gr.Tabs(elem_classes="sub-sub-tabs"):
|
| 911 |
+
with gr.TabItem("R3a · pAML Toolkit"):
|
| 912 |
+
gr.HTML(proj_badge("S1-F · R3a", "pAML Toolkit", "TARGET-AML n≈197"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 913 |
gr.Markdown(
|
| 914 |
+
"> **Why pAML?** Pediatric AML — relapse OS **<30%**. "
|
| 915 |
+
"FLT3-ITD in 25% cases. "
|
| 916 |
+
"Bone marrow niche LNP corona: **never studied**. "
|
| 917 |
+
"Ferroptosis–FLT3 intersection: 0 prior studies (FerrDb v2 confirmed)."
|
|
|
|
|
|
|
| 918 |
)
|
| 919 |
+
with gr.Tabs():
|
| 920 |
+
with gr.TabItem("Ferroptosis Explorer"):
|
| 921 |
+
var_sel = gr.Dropdown(
|
| 922 |
+
["FLT3-ITD", "NPM1 c.860_863dupTCAG", "DNMT3A p.R882H",
|
| 923 |
+
"CEBPA biallelic", "IDH1/2 mutation"],
|
| 924 |
+
value="FLT3-ITD", label="Select variant"
|
| 925 |
+
)
|
| 926 |
+
b_pf = gr.Button("Analyze Ferroptosis Profile", variant="primary")
|
| 927 |
+
o_pft = gr.HTML()
|
| 928 |
+
o_pfp = gr.Image(label="Target radar")
|
| 929 |
+
b_pf.click(paml_ferroptosis, var_sel, [o_pft, o_pfp])
|
| 930 |
+
with gr.TabItem("BM Niche LNP"):
|
| 931 |
+
gr.Dataframe(
|
| 932 |
+
value=pd.DataFrame(PAML_BM_LNP),
|
| 933 |
+
label="Bone marrow niche LNP candidates · TARGET-AML context"
|
| 934 |
+
)
|
| 935 |
+
with gr.TabItem("Research Gap"):
|
| 936 |
+
gr.Markdown(
|
| 937 |
+
"**Data:** TARGET-AML (n=197) · BeatAML · FerrDb v2\n\n"
|
| 938 |
+
"| Layer | Known | This study gap |\n"
|
| 939 |
+
"|-------|-------|----------------|\n"
|
| 940 |
+
"| Genomics | FLT3-ITD → Midostaurin | FLT3-ITD × GPX4/SLC7A11 |\n"
|
| 941 |
+
"| Delivery | Liposomal daunorubicin | LNP corona **in bone marrow** |\n"
|
| 942 |
+
"| Biology | Midostaurin inhibits FLT3 | Ferroptosis SL + FLT3i |"
|
| 943 |
+
)
|
| 944 |
+
|
| 945 |
+
# 8. Journal
|
| 946 |
with gr.TabItem("📓 Journal"):
|
| 947 |
gr.Markdown("### Lab Journal\nEvery tool call auto-logged with project code.")
|
| 948 |
with gr.Row():
|
| 949 |
note_text = gr.Textbox(label="📝 Observation", placeholder="What did you discover?", lines=3)
|
| 950 |
+
note_tab = gr.Textbox(label="Project code (e.g. S1-A-R1a)", value="General")
|
| 951 |
note_last = gr.Textbox(visible=False)
|
| 952 |
save_btn = gr.Button("💾 Save", variant="primary")
|
| 953 |
save_msg = gr.Markdown()
|
| 954 |
journal_df = gr.Dataframe(label="📋 Full History", value=load_journal(), interactive=False)
|
| 955 |
refresh_btn = gr.Button("🔄 Refresh")
|
| 956 |
refresh_btn.click(load_journal, [], journal_df)
|
| 957 |
+
save_btn.click(save_note, [note_text, note_tab, note_last], [save_msg, journal_df])
|
| 958 |
|
| 959 |
+
# 9. Learning
|
| 960 |
with gr.TabItem("📚 Learning"):
|
| 961 |
gr.Markdown("""
|
| 962 |
## 🧪 Guided Investigations — S1 Biomedical
|
| 963 |
> 🟢 Beginner → 🟡 Intermediate → 🔴 Advanced
|
| 964 |
|
| 965 |
---
|
| 966 |
+
### 🟢 Case 1 · S1-A · R1a
|
| 967 |
**Why does the same position give two different outcomes?**
|
| 968 |
+
1. PHYLO-GENOMICS → R1a · OpenVariant → `BRCA1:p.R1699Q` → Benign
|
| 969 |
2. Enter `BRCA1:p.R1699W` → Pathogenic
|
| 970 |
3. Same position, different amino acid — Q (polar) vs W (bulky-aromatic)
|
| 971 |
|
| 972 |
---
|
| 973 |
+
### 🟢 Case 2 · S1-D · R1a + R3a
|
| 974 |
**How does PEG% control which protein coats the nanoparticle?**
|
| 975 |
+
1. PHYLO-LNP → R1a · Corona → Ionizable, Zeta=−5, PEG=**0.5%** → note protein
|
| 976 |
2. Change PEG=**2.5%** → compare
|
| 977 |
+
3. R3a · Brain → pKa=6.5 → check ApoE%
|
| 978 |
|
| 979 |
---
|
| 980 |
+
### 🟡 Case 3 · S1-D · R2a
|
| 981 |
**Does blood flow reshape the corona over time?**
|
| 982 |
+
1. PHYLO-LNP → R2a · Flow → Flow=0 → observe ApoE curve
|
| 983 |
2. Flow=40 (arterial) → compare
|
| 984 |
3. At what minute does ApoE dominate?
|
| 985 |
|
| 986 |
---
|
| 987 |
+
### 🟡 Case 4 · S1-B · R2a
|
| 988 |
**Which cancer has the most novel (undrugged) siRNA targets?**
|
| 989 |
+
1. PHYLO-RNA → R2a · siRNA → LUAD → count "Novel"
|
| 990 |
2. Repeat BRCA, COAD
|
| 991 |
|
| 992 |
---
|
| 993 |
+
### 🔴 Case 5 · S1-E · R1a
|
| 994 |
**Minimum protein signal that flips to CANCER?**
|
| 995 |
+
1. PHYLO-BIOMARKERS → R1a · Liquid Biopsy → all=0 → HEALTHY
|
| 996 |
2. Set CTHRC1=2.5, FHL2=2.0, LDHA=1.8 → observe
|
| 997 |
3. Reset. Increase only CTHRC1 step by step.
|
| 998 |
|
| 999 |
---
|
| 1000 |
+
### 🔴 Case 6 · Cross-tool convergence
|
| 1001 |
+
1. PHYLO-RNA → R1a · miRNA → TP53 → find top targets (BCL2, CDK6)
|
| 1002 |
+
2. PHYLO-DRUG → R1a · FGFR3 → check CDK6 pathway overlap
|
| 1003 |
+
3. PHYLO-RNA → R2a · siRNA → BRCA → does CDK6 appear?
|
| 1004 |
|
| 1005 |
---
|
| 1006 |
### 📖 Tool Index
|
| 1007 |
| Code | Module | Tool | Metric |
|
| 1008 |
|------|--------|------|--------|
|
| 1009 |
+
| S1-A·R1a | PHYLO-GENOMICS | OpenVariant | AUC=0.939 |
|
| 1010 |
+
| S1-B·R1a | PHYLO-RNA | miRNA silencing | top: hsa-miR-148a |
|
| 1011 |
+
| S1-B·R2a | PHYLO-RNA | siRNA SL | SPC24 top LUAD |
|
| 1012 |
+
| S1-B·R3a | PHYLO-RNA | lncRNA-TREM2 | CYTOR→AKT1 |
|
| 1013 |
+
| S1-C·R1a | PHYLO-DRUG | FGFR3 drug | score=0.793 |
|
| 1014 |
+
| S1-D·R1a | PHYLO-LNP | Corona | AUC=0.791 |
|
| 1015 |
+
| S1-D·R2a | PHYLO-LNP | Flow Vroman | 3–4× faster |
|
| 1016 |
+
| S1-D·R3a | PHYLO-LNP | LNP Brain | pKa 6.2–6.8 |
|
| 1017 |
+
| S1-E·R1a | PHYLO-BIOMARKERS | Liquid Biopsy | AUC=0.992* |
|
| 1018 |
+
| S1-D·R4a | PHYLO-LNP | AutoCorona NLP | F1=0.71 |
|
| 1019 |
""")
|
| 1020 |
|
| 1021 |
gr.Markdown(
|