OpenIslet

scripts/harvest_corpus.py

OpenIslet.org (Project Islet-1) — Multi-Source Corpus Finder & Harvester (v0.3)

script Release v0.8.0 gen-eb955f8266035aba 60 KB · 5 sections

Use this file in any AI chat (paste-only or attachment-capable):

Download as text (.txt) Download section (.txt)

Pinned raw file: https://openislet.org/files/gen-eb955f8266035aba/scripts/harvest_corpus.py · SHA-256: c61503b386f1f486…

#!/usr/bin/env python3
"""
OpenIslet.org (Project Islet-1) — Multi-Source Corpus Finder & Harvester (v0.3)
Discovers and deduplicates primary experimental sources across 8 Discovery Channels:
  1. PubMed 4-Pillar Expanded Core Queries (9 sub-pillars covering all 5 Gates & 12 Failure Modes)
  2. PubMed Wide-Net Sensitivity Queries (--mode wide)
  3. Europe PMC Full-Text Body Target Discovery (catches 26 target genes in Results/Tables of SC-islet papers)
  4. Preprint Server Discovery via Europe PMC (SRC:PPR — bioRxiv, medRxiv, Research Square)
  5. 1-Hop Citation-Graph Snowballing (forward citations + backward references of 44 Golden Seed PMIDs)
  6. HPAP (Human Pancreas Analysis Program) & nPOD Primary Human T1D Islet Multi-Omics Sub-Corpus
  7. Patent Literature Discovery via Europe PMC (SRC:PAT — WIPO/EPO/USPTO SC-islet & hypoimmune patents)
  8. NCBI GEO (GSE) Functional Genomics, CRISPR Screen & Single-Cell Datasets + Linked PMIDs
Includes built-in recall verification against the 44-paper Golden Benchmark Seed Set and Multi-Pillar Overlap Matrix.
"""

import argparse
import json
import os
import time
import urllib.parse
import urllib.request
import xml.etree.ElementTree as ET
from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent.parent
RAW_DIR = BASE_DIR / "data" / "raw"

# 44 Verified Primary Experimental Golden Benchmark Seed PMIDs spanning all 12 Failure Modes (FM-1..FM-12) and all 5 Gates
GOLDEN_SEED_PMIDS = {
    # Gate 1 / FM-12: SC-Islet Differentiation, Maturation & Alpha/Delta Paracrine Cytoarchitecture
    "25303535": "Pagliuca/Melton 2014 Cell (First functional human SC-beta cells)",
    "27163171": "Millman/Melton 2016 Nat Commun (T1D patient iPSC-derived SC-beta cells)",
    "32094658": "Hogrebe/Millman 2020 Nat Biotechnol (Latrunculin A cytoskeleton-guided SC-islets)",
    "35241836": "Balboa/Otonkoski 2022 Nat Biotechnol (Stage 7 functional & metabolic maturation of SC-islets)",
    "32846125": "Augsornworawat/Millman 2020 Cell Rep (scRNA-seq maturation of SC-islets post-transplant)",
    "37188763": "Augsornworawat/Millman 2023 Nat Cell Biol (snMulti-omics of SC-islets & enterochromaffin off-targets)",
    "38684699": "Wu/Deng 2024 Cell Discov (Endoderm stem cell-derived islet tissue in human patient)",
    "30412052": "Balboa/Otonkoski 2018 Nat Genet (INS mutations in iPSC beta-cell development)",
    "24658304": "Rodriguez-Diaz/Caicedo 2014 Nat Med (Alpha-cell paracrine cholinergic signaling in human islets)",
    "28325479": "Chambers/Seeley 2017 Cell Metab (Role of pancreatic preproglucagon / intra-islet GLP-1 in glucose homeostasis)",
    "16461897": "Cabrera/Caicedo 2006 PNAS (Unique cytoarchitecture of human vs rodent pancreatic islets)",
    # Gate 2 & 3 / FM-1, FM-2, FM-3, FM-4: Hypoimmune Cloaking, HLA-C Retention, Autoantigens & Neoantigens
    "30853558": "Xu/Yamanaka 2019 Cell Stem Cell (HLA-A/B/CIITA KO + matched HLA-C retained iPSC superdonors)",
    "30778232": "Deuse/Schrepfer 2019 Nat Biotechnol (B2M/CIITA KO + CD47 hypoimmunogenic iPSCs)",
    "37156915": "Hu/Schrepfer 2024 Nat Biotechnol (Hypoimmune iPSC islets survive in allogeneic NHP)",
    "37043559": "Hu/Schrepfer 2023 Cell Stem Cell (Hypoimmune primary human islets evade allogeneic and autoimmune rejection)",
    "38335966": "Hu/Schrepfer 2024 Sci Transl Med (Hypoimmune pseudoislets cure diabetes in allogeneic rhesus macaques)",
    "39758817": "Schrepfer 2025 Cell Stem Cell (Hypoimmune islet transplantation survival and CD47 threshold insights)",
    "34407395": "Parent/Hebrok 2021 Cell Rep (Selective HLA deletion retaining HLA-A2 and HLA-E in human SC-beta cells)",
    "32814902": "Yoshihara/Evans 2020 Nature (WNT4 + inducible PD-L1 immune-evasive human islet-like organoids)",
    "36599351": "Gerace/Melton 2023 Cell Rep Med (Engineering human SC-islets with IL-10/TGFb/IL-2 to promote tolerance)",
    "36055241": "Sintov/Melton 2022 Cell Stem Cell (Whole-genome CRISPR screen in SC-islets identifies JAK/STAT/CXCL10 axis)",
    "29844327": "Osum/Fife 2018 J Autoimmun (IFN-gamma drives PD-L1 on islet beta cells)",
    "30269996": "Colli/Eizirik/Richardson 2018 Diabetologia (PDL1 expressed in human T1D islets via IRF1)",
    "28263308": "Kracht/Roep 2017 Nat Med (Out-of-frame INS-DRiP neoantigen targeted by T1D CD8+ T-cells)",
    "42690930": "2026 Cell Rep (Engineering the insulin signal peptide via CHGA swap to protect human beta cells from autoimmune destruction without ER stress)",
    "26912858": "Delong/Haskins 2016 Science (Pathogenic CD4 T cells in T1D recognize Hybrid Insulin Peptides / HIPs)",
    # Gate 4 / FM-5, FM-6, FM-7, FM-8, FM-9: CRISPR Screens, TYK2, RNLS, SLC30A8, GAD65, IAPP Amyloid, CXADR
    "32719542": "Cai/Kissler 2020 Nat Metab (Genome-scale in vivo CRISPR screen identifies RNLS for beta-cell protection)",
    "39988068": "Kissler 2025 (Renalase inhibition defends against acute and chronic beta-cell stress)",
    "36289205": "Chandra/Otonkoski 2022 Nat Commun (TYK2 regulates beta-cell development and responses to IFN-alpha)",
    "32444635": "Colli/Eizirik 2020 Nat Commun (Multi-omics landscape of IFN-alpha responses in human beta cells)",
    "31900242": "Demine/Eizirik 2020 Cells (Pro-inflammatory cytokines & ER stress in human iPSC-derived beta cells)",
    "24584071": "Flannick 2014 Nat Genet (Loss-of-function mutations in SLC30A8 protect against diabetes)",
    "31676859": "Dwivedi/Groop 2019 Nat Genet (Loss of ZnT8/SLC30A8 function protects against diabetes by enhanced insulin secretion)",
    "32432213": "Menegaz/Phelps 2020 Nat Metab (Pulsatile GABA secretion from cytosolic GAD65 in the human beta cell)",
    "20699420": "Keenan/King 2010 Diabetes (Joslin 50-Year Medalist residual insulin production & beta-cell survival)",
    "18753660": "Westermark 2008 NEJM (Widespread amyloid deposition in transplanted human pancreatic islets)",
    "23086037": "Masters/O'Neill 2013 (IAPP/NLRP3 inflammasome activation in diabetes)",
    "19641142": "Tanaka 2009 Diabetes (Enterovirus infection, CXCL10, and CXCR3 circuit in beta-cell failure)",
    "30074059": "Ifie/Richardson 2018 Diabetologia (Secretory granule CAR-SIV / CXADR isoform in human pancreatic beta cells)",
    "23737756": "Nogueira/Eizirik 2013 PLoS Genet (GLIS3 modulates beta-cell apoptosis via Bim splicing)",
    "19336676": "Moore/Eizirik 2009 Diabetes (PTPN2 modulates IFN-gamma-induced beta-cell apoptosis)",
    "22442301": "Xu/Shalev 2012 Diabetes (Verapamil/calcium channel blockers suppress TXNIP and prevent beta-cell loss)",
    # Gate 5 / FM-10, FM-11: Vascular Inosculation, Pre-vascularization, Oxygen Scaffolds, FasL Microgels, IBMIR
    "33135383": "Rambaughty/Laschke 2021 (Fusion of islet cells with functional microvascular blood vessels)",
    "34480863": "Aghazadeh/Nostro 2021 Sci Transl Med (Microvessels support engraftment of human islets and hESC progenitors)",
    "35559682": "Lei/Garcia 2022 Sci Adv (FasL microgels with allogeneic islets in nonhuman primates without chronic immunosuppression)",
    # v0.4 Blind-Spot & 2025-2026 Frontier Seeds (T1D DR3/DR4 Endotypes, Mast Cells, PMNs, UP421 NEJM, HLA-B, INS 3'UTR RIDD, 5-Subtype PSC-Islets, Necroptosis/NETosis)
    "42671571": "Luckett/Oram/Richardson/Gaulton 2026 Diabetologia (HLA-DR3 mast-cell cRE vs HLA-DR4 T-cell/IL2 cRE stratified T1D GWAS)",
    "26276263": "Martino/De Tata 2015 Diabetologia (Mast cells infiltrate human T1D islets; histamine caspase-independent beta-cell death)",
    "41445610": "Luckett/EXE-T1D 2025 (Genetic risk in extremely early-onset <2 yr T1D across 6,773 cases)",
    "41758964": "Bonfield/EXE-T1D 2026 (Biallelic pathogenic IL2RA variants cause neonatal monogenic autoimmune diabetes)",
    "40757665": "Carlsson/Schrepfer 2025 NEJM (First-in-human UP421 B2M-/- CIITA-/- + CD47 allogeneic islet survival with no immunosuppression)",
    "40251154": "Hu/Schrepfer 2025 Nat Commun (PMN/neutrophil cytotoxicity against hypoimmune cells averted via CD99 + CD200)",
    "39824805": "Carre/Mallone 2025 Nat Commun (IFN-alpha promotes HLA-B-restricted conventional & alternative antigen presentation in human beta cells)",
    "40112799": "van Tienhoven/Roep 2025 Cell (Protective INS 3'UTR SNP rs3842752 creates IRE1a mRNA decay motif, reducing ER stress & INS-DRiP)",
    "40782792": "Meng/Deng 2025 Cell Stem Cell (Reconstructed 5-subtype alpha/beta/delta/epsilon/gamma human PSC-islets protect against hypoglycemia in vivo)",
    "41851084": "Misra/Nostro 2026 Nat Commun (Persistent NGN3 drives enterochromaffin off-targets; patterning maximizes human SC-islet yield)",
    "42856627": "Cochrane/Hebrok 2026 (MAFA vs senescent MAFA-S64F coordinates SC-islet metabolic maturation and stress resilience)",
    "41993274": "Martin-Vazquez/Eizirik 2026 (Bat-like ISG15 expression in alpha vs beta cells protects human islets from CVB1 & IFN-alpha)",
    "41093834": "Shibue/Kulkarni 2025 Nat Commun (Genome-wide CRISPR screen identifies SEC31A as key regulator of alpha-cell survival under ER stress)",
    "41951603": "Aggarwal/Pepper 2026 Cell Death Dis (RIPK1 inhibition with Necrostatin-1 blocks RIPK1/RIPK3/pMLKL necroptosis and improves human islet graft survival)",
    "41607298": "Lei/Huang 2026 Diabetes Obes Metab (PAD4-mediated neutrophil extracellular trap formation aggravates beta-cell damage in T1D)",
    "41218919": "Oshima/Scharfmann 2026 Diabetes (CD8+ T-cell killing of human beta cells via INS15-24 triggers inflammatory paracrine bystander dysfunction)",
}

CORE_PILLARS = {
    "Pillar1A_SC_Islet_Differentiation_Maturation": (
        '(("stem cell-derived islet*"[Title/Abstract] OR "stem-cell-derived islet*"[Title/Abstract] '
        'OR "SC-islet*"[Title/Abstract] OR "SC-beta cell*"[Title/Abstract] OR "SC-beta-cell*"[Title/Abstract] '
        'OR "iPSC-derived beta"[Title/Abstract] OR "hESC-derived beta"[Title/Abstract] '
        'OR "iPSC-derived islet*"[Title/Abstract] OR "hESC-derived islet*"[Title/Abstract] '
        'OR "stem cell-derived beta"[Title/Abstract] OR "stem-cell-derived beta"[Title/Abstract] '
        'OR "endoderm stem cell-derived islet*"[Title/Abstract] OR "CiPSC-islet*"[Title/Abstract] '
        'OR (("pluripotent stem cell*"[Title/Abstract] OR "iPSC*"[Title/Abstract] '
        'OR "hESC*"[Title/Abstract] OR "human embryonic stem cell*"[Title/Abstract]) '
        'AND ("pancreatic beta"[Title/Abstract] OR "pancreatic differentiation"[Title/Abstract] '
        'OR "beta-like cell*"[Title/Abstract] OR "insulin-producing cell*"[Title/Abstract] '
        'OR "islet-like"[Title/Abstract] OR "islet organoid*"[Title/Abstract] '
        'OR "endocrine progenitor*"[Title/Abstract] '
        'OR (("beta cell*"[Title/Abstract] OR "beta-cell*"[Title/Abstract]) '
        'AND ("differentiation"[Title/Abstract] OR "maturation"[Title/Abstract] '
        'OR "cytoskeleton"[Title/Abstract] OR "NKX6-1"[Title/Abstract] OR "NKX6.1"[Title/Abstract] '
        'OR "MAFA"[Title/Abstract] OR "enterochromaffin"[Title/Abstract] OR "SLC18A1"[Title/Abstract] '
        'OR "latrunculin"[Title/Abstract] OR "WNT4"[Title/Abstract] OR "Stage 6"[Title/Abstract] '
        'OR "Stage 7"[Title/Abstract]))))))'
    ),
    "Pillar1B_Islet_Paracrine_Alpha_Delta_Cytoarchitecture": (
        '(("human islet*"[Title/Abstract] OR "pancreatic islet*"[Title/Abstract] '
        'OR "islet*"[Title/Abstract] OR "SC-islet*"[Title/Abstract] '
        'OR "beta cell*"[Title/Abstract] OR "beta-cell*"[Title/Abstract]) '
        'AND ("cytoarchitecture"[Title/Abstract] OR "islet architecture"[Title/Abstract] '
        'OR ("paracrine"[Title/Abstract] AND ("GABA"[Title/Abstract] OR "acetylcholine"[Title/Abstract] OR "somatostatin"[Title/Abstract] OR "glucagon"[Title/Abstract] OR "cholinergic"[Title/Abstract] OR "GLP-1"[Title/Abstract])) '
        'OR ("pulsatile GABA"[Title/Abstract]) '
        'OR ("islet GLP-1"[Title/Abstract] OR ("pancreatic"[Title/Abstract] AND "preproglucagon"[Title/Abstract] AND "GLP-1"[Title/Abstract])) '
        'OR (("connexin-36"[Title/Abstract] OR "Cx36"[Title/Abstract] OR "GJD2"[Title/Abstract]) AND ("islet*"[Title/Abstract] OR "beta cell*"[Title/Abstract])) '
        'OR (("counter-regulat*"[Title/Abstract] OR "counterregulat*"[Title/Abstract]) AND "glucagon"[Title/Abstract] AND "islet*"[Title/Abstract])))'
    ),
    "Pillar2A_Islet_Hypoimmune_Cloaking_Autoantigens_Neoantigens": (
        '(("hypoimmun*"[Title/Abstract] OR "immune evasi*"[Title/Abstract] '
        'OR "immune cloaking"[Title/Abstract] OR "universal donor"[Title/Abstract] '
        'OR "localized immune tolerance"[Title/Abstract] '
        'OR "B2M"[Title/Abstract] OR "beta-2-microglobulin"[Title/Abstract] OR "beta2-microglobulin"[Title/Abstract] '
        'OR "CIITA"[Title/Abstract] OR "NLRC5"[Title/Abstract] '
        'OR "HLA-E"[Title/Abstract] OR "HLA-G"[Title/Abstract] OR "HLA-C"[Title/Abstract] '
        'OR ("HLA"[Title/Abstract] AND "selective"[Title/Abstract] AND "deletion"[Title/Abstract]) '
        'OR "CD47"[Title/Abstract] OR "SIRPalpha"[Title/Abstract] OR "SIRP-alpha"[Title/Abstract] '
        'OR "PD-L1"[Title/Abstract] OR "PDL1"[Title/Abstract] OR "CD274"[Title/Abstract] '
        'OR "FASL"[Title/Abstract] OR "Fas ligand"[Title/Abstract] OR "CTLA4-Ig"[Title/Abstract] '
        'OR "CD55"[Title/Abstract] OR "CD59"[Title/Abstract] OR "CD39"[Title/Abstract] OR "ENTPD1"[Title/Abstract] '
        'OR "hybrid insulin peptide*"[Title/Abstract] OR "peptide fusion"[Title/Abstract] '
        'OR "defective ribosomal"[Title/Abstract] OR "INS-DRiP*"[Title/Abstract] '
        'OR "neoantigen*"[Title/Abstract] OR "neo-epitope*"[Title/Abstract] OR "neoepitope*"[Title/Abstract] '
        'OR "epitope spreading"[Title/Abstract] OR "WE14"[Title/Abstract] '
        'OR (("GAD65"[Title/Abstract] OR "GAD2"[Title/Abstract] OR "ZnT8"[Title/Abstract] '
        'OR "IA-2"[Title/Abstract] OR "PTPRN"[Title/Abstract] OR "IGRP"[Title/Abstract] '
        'OR "preproinsulin"[Title/Abstract] OR "TSPAN7"[Title/Abstract]) '
        'AND ("epitope*"[Title/Abstract] OR "knockout"[Title/Abstract] OR "editing"[Title/Abstract] '
        'OR "autoreactive CD8*"[Title/Abstract] OR "ADCC"[Title/Abstract] OR "exocytosis"[Title/Abstract]))) '
        'AND ("islet*"[Title/Abstract] OR "pseudoislet*"[Title/Abstract] OR "beta cell*"[Title/Abstract] '
        'OR "beta-cell*"[Title/Abstract] OR "SC-islet*"[Title/Abstract] OR "EndoC-betaH1"[Title/Abstract]))'
    ),
    "Pillar2B_Foundational_StemCell_Hypoimmune_HLA_Engineering": (
        '(("pluripotent stem cell*"[Title/Abstract] OR "iPSC*"[Title/Abstract] OR "hESC*"[Title/Abstract]) '
        'AND ("hypoimmun*"[Title/Abstract] OR "universal donor"[Title/Abstract] '
        'OR "immune cloaking"[Title/Abstract] OR "immune compatibility"[Title/Abstract] '
        'OR ("B2M"[Title/Abstract] AND ("CIITA"[Title/Abstract] OR "HLA"[Title/Abstract])) '
        'OR ("HLA-C"[Title/Abstract] AND ("CIITA"[Title/Abstract] OR "HLA-A"[Title/Abstract])) '
        'OR ("HLA-E"[Title/Abstract] AND "B2M"[Title/Abstract]) '
        'OR ("CD47"[Title/Abstract] AND "B2M"[Title/Abstract])))'
    ),
    "Pillar2C_T1D_Endotypes_DR3_DR4_MastCell_PMN_UnconventionalT": (
        '((("type 1 diabetes"[Title/Abstract] OR "autoimmune diabetes"[Title/Abstract] OR "LADA"[Title/Abstract]) '
        'AND ("HLA-DR3"[Title/Abstract] OR "HLA-DR4"[Title/Abstract] OR "DR3-DQ2"[Title/Abstract] OR "DR4-DQ8"[Title/Abstract] '
        'OR "endotype*"[Title/Abstract] OR "T1DE1"[Title/Abstract] OR "T1DE2"[Title/Abstract] OR "EXE-T1D"[Title/Abstract]) '
        'AND ("pathway*"[Title/Abstract] OR "heterogeneity"[Title/Abstract] OR "cis-regulatory"[Title/Abstract] '
        'OR "mast cell*"[Title/Abstract] OR "insulitis"[Title/Abstract] OR "progression"[Title/Abstract])) '
        'OR (("mast cell*"[Title/Abstract] OR "histamine"[Title/Abstract] OR "NETosis"[Title/Abstract] '
        'OR "neutrophil extracellular trap*"[Title/Abstract] OR "PAD4"[Title/Abstract] OR "PADI4"[Title/Abstract] '
        'OR "polymorphonuclear"[Title/Abstract] OR "BTN3A1"[Title/Abstract] OR "MAIT cell*"[Title/Abstract] '
        'OR "CD99"[Title/Abstract] OR "CD200"[Title/Abstract]) '
        'AND ("islet*"[Title/Abstract] OR "beta cell*"[Title/Abstract] OR "beta-cell*"[Title/Abstract] '
        'OR "hypoimmun*"[Title/Abstract] OR "insulitis"[Title/Abstract])))'
    ),
    "Pillar3A_Intrinsic_BetaCell_CRISPR_Cytokine_ER_Stress_Targets": (
        '(("beta cell*"[Title/Abstract] OR "beta-cell*"[Title/Abstract] '
        'OR "pancreatic islet*"[Title/Abstract] OR "human islet*"[Title/Abstract] '
        'OR "islet*"[Title/Abstract] OR "SC-islet*"[Title/Abstract] OR "EndoC-betaH1"[Title/Abstract]) '
        'AND ("CRISPR"[Title/Abstract] OR "genetic screen*"[Title/Abstract] '
        'OR "genome-wide screen*"[Title/Abstract] OR "genome-scale"[Title/Abstract] '
        'OR "gene editing"[Title/Abstract] OR "base editing"[Title/Abstract] '
        'OR "prime editing"[Title/Abstract] OR "Perturb-seq"[Title/Abstract] '
        'OR "RNLS"[Title/Abstract] OR "renalase"[Title/Abstract] '
        'OR "TYK2"[Title/Abstract] OR "TET2"[Title/Abstract] OR "TNFAIP3"[Title/Abstract] '
        'OR ("A20"[Title/Abstract] AND ("NF-kappaB"[Title/Abstract] OR "NF-kB"[Title/Abstract] OR "apoptosis"[Title/Abstract] OR "transplant*"[Title/Abstract])) '
        'OR "SERPINB9"[Title/Abstract] OR "proteinase inhibitor 9"[Title/Abstract] OR "PI-9"[Title/Abstract] '
        'OR "GLIS3"[Title/Abstract] OR "PTPN2"[Title/Abstract] OR "TXNIP"[Title/Abstract] '
        'OR ("verapamil"[Title/Abstract] AND "diabetes"[Title/Abstract]) '
        'OR ("calcium channel blocker*"[Title/Abstract] AND "beta-cell*"[Title/Abstract]) '
        'OR "MANF"[Title/Abstract] OR "XBP1"[Title/Abstract] '
        'OR "SLC30A8"[Title/Abstract] OR ("ZnT8"[Title/Abstract] AND ("loss of ZnT8"[Title/Abstract] OR "loss-of-function"[Title/Abstract] OR "knockout"[Title/Abstract] OR "secretion"[Title/Abstract] OR "hypoxia"[Title/Abstract])) '
        'OR "G6PC2"[Title/Abstract] OR "TGM2"[Title/Abstract] OR "transglutaminase 2"[Title/Abstract] '
        'OR "IFIH1"[Title/Abstract] OR "MDA5"[Title/Abstract]) '
        'AND ("diabetes"[Title/Abstract] OR "autoimmun*"[Title/Abstract] '
        'OR "cytokine*"[Title/Abstract] OR "interferon*"[Title/Abstract] '
        'OR "ER stress"[Title/Abstract] OR "hypoxia"[Title/Abstract] '