Pathogenesis of inflammatory bowel fisease as pet robbins

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Loading Image
Loading Image
I now have everything needed for a comprehensive, well-illustrated answer. Let me compile the full response.

Pathogenesis of Inflammatory Bowel Disease (IBD)

As per Robbins Pathology (Robbins, Cotran & Kumar — Pathologic Basis of Disease; and Robbins & Kumar Basic Pathology)

IBD is a chronic inflammatory condition arising from a combination of abnormalities in immune regulation, host-microbe interactions, and epithelial barrier function in genetically susceptible individuals. It encompasses two entities: Crohn disease and ulcerative colitis.

Pathogenesis Model (Fig. 17.36 / Fig. 13.27)

Both Robbins editions present the same core model:
IBD Pathogenesis Model - Robbins Pathologic Basis of Disease
Fig. 17.36 from Robbins, Cotran & Kumar — Pathologic Basis of Disease: IBD pathogenesis incorporating dendritic cells, macrophages, CD4+ T cells, neutrophils, cytokine signaling, gut microbiome, and the intestinal epithelial barrier.
IBD Pathogenesis Model - Robbins Basic Pathology
Fig. 13.27 from Robbins & Kumar Basic Pathology.

Four Pillars of IBD Pathogenesis

1. Genetic Factors

  • Risk is increased with an affected family member. In Crohn disease, monozygotic twin concordance ~50%; in ulcerative colitis it is only ~20%, indicating genetics plays a lesser role in UC.
  • Over 200 IBD-associated risk alleles have been identified by GWAS, yet these account for less than 20% of disease risk in Crohn disease and even less in UC. IBD is therefore best understood as a polygenic disorder.
  • The most studied susceptibility gene is NOD2 (nucleotide oligomerization binding domain 2):
    • Encodes an intracellular sensor of muramyl dipeptide, a bacterial cell wall component.
    • On activation, it stimulates NF-κB.
    • Disease-associated NOD2 variants are believed to be ineffective at defending against luminal bacteria, allowing increased bacterial penetration through the epithelium into the intestinal wall where they trigger inflammatory reactions.
    • The three major NOD2 risk alleles are present in only ~30% of Crohn disease patients vs. 5% of healthy individuals.
    • NOD2 variants are rare in Asian and African populations, and PTPN22 variants increase Crohn disease risk but are protective in ulcerative colitis.
  • Multiple variants in autophagy-related genes (ATG16L1, IRGM) are also associated with Crohn disease. These genes encode components of the autophagosome pathway and are involved in host-cell responses to intracellular bacteria, supporting the hypothesis that inadequate bacterial clearance is important.
  • A notable exception to polygenic IBD: very-early-onset IBD (infantile colitis) can be monogenic, with mutations in IL10, IL10RA, IL10RB being most common.
  • IBD risk alleles overlap with those for type 1 diabetes, ankylosing spondylitis, and psoriasis.

2. Abnormal Mucosal Immune Responses

This is the central mechanism driving tissue injury.
  • The initial trigger is the presentation of microbial antigens to CD4+ helper T cells.
  • Cytokines such as IL-12 and IL-23 (released by dendritic cells and macrophages) induce differentiation of naive CD4+ T cells into Th1 and Th17 cells.
T cell subsetKey cytokines producedEffect
Th1IFN-γActivates macrophages → tissue damage
Th17IL-17, IL-22Recruits neutrophils, perpetuates inflammation
Th2 (more in UC)IL-13Mucosal barrier injury
  • Activated macrophages and Th1 cells release TNF, a key proinflammatory cytokine that perpetuates mucosal injury and is a major therapeutic target.
  • Dendritic cells also release IL-8, which recruits neutrophils.
  • Both Crohn disease and ulcerative colitis are characterized by mixed Th17/Th1 responses with some Th2 activation (particularly in UC with elevated IL-13).
  • Regulatory T cell defects: Normally, IL-10-producing regulatory T cells dampen mucosal immune responses. Rare mutations in IL-10 or its receptor (IL10RA, IL10RB) cause severe early-onset colitis, confirming the importance of this regulatory axis.
Therapeutic validation of immune mechanisms:
  • Anti-TNF biologics (effective in both CD and UC)
  • Anti-IL-12/23p40 antibodies (inhibit Th1 and Th17 activation)
  • Anti-IL-23 antibodies (inhibit Th17)
  • JAK inhibitors (block cytokine signaling)
  • Anti-α4β7-integrin antibodies / sphingosine-1-phosphate receptor antagonists (block lymphocyte trafficking)

3. Epithelial Barrier Dysfunction

  • The intestinal epithelial barrier normally limits interaction between luminal contents and the mucosal immune system.
  • Tight junction defects reduce barrier integrity - this is seen in Crohn disease patients and in ~10% of their healthy first-degree relatives. These relatives with barrier defects have a greater risk of developing IBD than relatives without barrier loss.
  • Barrier loss during remission predicts relapse of active Crohn disease.
  • Paneth cell granules (which contain antimicrobial peptides that shape luminal microbiota composition) are structurally and functionally abnormal in patients with Crohn disease who carry ATG16L1 mutations - the ATG16L1 mutation promotes degradation of this autophagy protein, impairing Paneth cell function.
  • This creates a defective "crosstalk" between epithelium and microbiota, contributing to disease.
  • Barrier dysfunction cosegregates with NOD2 polymorphisms and can activate both innate and adaptive mucosal immunity.

4. Changes in the Gut Microbiota (Dysbiosis)

  • The colon contains up to 10¹² organisms/mL of fecal material (50% of fecal mass).
  • Patients with IBD often show dysbiosis - shifts in microbial populations and reduced species diversity.
  • Dysbiosis is often established at disease presentation, but it is difficult to distinguish between microbial changes that trigger disease versus those caused by disease.
  • Unregulated immune responses to bacterial species in the microbiome underlie IBD, but the precise microbial triggers have not been identified.
  • The hygiene hypothesis (originally applied to asthma) proposes that childhood exposure to environmental microbes shapes regulatory immune responses; reduced enteric infections early in life (due to improved hygiene and food storage) results in inadequate development of regulatory processes limiting mucosal immune responses. This may partly explain the rising IBD incidence in previously low-prevalence regions (Africa, Asia, South America).
  • Microbial metabolites are an active area of investigation for new IBD therapies.
  • Fecal microbial transplants from healthy individuals and probiotic bacteria may benefit IBD patients (clinical trial data).

Summary: The Unifying Model

IBD arises when genetically predisposed individuals develop a failure of immune tolerance to their own gut microbiota, mediated by defects in the epithelial barrier and dysregulated mucosal immune responses (predominantly Th1/Th17-driven). The result is an inappropriately sustained inflammatory cascade that injures the bowel wall.
Genetic susceptibility (NOD2, ATG16L1, IL-10 axis)
         ↓
Epithelial barrier dysfunction → increased bacterial translocation
         ↓
Dendritic cells/macrophages sense bacterial products
         ↓
IL-12/IL-23 → CD4+ T cell differentiation → Th1, Th17 (and some Th2)
         ↓
IFN-γ, IL-17, TNF, IL-13 release
         ↓
Macrophage activation + neutrophil recruitment (via IL-8, IL-17)
         ↓
Chronic mucosal/transmural inflammation → tissue injury

Key Differences in Pathogenesis: Crohn vs. UC

FeatureCrohn DiseaseUlcerative Colitis
Genetic factorsStronger (50% twin concordance)Weaker (20% twin concordance)
NOD2/autophagy genesYesNo
Dominant T-cell responseTh1 + Th17Th2 (IL-13) + Th17
Transmural inflammationYesNo (mucosal only)
Barrier dysfunctionWell-establishedLess prominent
Granulomas~35% of casesNo

Sources: Robbins, Cotran & Kumar - Pathologic Basis of Disease (10th/latest ed.), Chapter 17, pp. 744-745; Robbins & Kumar Basic Pathology, Chapter 13, p. 577.

Make pdf in readable format white background

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"

Writing File

~/ibd-pathogenesis/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
import urllib.request
import os

OUTPUT = "/home/daytona/workspace/ibd-pathogenesis/IBD_Pathogenesis_Robbins.pdf"
os.makedirs("/home/daytona/workspace/ibd-pathogenesis", exist_ok=True)

# Download pathogenesis diagram
IMG_URL = "https://cdn.orris.care/cdss_images/bf21243e4ed4e92d7b5193fcc0b8f709bdfcda21f876716ccf2b843bc9cbeedf.png"
IMG_PATH = "/home/daytona/workspace/ibd-pathogenesis/pathogenesis_diagram.png"
if not os.path.exists(IMG_PATH):
    urllib.request.urlretrieve(IMG_URL, IMG_PATH)

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=2*cm,
    rightMargin=2*cm,
    topMargin=2*cm,
    bottomMargin=2*cm,
    title="Pathogenesis of Inflammatory Bowel Disease",
    author="Robbins Pathology"
)

W, H = A4
content_width = W - 4*cm

# ── Styles ──────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

title_style = ParagraphStyle(
    "MainTitle",
    fontSize=20,
    fontName="Helvetica-Bold",
    textColor=colors.HexColor("#1a3a5c"),
    spaceAfter=4,
    alignment=TA_CENTER,
)
subtitle_style = ParagraphStyle(
    "Subtitle",
    fontSize=11,
    fontName="Helvetica-Oblique",
    textColor=colors.HexColor("#4a6fa5"),
    spaceAfter=16,
    alignment=TA_CENTER,
)
h1_style = ParagraphStyle(
    "H1",
    fontSize=14,
    fontName="Helvetica-Bold",
    textColor=colors.white,
    spaceBefore=14,
    spaceAfter=6,
    leftIndent=0,
    borderPad=6,
    backColor=colors.HexColor("#1a3a5c"),
    leading=20,
)
h2_style = ParagraphStyle(
    "H2",
    fontSize=12,
    fontName="Helvetica-Bold",
    textColor=colors.HexColor("#1a3a5c"),
    spaceBefore=10,
    spaceAfter=4,
    borderPad=4,
    leftIndent=0,
    borderColor=colors.HexColor("#4a6fa5"),
    borderWidth=0,
    leading=16,
)
h3_style = ParagraphStyle(
    "H3",
    fontSize=11,
    fontName="Helvetica-BoldOblique",
    textColor=colors.HexColor("#2c5f8a"),
    spaceBefore=8,
    spaceAfter=3,
    leading=14,
)
body_style = ParagraphStyle(
    "Body",
    fontSize=10,
    fontName="Helvetica",
    textColor=colors.HexColor("#1a1a1a"),
    spaceAfter=6,
    leading=15,
    alignment=TA_JUSTIFY,
)
bullet_style = ParagraphStyle(
    "Bullet",
    fontSize=10,
    fontName="Helvetica",
    textColor=colors.HexColor("#1a1a1a"),
    spaceAfter=3,
    leading=14,
    leftIndent=16,
    bulletIndent=4,
    alignment=TA_LEFT,
)
sub_bullet_style = ParagraphStyle(
    "SubBullet",
    fontSize=10,
    fontName="Helvetica",
    textColor=colors.HexColor("#1a1a1a"),
    spaceAfter=2,
    leading=14,
    leftIndent=32,
    bulletIndent=20,
)
caption_style = ParagraphStyle(
    "Caption",
    fontSize=9,
    fontName="Helvetica-Oblique",
    textColor=colors.HexColor("#555555"),
    spaceAfter=8,
    alignment=TA_CENTER,
)
box_style = ParagraphStyle(
    "Box",
    fontSize=10,
    fontName="Helvetica",
    textColor=colors.HexColor("#1a1a1a"),
    spaceAfter=4,
    leading=15,
    leftIndent=8,
    rightIndent=8,
    alignment=TA_LEFT,
)
source_style = ParagraphStyle(
    "Source",
    fontSize=8,
    fontName="Helvetica-Oblique",
    textColor=colors.HexColor("#777777"),
    spaceAfter=4,
    alignment=TA_CENTER,
)

story = []

# ── Title Block ─────────────────────────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Pathogenesis of Inflammatory Bowel Disease", title_style))
story.append(Paragraph("As per Robbins, Cotran & Kumar — Pathologic Basis of Disease", subtitle_style))
story.append(HRFlowable(width=content_width, thickness=2, color=colors.HexColor("#1a3a5c"), spaceAfter=12))

# ── Introduction ────────────────────────────────────────────────────────────
story.append(Paragraph("Overview", h1_style))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
    "Inflammatory bowel disease (IBD) is a chronic inflammatory condition arising from a combination of "
    "<b>abnormalities in immune regulation, host-microbe interactions, and epithelial barrier function</b> "
    "in genetically susceptible individuals. IBD encompasses two entities: "
    "<b>Crohn disease</b> and <b>ulcerative colitis</b>.",
    body_style
))
story.append(Paragraph(
    "IBD is idiopathic; mechanisms are incompletely understood. The current model incorporates four major "
    "interacting pillars: genetic susceptibility, aberrant mucosal immunity, epithelial barrier dysfunction, "
    "and dysbiosis of the gut microbiota.",
    body_style
))

# ── Diagram ─────────────────────────────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
from reportlab.platypus import Image
try:
    img = Image(IMG_PATH, width=12*cm, height=10*cm)
    img.hAlign = "CENTER"
    story.append(img)
    story.append(Paragraph(
        "Fig. 17.36 — Model of IBD pathogenesis. Bacterial components cross the epithelial barrier and "
        "activate dendritic cells. IL-23 drives Th17 (→ IL-17) and IL-12 drives Th1 (→ IFN-γ) differentiation. "
        "Activated macrophages release TNF. IL-8 recruits neutrophils. Th2 cells produce IL-13 (elevated in UC). "
        "[Robbins, Cotran &amp; Kumar — Pathologic Basis of Disease]",
        caption_style
    ))
except Exception as e:
    story.append(Paragraph(f"[Diagram could not be embedded: {e}]", caption_style))

# ══ PILLAR 1 ════════════════════════════════════════════════════════════════
story.append(Paragraph("1.  Genetic Factors", h1_style))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph(
    "Risk for disease is increased when there is an affected family member. "
    "IBD is a <b>polygenic disorder</b> — over <b>200 IBD-associated risk alleles</b> have been identified "
    "by GWAS, yet these account for less than 20% of disease risk in Crohn disease and even less in UC.",
    body_style
))

story.append(Paragraph("Twin Concordance", h3_style))
data = [
    ["IBD Type", "Monozygotic Twin Concordance", "Implication"],
    ["Crohn Disease", "~50%", "Strong genetic component"],
    ["Ulcerative Colitis", "~20%", "Genetic factors less dominant"],
]
t = Table(data, colWidths=[4.5*cm, 5.5*cm, 5.5*cm])
t.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a3a5c")),
    ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
    ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",   (0,0), (-1,-1), 9),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.HexColor("#f0f4fa"), colors.white]),
    ("GRID",       (0,0), (-1,-1), 0.5, colors.HexColor("#c0cfe0")),
    ("ALIGN",      (0,0), (-1,-1), "CENTER"),
    ("VALIGN",     (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(Spacer(1, 0.4*cm))

story.append(Paragraph("NOD2 — Key Susceptibility Gene (Crohn Disease)", h3_style))
for pt in [
    "Encodes an intracellular sensor of <b>muramyl dipeptide</b>, a bacterial cell wall component.",
    "On activation, stimulates <b>NF-κB</b>.",
    "Disease-associated NOD2 variants are ineffective at defending against intestinal bacteria → increased bacterial penetration through epithelium → triggers inflammatory reactions.",
    "The three major NOD2 risk alleles are present in only ~30% of Crohn disease patients vs. 5% of healthy individuals; even homozygous risk alleles increase Crohn risk only ~20-fold.",
    "NOD2 variants are <b>rare in Asian and African populations</b> → underscores polygenic, population-variable nature of IBD.",
    "<b>PTPN22 variants</b>: increase Crohn disease risk but are <b>protective</b> in ulcerative colitis.",
]:
    story.append(Paragraph(f"• {pt}", bullet_style))

story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Autophagy Genes (Crohn Disease-specific)", h3_style))
for pt in [
    "<b>ATG16L1 and IRGM</b>: encode components of the autophagosome pathway involved in host-cell responses to intracellular bacteria and clearance of damaged organelles.",
    "The ATG16L1 Crohn-associated mutation promotes degradation of ATG16L1, limiting autophagy.",
    "Results in <b>structurally and functionally abnormal Paneth cell granules</b> → impaired secretion of antimicrobial peptides into the crypt lumen.",
    "These genes are <b>not associated with ulcerative colitis</b> and the associations hold mainly for people of European descent.",
]:
    story.append(Paragraph(f"• {pt}", bullet_style))

story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Monogenic (Very Early-Onset) IBD", h3_style))
story.append(Paragraph(
    "A notable exception to polygenic IBD is <b>very early-onset IBD (infantile colitis)</b>, which can be monogenic. "
    "Mutations in <b>IL10, IL10RA, and IL10RB</b> are most common, causing loss of IL-10-mediated immune regulation "
    "and severe early-onset colitis.",
    body_style
))

story.append(Paragraph("IBD Risk Allele Overlap with Other Immune Diseases", h3_style))
story.append(Paragraph(
    "IBD risk alleles overlap with those for <b>type 1 diabetes, ankylosing spondylitis, and psoriasis</b>. "
    "In most cases, specific polymorphisms have consistent effects across diseases, but some that increase IBD risk "
    "are protective in other diseases.",
    body_style
))

# ══ PILLAR 2 ════════════════════════════════════════════════════════════════
story.append(Paragraph("2.  Aberrant Mucosal Immune Responses", h1_style))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph(
    "This is the <b>central mechanism</b> driving tissue injury. The initial trigger is the presentation of "
    "microbial antigens to CD4+ helper T cells. Cytokines such as <b>IL-12 and IL-23</b> (released by dendritic "
    "cells and macrophages) induce differentiation of naive CD4+ T cells into <b>Th1 and Th17 cells</b>.",
    body_style
))

story.append(Paragraph("T-Cell Subsets and Their Effector Functions", h3_style))
data2 = [
    ["T-cell Subset", "Inducing Cytokine", "Key Cytokines Produced", "Main Effect"],
    ["Th1", "IL-12", "IFN-γ, TNF", "Macrophage activation → tissue damage (dominant in CD)"],
    ["Th17", "IL-23", "IL-17, IL-22", "Neutrophil recruitment, perpetuates inflammation"],
    ["Th2", "—", "IL-13", "Mucosal barrier injury (elevated in UC)"],
    ["T-reg", "IL-10 (self)", "IL-10 (anti-inflammatory)", "Dampens immune response — DEFECTIVE in IBD"],
]
t2 = Table(data2, colWidths=[2.5*cm, 3*cm, 4*cm, 6*cm])
t2.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#1a3a5c")),
    ("TEXTCOLOR",     (0,0), (-1,0), colors.white),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [colors.HexColor("#f0f4fa"), colors.white]),
    ("GRID",          (0,0), (-1,-1), 0.5, colors.HexColor("#c0cfe0")),
    ("ALIGN",         (0,0), (-1,-1), "LEFT"),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t2)
story.append(Spacer(1, 0.4*cm))

story.append(Paragraph("Key Cytokines in IBD", h3_style))
for pt in [
    "<b>TNF</b>: key proinflammatory cytokine released by activated macrophages and Th1 cells; perpetuates mucosal injury; major therapeutic target (anti-TNF biologics).",
    "<b>IL-12 / IL-23</b>: drive Th1 and Th17 differentiation respectively; targeted by anti-IL-12/23p40 antibodies and anti-IL-23 biologics.",
    "<b>IL-17</b>: recruits neutrophils and perpetuates mucosal inflammation (Th17-derived).",
    "<b>IL-13</b>: Th2-derived; increased in UC; promotes barrier dysfunction.",
    "<b>IFN-γ</b>: activates macrophages (Th1-derived).",
    "<b>IL-8</b>: released by dendritic cells; recruits neutrophils.",
    "<b>IL-10</b>: anti-inflammatory regulatory cytokine; loss-of-function mutations → severe early-onset IBD.",
]:
    story.append(Paragraph(f"• {pt}", bullet_style))

story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Therapeutic Validation of Immune Mechanisms", h3_style))
data3 = [
    ["Therapy Class", "Target", "Validated Mechanism"],
    ["Anti-TNF biologics\n(infliximab, adalimumab)", "TNF", "Inhibit inflammation; effective in both CD and UC"],
    ["Anti-IL-12/23p40\n(ustekinumab)", "IL-12/IL-23", "Inhibit Th1 and Th17 activation"],
    ["Anti-IL-23\n(risankizumab)", "IL-23", "Inhibit Th17 cells specifically"],
    ["JAK inhibitors\n(tofacitinib, upadacitinib)", "JAK/STAT signaling", "Block downstream cytokine signaling"],
    ["Anti-α4β7 integrin\n(vedolizumab)", "Lymphocyte trafficking", "Block gut-selective lymphocyte homing"],
    ["S1P receptor antagonists\n(ozanimod)", "Lymphocyte egress", "Block lymphocyte trafficking to gut"],
]
t3 = Table(data3, colWidths=[4.5*cm, 3.5*cm, 7.5*cm])
t3.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#1a3a5c")),
    ("TEXTCOLOR",     (0,0), (-1,0), colors.white),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [colors.HexColor("#f0f4fa"), colors.white]),
    ("GRID",          (0,0), (-1,-1), 0.5, colors.HexColor("#c0cfe0")),
    ("ALIGN",         (0,0), (-1,-1), "LEFT"),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t3)

# ══ PILLAR 3 ════════════════════════════════════════════════════════════════
story.append(Paragraph("3.  Epithelial Barrier Dysfunction", h1_style))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph(
    "The intestinal epithelial barrier normally limits interaction between luminal contents and the mucosal immune system. "
    "Partial loss of this barrier has been directly linked to IBD pathogenesis.",
    body_style
))

for pt in [
    "<b>Tight junction defects</b>: reduce barrier integrity in Crohn disease patients and in ~10% of their healthy first-degree relatives. Relatives with barrier defects have a greater risk of developing IBD.",
    "Barrier loss during <b>remission predicts relapse</b> of active Crohn disease.",
    "Barrier dysfunction <b>cosegregates with NOD2 polymorphisms</b> and can activate both innate and adaptive mucosal immunity.",
    "<b>Paneth cell dysfunction</b>: Paneth cell granules contain antimicrobial peptides that shape luminal microbiota composition. In patients with ATG16L1 mutations, Paneth cell granules are structurally and functionally abnormal → impaired antimicrobial peptide secretion → defective epithelium-microbiota crosstalk.",
    "A smaller group of monogenic IBD mutations encode epithelial proteins involved in intercellular adhesion, brush border digestion, ion transport, mucin secretion, and Paneth cell antimicrobial peptide secretion.",
]:
    story.append(Paragraph(f"• {pt}", bullet_style))

# ══ PILLAR 4 ════════════════════════════════════════════════════════════════
story.append(Paragraph("4.  Gut Microbiota — Dysbiosis", h1_style))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph(
    "The gut microbiome is composed of bacteria, fungi, and viruses. The colon contains up to "
    "<b>10¹² organisms/mL of fecal material</b> (50% of fecal mass), with significant interindividual variation "
    "in composition that is modified by diet and disease.",
    body_style
))

for pt in [
    "Patients with IBD often show <b>dysbiosis</b>: shifts in microbial populations and reduced species diversity.",
    "Dysbiosis is often established at disease presentation, but it is difficult to distinguish microbial changes that <b>trigger</b> disease from those <b>caused by</b> disease.",
    "Unregulated immune responses to bacterial species in the microbiome underlie IBD, but neither the specific microbial triggers nor the precise type of immune dysregulation have been fully defined.",
    "Recent research focuses on microbial <b>metabolites</b> and how these impact immune and epithelial function.",
    "<b>Fecal microbial transplants</b> from healthy individuals and probiotic bacteria may benefit IBD patients (clinical trial data).",
]:
    story.append(Paragraph(f"• {pt}", bullet_style))

story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("The Hygiene Hypothesis", h3_style))
story.append(Paragraph(
    "The hygiene hypothesis proposes that the rising IBD incidence in previously low-prevalence regions (Africa, Asia, "
    "South America) is related to improved food storage conditions, decreased food contamination, and changes in gut "
    "microbiome composition. Reduced enteric infections early in life result in inadequate development of regulatory "
    "processes that limit mucosal immune responses, allowing mucosa-associated microbes to trigger persistent "
    "inflammation in susceptible hosts.",
    body_style
))

# ══ Summary Pathway ══════════════════════════════════════════════════════════
story.append(Paragraph("Unifying Pathogenesis Pathway", h1_style))
story.append(Spacer(1, 0.2*cm))

pathway_data = [
    ["Step", "Event"],
    ["1", "Genetic susceptibility (NOD2, ATG16L1, IL-10 axis, >200 loci)"],
    ["2", "Epithelial barrier dysfunction → increased bacterial translocation into lamina propria"],
    ["3", "Dendritic cells & macrophages sense bacterial products via PRRs"],
    ["4", "IL-12/IL-23 release → CD4+ T cell differentiation into Th1 and Th17 (and some Th2 in UC)"],
    ["5", "IFN-γ, IL-17, TNF, IL-13 release → macrophage activation + neutrophil recruitment (via IL-8, IL-17)"],
    ["6", "Defective T-regulatory cell (IL-10) suppression → unchecked inflammation"],
    ["7", "Chronic mucosal/transmural inflammation → crypt destruction, ulceration, fibrosis, fistulae"],
]
tp = Table(pathway_data, colWidths=[1.2*cm, content_width - 1.2*cm])
tp.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#1a3a5c")),
    ("TEXTCOLOR",     (0,0), (-1,0), colors.white),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 9.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [colors.HexColor("#eaf0fb"), colors.HexColor("#f7f9fd")]),
    ("GRID",          (0,0), (-1,-1), 0.5, colors.HexColor("#c0cfe0")),
    ("ALIGN",         (0,0), (0,-1), "CENTER"),
    ("ALIGN",         (1,0), (1,-1), "LEFT"),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING",   (0,0), (-1,-1), 6),
    ("FONTNAME",      (0,1), (0,-1), "Helvetica-Bold"),
    ("TEXTCOLOR",     (0,1), (0,-1), colors.HexColor("#1a3a5c")),
]))
story.append(tp)

# ══ Comparison Table ══════════════════════════════════════════════════════════
story.append(Paragraph("Key Pathogenetic Differences: Crohn Disease vs. Ulcerative Colitis", h1_style))
story.append(Spacer(1, 0.2*cm))

comp_data = [
    ["Feature", "Crohn Disease", "Ulcerative Colitis"],
    ["Twin concordance", "~50% (stronger genetics)", "~20% (weaker genetics)"],
    ["NOD2 / autophagy genes", "Yes (strongly associated)", "No"],
    ["Dominant T-cell response", "Th1 + Th17", "Th2 (IL-13) + Th17"],
    ["TNF", "Elevated", "Elevated"],
    ["IFN-γ", "Markedly elevated", "Less elevated"],
    ["IL-13", "Mildly elevated", "Markedly elevated"],
    ["Transmural inflammation", "Yes — hallmark", "No — mucosal only"],
    ["Granulomas", "~35% of cases", "No"],
    ["Epithelial barrier dysfunction", "Well-established", "Less prominent"],
    ["Fistulae / fissures", "Yes", "No"],
    ["Distribution", "Any GI tract, skip lesions", "Colon only, diffuse"],
    ["Recurrence after surgery", "Common", "No (curative colectomy)"],
    ["Toxic megacolon", "No", "Yes"],
]
tc = Table(comp_data, colWidths=[5.5*cm, 4.7*cm, 5.3*cm])
tc.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#1a3a5c")),
    ("TEXTCOLOR",     (0,0), (-1,0), colors.white),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 9),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [colors.HexColor("#f0f4fa"), colors.white]),
    ("GRID",          (0,0), (-1,-1), 0.5, colors.HexColor("#c0cfe0")),
    ("ALIGN",         (0,0), (-1,-1), "LEFT"),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
    ("FONTNAME",      (0,1), (0,-1), "Helvetica-Bold"),
]))
story.append(tc)

# ── Footer ──────────────────────────────────────────────────────────────────
story.append(Spacer(1, 0.5*cm))
story.append(HRFlowable(width=content_width, thickness=1, color=colors.HexColor("#4a6fa5")))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
    "Sources: Robbins, Cotran &amp; Kumar — Pathologic Basis of Disease (latest edition), Chapter 17, pp. 744–745 | "
    "Robbins &amp; Kumar Basic Pathology, Chapter 13, p. 577",
    source_style
))

# ── Build ────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
Running Command

cd /home/daytona/workspace/ibd-pathogenesis && python generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/ibd-pathogenesis/IBD_Pathogenesis_Robbins.pdf

Your PDF is ready (724 KB):

IBD Pathogenesis Robbins

PDF Document · PDF

What's included in the PDF:
  • White background, clean A4 layout with justified text
  • Official pathogenesis diagram (Fig. 17.36) from Robbins embedded with caption
  • 4 detailed sections covering all pillars: Genetics, Mucosal Immunity, Epithelial Barrier, Dysbiosis
  • Tables: twin concordance, T-cell subsets & cytokines, IBD therapies with validated mechanisms, step-by-step pathogenesis pathway, and Crohn vs. UC comparison
  • Source citations at the footer referencing both Robbins editions
This is a shared conversation. Sign in to Orris to start your own chat.