I am derma resident , i have presentation on antigen presenting cell. Use first attached presentation for reference and make a power point presentation . make presentation like second attached file . i want simple presentation like attached second file( background white, text black)

Reading File
Reading File
Reading File
Running Command

cd /home/daytona/workspace && python -m markitdown "/home/daytona/workspace/atta…

Running Command

cd /home/daytona/workspace && python -m markitdown "/home/daytona/workspace/atta…

Running Command

cd /home/daytona/workspace && python3 -c " from pptx import Presentation import …

Running Command

cd /home/daytona/workspace && python3 -c " import fitz # PyMuPDF doc = fitz.ope…

Running Command

which node && node --version && ls /home/daytona/skills/pptx/

Running Command

# Try extracting PDF text with pdftotext pdftotext "/home/daytona/workspace/atta…

Running Command

pdftotext "/home/daytona/workspace/attachments/3ccaded2-78ff-4579-9180-d585ad8b5…

Running Command

# Extract pptx style info using python-pptx via pip install pip install python-p…

Running Command

python3 -c " from pptx import Presentation from pptx.util import Inches, Pt from…

Running Command

python3 -c " from pptx import Presentation from pptx.util import Inches, Pt impo…

Running Command

mkdir -p /home/daytona/workspace/apc-presentation && ls /home/daytona/workspace/…

Writing File

~/apc-presentation/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_4x3"; // 10" x 7.5" matching reference
pres.title = "Macrophage as Antigen Presenting Cell";

// ─── STYLE CONSTANTS ───────────────────────────────────────────────────────
const BG = "FFFFFF";
const BLACK = "000000";
const DARK_BLUE = "1F3864";
const MED_BLUE = "2E75B6";
const LIGHT_BLUE = "D6E4F0";
const ACCENT = "2E75B6";
const GRAY_LINE = "BFBFBF";

const TITLE_FONT = "Calibri";
const BODY_FONT = "Calibri";

// Title slide bar color
const TITLE_BAR = "1F3864";

// Slide dimensions
const W = 10, H = 7.5;

// ─── HELPER: add title bar + content layout ───────────────────────────────
function addTitleBar(slide, titleText) {
  // Blue rectangle at top
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: W, h: 1.1,
    fill: { color: DARK_BLUE },
    line: { color: DARK_BLUE }
  });
  // Title text
  slide.addText(titleText, {
    x: 0.3, y: 0, w: W - 0.6, h: 1.1,
    fontSize: 26, bold: true, color: "FFFFFF",
    fontFace: TITLE_FONT, valign: "middle", align: "left",
    margin: 0
  });
  // Bottom accent line
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE },
    line: { color: DARK_BLUE }
  });
}

// Helper: simple bullet slide
function addBulletSlide(title, bullets, opts = {}) {
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, title);
  const bodyY = opts.bodyY || 1.25;
  const bodyH = opts.bodyH || (H - bodyY - 0.5);
  const fontSize = opts.fontSize || 18;
  const items = bullets.map((b, i) => {
    const last = i === bullets.length - 1;
    if (typeof b === "string") {
      return { text: b, options: { bullet: { code: "2022" }, breakLine: !last, fontSize, color: BLACK, fontFace: BODY_FONT, indentLevel: 0 } };
    }
    // object: {text, bold, indent, color, fontSize}
    return {
      text: b.text,
      options: {
        bullet: b.noBullet ? false : { code: "2022" },
        breakLine: !last,
        fontSize: b.fontSize || fontSize,
        bold: b.bold || false,
        color: b.color || BLACK,
        fontFace: BODY_FONT,
        indentLevel: b.indent || 0
      }
    };
  });
  slide.addText(items, {
    x: 0.4, y: bodyY, w: W - 0.8, h: bodyH,
    valign: "top", margin: [4, 4, 4, 4]
  });
  return slide;
}

// Helper: two-column table slide
function addTableSlide(title, headers, rows, opts = {}) {
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, title);

  const tableY = opts.tableY || 1.3;
  const tableH = opts.tableH || (H - tableY - 0.5);
  const colW = opts.colW || [(W - 0.8) / headers.length];
  const colWArr = Array.isArray(colW) ? colW : headers.map(() => (W - 0.8) / headers.length);

  const headerRow = headers.map(h => ({
    text: h,
    options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, align: "center", fontSize: 15, fontFace: TITLE_FONT }
  }));

  const tableRows = [headerRow, ...rows.map((row, ri) =>
    row.map(cell => ({
      text: cell,
      options: {
        fontSize: 13,
        color: BLACK,
        fill: { color: ri % 2 === 0 ? LIGHT_BLUE : "EAF2FA" },
        align: "left",
        fontFace: BODY_FONT,
        valign: "middle"
      }
    }))
  )];

  slide.addTable(tableRows, {
    x: 0.4, y: tableY, w: W - 0.8,
    rowH: 0.38,
    border: { type: "solid", color: "AABDD4", pt: 0.5 },
    colW: colWArr
  });

  return slide;
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE SLIDE
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };

  // Top full-width dark blue bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: W, h: 1.8,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
  slide.addText("ANTIGEN PRESENTING CELLS", {
    x: 0.4, y: 0, w: W - 0.8, h: 1.8,
    fontSize: 32, bold: true, color: "FFFFFF",
    fontFace: TITLE_FONT, align: "center", valign: "middle"
  });

  // Subtitle box
  slide.addShape(pres.ShapeType.rect, {
    x: 1.5, y: 2.2, w: 7, h: 0.7,
    fill: { color: LIGHT_BLUE }, line: { color: MED_BLUE, pt: 1.5 }
  });
  slide.addText("Macrophage as a Professional APC", {
    x: 1.5, y: 2.2, w: 7, h: 0.7,
    fontSize: 20, bold: true, color: DARK_BLUE,
    fontFace: TITLE_FONT, align: "center", valign: "middle"
  });

  // Presenter info
  slide.addText([
    { text: "Dermatology Residency Presentation\n", options: { fontSize: 16, color: "555555", fontFace: BODY_FONT } },
    { text: "Department of Dermatology", options: { fontSize: 15, color: "777777", fontFace: BODY_FONT } }
  ], {
    x: 1.5, y: 3.3, w: 7, h: 1.2,
    align: "center", valign: "middle"
  });

  // Bottom bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 – CONTENTS
// ═══════════════════════════════════════════════════════════════════════════
addBulletSlide("Contents", [
  { text: "1. What is an Antigen Presenting Cell?", bold: false, noBullet: false },
  { text: "2. Origin and Distribution of Macrophages", bold: false },
  { text: "3. Key Surface Molecules for APC Function", bold: false },
  { text: "4. MHC Class II Antigen Processing Pathway", bold: false },
  { text: "5. Two-Signal Model for T Cell Activation", bold: false },
  { text: "6. MHC Class I vs Class II Presentation", bold: false },
  { text: "7. Macrophage Activation Feedback Loop", bold: false },
  { text: "8. Macrophages vs Dendritic Cells", bold: false },
  { text: "9. APC Function in Disease States", bold: false },
  { text: "10. M1 vs M2 Polarization", bold: false },
  { text: "11. Summary & References", bold: false }
], { fontSize: 17 });

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 – WHAT IS AN APC?
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "What is an Antigen Presenting Cell (APC)?");

  // Definition box
  slide.addShape(pres.ShapeType.rect, {
    x: 0.4, y: 1.3, w: W - 0.8, h: 1.1,
    fill: { color: LIGHT_BLUE }, line: { color: MED_BLUE, pt: 1 }
  });
  slide.addText("A cell that captures, processes, and displays antigenic peptides on its surface in complex with MHC molecules, allowing T lymphocytes to recognize and respond to them.", {
    x: 0.5, y: 1.3, w: W - 1.0, h: 1.1,
    fontSize: 15, color: DARK_BLUE, fontFace: BODY_FONT,
    italic: true, valign: "middle", align: "left"
  });

  // Three professional APCs
  slide.addText("The Three Professional APCs", {
    x: 0.4, y: 2.55, w: W - 0.8, h: 0.4,
    fontSize: 18, bold: true, color: DARK_BLUE, fontFace: TITLE_FONT
  });

  const apcs = [
    { label: "Macrophages", sub: "Phagocytosis +\nAntigen presentation" },
    { label: "Dendritic Cells", sub: "Most efficient\nfor naive T cells" },
    { label: "B Lymphocytes", sub: "BCR-mediated\nantigen uptake" }
  ];
  const boxW = 2.6, boxH = 1.4, startX = 0.65, boxY = 3.1, gap = 0.45;
  apcs.forEach((apc, i) => {
    const x = startX + i * (boxW + gap);
    slide.addShape(pres.ShapeType.rect, {
      x, y: boxY, w: boxW, h: boxH,
      fill: { color: i === 0 ? DARK_BLUE : MED_BLUE },
      line: { color: DARK_BLUE }
    });
    slide.addText([
      { text: apc.label + "\n", options: { bold: true, fontSize: 16, color: "FFFFFF", fontFace: TITLE_FONT } },
      { text: apc.sub, options: { fontSize: 13, color: "E8F0FB", fontFace: BODY_FONT } }
    ], {
      x, y: boxY, w: boxW, h: boxH,
      align: "center", valign: "middle"
    });
  });

  slide.addText("Macrophages are unique: simultaneously phagocytes, innate effectors, and professional APCs", {
    x: 0.4, y: 4.7, w: W - 0.8, h: 0.5,
    fontSize: 14, color: "555555", italic: true, fontFace: BODY_FONT, align: "center"
  });

  // Bottom bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 – ORIGIN AND DISTRIBUTION
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "Origin and Distribution of Macrophages");

  slide.addText([
    { text: "Bone Marrow Progenitors", options: { bold: true, fontSize: 15, color: DARK_BLUE, fontFace: TITLE_FONT, breakLine: true } },
    { text: "  ↓   Monocytes circulate ~3 days in blood", options: { fontSize: 14, color: BLACK, fontFace: BODY_FONT, breakLine: true } },
    { text: "  ↓   Migrate into tissues → differentiate into tissue-resident macrophages", options: { fontSize: 14, color: BLACK, fontFace: BODY_FONT } }
  ], {
    x: 0.4, y: 1.25, w: W - 0.8, h: 0.95,
    valign: "top"
  });

  // Table: tissue macrophages
  const headerRow = [
    { text: "Tissue / Location", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 14, fontFace: TITLE_FONT, align: "center" } },
    { text: "Macrophage Name", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 14, fontFace: TITLE_FONT, align: "center" } }
  ];
  const tRows = [
    ["Liver", "Kupffer cells"],
    ["Lung", "Alveolar macrophages"],
    ["Brain", "Microglia"],
    ["Bone", "Osteoclasts"],
    ["Connective tissue", "Histiocytes"],
    ["Spleen / Lymph nodes", "Free macrophages"],
    ["Kidney (mesangium)", "Mesangial cells"],
    ["Skin", "Dermal macrophages"]
  ];
  const tableRows = [
    headerRow,
    ...tRows.map((r, i) => r.map(cell => ({
      text: cell,
      options: { fontSize: 13, color: BLACK, fill: { color: i % 2 === 0 ? LIGHT_BLUE : "EAF2FA" }, fontFace: BODY_FONT, valign: "middle" }
    })))
  ];
  slide.addTable(tableRows, {
    x: 0.4, y: 2.35, w: W - 0.8,
    rowH: 0.38,
    colW: [4.6, 4.6],
    border: { type: "solid", color: "AABDD4", pt: 0.5 }
  });

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 – KEY SURFACE MOLECULES
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "Key Surface Molecules for APC Function");

  const headerRow = [
    { text: "Molecule", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } },
    { text: "Role", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } }
  ];
  const rows = [
    ["MHC class II (HLA-DR, DP, DQ)", "Presents processed peptide to CD4+ T cells"],
    ["MHC class I", "Presents endogenous/viral peptides to CD8+ T cells"],
    ["CD80 / CD86 (B7 family)", "Costimulatory signals to T cells"],
    ["CD40", "Receives activating signal from CD40L on T cells"],
    ["TLRs, NLRs (PRRs)", "Detect PAMPs to trigger phagocytosis"],
    ["Fc receptors (FcγR)", "Opsonized antigen uptake"],
    ["Complement receptors (CR1, CR3)", "Enhance phagocytosis"],
    ["Invariant chain (CD74)", "Protects MHC II peptide groove during biosynthesis"]
  ];
  const tableRows = [
    headerRow,
    ...rows.map((r, i) => r.map(cell => ({
      text: cell,
      options: { fontSize: 12.5, color: BLACK, fill: { color: i % 2 === 0 ? LIGHT_BLUE : "EAF2FA" }, fontFace: BODY_FONT, valign: "middle" }
    })))
  ];
  slide.addTable(tableRows, {
    x: 0.4, y: 1.25, w: W - 0.8,
    rowH: 0.52,
    colW: [3.8, 5.4],
    border: { type: "solid", color: "AABDD4", pt: 0.5 }
  });

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 – MHC CLASS II PATHWAY OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════
addBulletSlide("MHC Class II Antigen Processing Pathway", [
  { text: "Step 1: Antigen Uptake", bold: true, noBullet: false, fontSize: 17, color: DARK_BLUE },
  { text: "Phagocytosis (large particles, opsonized bacteria)", indent: 1, fontSize: 15 },
  { text: "Macropinocytosis (bulk fluid uptake)", indent: 1, fontSize: 15 },
  { text: "Receptor-mediated endocytosis (Fc, complement, mannose receptors)", indent: 1, fontSize: 15 },
  { text: "Step 2: Phagosome Formation", bold: true, noBullet: false, fontSize: 17, color: DARK_BLUE },
  { text: "Ingested material enclosed in phagosome (neutral pH)", indent: 1, fontSize: 15 },
  { text: "Step 3: Acidification and Lysosomal Fusion", bold: true, noBullet: false, fontSize: 17, color: DARK_BLUE },
  { text: "Phagosome + lysosome → phagolysosome; V-ATPase drops pH to ~4.5-5", indent: 1, fontSize: 15 },
  { text: "Cathepsins & GILT (disulfide bond breaker) degrade antigen into peptides of 13-25 aa", indent: 1, fontSize: 15 }
], { bodyY: 1.25, bodyH: 5.9, fontSize: 16 });

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 – MHC CLASS II PATHWAY (STEPS 4–6)
// ═══════════════════════════════════════════════════════════════════════════
addBulletSlide("MHC Class II Pathway (continued)", [
  { text: "Step 4: MHC Class II Biosynthesis and Transport", bold: true, noBullet: false, fontSize: 17, color: DARK_BLUE },
  { text: "MHC II (α + β chains) synthesized in ER", indent: 1, fontSize: 15 },
  { text: "Invariant chain (Ii, CD74) binds peptide groove (CLIP segment) → prevents premature loading", indent: 1, fontSize: 15 },
  { text: "MHC II-Ii complex travels: ER → Golgi → late endosome", indent: 1, fontSize: 15 },
  { text: "Step 5: CLIP Removal and Peptide Loading", bold: true, noBullet: false, fontSize: 17, color: DARK_BLUE },
  { text: "Cathepsin S cleaves invariant chain → leaves only CLIP in groove", indent: 1, fontSize: 15 },
  { text: "HLA-DM (accessory molecule) catalyzes exchange of CLIP for high-affinity antigenic peptide", indent: 1, fontSize: 15 },
  { text: "Only stable peptide-MHC II complexes are retained", indent: 1, fontSize: 15 },
  { text: "Step 6: Surface Display", bold: true, noBullet: false, fontSize: 17, color: DARK_BLUE },
  { text: "Peptide:MHC II complex transported to cell surface", indent: 1, fontSize: 15 },
  { text: "Recognized by TCR of CD4+ helper T cells", indent: 1, fontSize: 15 }
], { bodyY: 1.25, bodyH: 5.9, fontSize: 16 });

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 – PATHWAY DIAGRAM (TEXT-BASED FLOWCHART)
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "MHC Class II Pathway – Summary Diagram");

  const steps = [
    { text: "Extracellular Antigen (bacteria / foreign protein)", color: DARK_BLUE },
    { text: "↓  Phagocytosis / Endocytosis", color: BLACK },
    { text: "Phagosome  (neutral pH)", color: MED_BLUE },
    { text: "↓  Lysosome fusion + V-ATPase (pH ~4.5)", color: BLACK },
    { text: "Phagolysosome — Cathepsins + GILT active", color: MED_BLUE },
    { text: "↓  Antigen degraded → Peptide fragments (13-25 aa)", color: BLACK },
    { text: "Late endosome + MHC II-Ii complex", color: MED_BLUE },
    { text: "↓  HLA-DM removes CLIP; high-affinity peptide loads", color: BLACK },
    { text: "Peptide : MHC II complex → Cell Surface", color: DARK_BLUE },
    { text: "↓  Recognized by CD4+ T cell TCR", color: BLACK }
  ];

  const boxH = 0.44, startY = 1.25, gap = 0.02;
  steps.forEach((s, i) => {
    const isBullet = s.text.startsWith("↓");
    slide.addText(s.text, {
      x: isBullet ? 0.8 : 0.4,
      y: startY + i * (boxH + gap),
      w: W - 0.8,
      h: boxH,
      fontSize: 15,
      bold: !isBullet,
      color: s.color,
      fontFace: BODY_FONT,
      fill: isBullet ? { type: "none" } : { color: i % 4 === 0 ? LIGHT_BLUE : (i % 4 === 2 ? "D6E4F0" : "EAF2FA") },
      align: isBullet ? "left" : "center",
      valign: "middle",
      margin: isBullet ? 0 : [0, 8, 0, 8]
    });
  });

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 – TWO-SIGNAL MODEL
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "Two-Signal Model for T Cell Activation");

  const signals = [
    {
      label: "Signal 1: Antigen-Specific (TCR Signal)",
      bullets: [
        "TCR on CD4+ T cell binds peptide : MHC II complex on macrophage",
        "Alone → causes T cell ANERGY (unresponsiveness), NOT activation"
      ],
      color: DARK_BLUE
    },
    {
      label: "Signal 2: Costimulatory",
      bullets: [
        "CD80/CD86 (B7) on macrophage binds CD28 on T cell",
        "Provides the second signal needed for full T cell activation, proliferation, and cytokine production"
      ],
      color: MED_BLUE
    },
    {
      label: "Signal 3: Cytokines (Polarization)",
      bullets: [
        "IL-12 → drives Th1 differentiation",
        "IL-1, IL-6, TNF-α → amplify inflammation",
        "These polarize the T cell response to the type of pathogen"
      ],
      color: "4A90D9"
    }
  ];

  let curY = 1.3;
  signals.forEach(sig => {
    slide.addShape(pres.ShapeType.rect, {
      x: 0.4, y: curY, w: W - 0.8, h: 0.38,
      fill: { color: sig.color }, line: { color: sig.color }
    });
    slide.addText(sig.label, {
      x: 0.5, y: curY, w: W - 1, h: 0.38,
      fontSize: 16, bold: true, color: "FFFFFF", fontFace: TITLE_FONT, valign: "middle"
    });
    curY += 0.38;
    sig.bullets.forEach(b => {
      slide.addText([{ text: b, options: { bullet: { code: "2022" }, fontSize: 14, color: BLACK, fontFace: BODY_FONT } }], {
        x: 0.6, y: curY, w: W - 1, h: 0.38,
        valign: "middle"
      });
      curY += 0.38;
    });
    curY += 0.1;
  });

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 – MHC CLASS I vs CLASS II
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "MHC Class I vs Class II Presentation");

  const headerRow = [
    { text: "Feature", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } },
    { text: "MHC Class II", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } },
    { text: "MHC Class I", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } }
  ];
  const rows = [
    ["Antigen source", "Extracellular (exogenous)", "Intracellular (endogenous)"],
    ["T cell target", "CD4+ helper T cells", "CD8+ cytotoxic T cells"],
    ["Peptide length", "13-25 amino acids", "8-10 amino acids"],
    ["Processing site", "Phagolysosome / late endosome", "Proteasome → TAP → ER"],
    ["Key molecules", "Invariant chain, HLA-DM", "TAP1/TAP2, tapasin"],
    ["Macrophage role", "Professional APC", "Any infected cell"],
    ["Cross-presentation", "N/A", "Exogenous → MHC I (limited)"]
  ];
  const tableRows = [
    headerRow,
    ...rows.map((r, i) => r.map((cell, ci) => ({
      text: cell,
      options: { fontSize: 13, color: BLACK, fill: { color: i % 2 === 0 ? LIGHT_BLUE : "EAF2FA" }, fontFace: BODY_FONT, valign: "middle", bold: ci === 0 }
    })))
  ];
  slide.addTable(tableRows, {
    x: 0.4, y: 1.25, w: W - 0.8,
    rowH: 0.5,
    colW: [2.7, 3.3, 3.2],
    border: { type: "solid", color: "AABDD4", pt: 0.5 }
  });

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 11 – FEEDBACK LOOP
// ═══════════════════════════════════════════════════════════════════════════
addBulletSlide("Macrophage Activation Feedback Loop (Th1)", [
  { text: "Bidirectional communication is the heart of cell-mediated immunity:", bold: true, noBullet: false, fontSize: 16, color: DARK_BLUE },
  { text: "CD4+ Th1 cells recognize peptide : MHC II on macrophage", indent: 1, fontSize: 15 },
  { text: "T cell secretes IFN-γ — the most potent macrophage-activating cytokine", indent: 1, fontSize: 15 },
  { text: "T cell expresses CD40L which binds CD40 on macrophage", indent: 1, fontSize: 15 },
  { text: "Classical Activation (M1) Triggers:", bold: true, noBullet: false, fontSize: 16, color: DARK_BLUE },
  { text: "↑ MHC II and B7 (enhanced APC function)", indent: 1, fontSize: 15 },
  { text: "iNOS induction → nitric oxide (NO) production", indent: 1, fontSize: 15 },
  { text: "↑ Reactive oxygen species (ROS) via NADPH oxidase", indent: 1, fontSize: 15 },
  { text: "Enhanced phagocytosis and intracellular killing", indent: 1, fontSize: 15 },
  { text: "Cytokines: TNF-α, IL-1, IL-12, IL-6, IL-18, IL-23", indent: 1, fontSize: 15 },
  { text: "Clinical relevance: Controls M. tuberculosis, Leishmania through IFN-γ amplification of killing", bold: false, noBullet: false, fontSize: 14, color: "555555" }
], { bodyY: 1.25, bodyH: 5.9 });

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 12 – MACROPHAGES vs DENDRITIC CELLS
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "Macrophages vs Dendritic Cells as APCs");

  const headerRow = [
    { text: "Feature", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } },
    { text: "Macrophage", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } },
    { text: "Dendritic Cell", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } }
  ];
  const rows = [
    ["Primary role", "Phagocytosis + Killing", "Antigen presentation"],
    ["Tissue resident", "Yes", "Yes (immature)"],
    ["Migration to lymph node", "Limited", "Yes (mature DC)"],
    ["Naive T cell priming", "Weak", "Strong (most efficient)"],
    ["Costimulatory molecules", "Induced by activation", "Constitutively high"],
    ["MHC II expression", "Induced, lower level", "Very high after maturation"],
    ["Cross-presentation", "Limited", "Major role"],
    ["Best at", "Effector/memory T cell restimulation", "Primary T cell priming"]
  ];
  const tableRows = [
    headerRow,
    ...rows.map((r, i) => r.map((cell, ci) => ({
      text: cell,
      options: { fontSize: 12.5, color: BLACK, fill: { color: i % 2 === 0 ? LIGHT_BLUE : "EAF2FA" }, fontFace: BODY_FONT, valign: "middle", bold: ci === 0 }
    })))
  ];
  slide.addTable(tableRows, {
    x: 0.4, y: 1.25, w: W - 0.8,
    rowH: 0.48,
    colW: [2.7, 3.3, 3.2],
    border: { type: "solid", color: "AABDD4", pt: 0.5 }
  });

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 13 – APC FUNCTION IN DISEASE STATES
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "Macrophage APC Function in Disease States");

  const diseases = [
    {
      name: "Tuberculosis (M. tuberculosis)",
      points: [
        "Mycobacteria inhibit phagolysosome fusion and acidification",
        "Peptides still reach MHC II → presented to Th1 cells",
        "Th1 → IFN-γ → granuloma formation (containment mechanism)"
      ]
    },
    {
      name: "HIV Infection",
      points: [
        "HIV infects macrophages via CD4 + CCR5",
        "Impairs MHC II surface expression → reduced APC function",
        "Loss of APC capacity contributes to immune evasion"
      ]
    },
    {
      name: "Autoimmunity (RA, SLE)",
      points: [
        "Macrophages present self-antigens on MHC II → autoreactive T cells",
        "Excess IL-1, TNF-α drives tissue damage",
        "Targets of anti-TNF, IL-1 blockers, hydroxychloroquine (impairs lysosomal acidification)"
      ]
    },
    {
      name: "Tumor Microenvironment",
      points: [
        "TAMs polarized to M2 (alternative) phenotype",
        "M2 macrophages: reduced APC function, suppress T cell responses",
        "Key mechanism of tumor immune escape"
      ]
    }
  ];

  let curY = 1.25;
  diseases.forEach((d, di) => {
    slide.addShape(pres.ShapeType.rect, {
      x: 0.4, y: curY, w: W - 0.8, h: 0.32,
      fill: { color: di % 2 === 0 ? DARK_BLUE : MED_BLUE }, line: { color: DARK_BLUE }
    });
    slide.addText(d.name, {
      x: 0.5, y: curY, w: W - 1, h: 0.32,
      fontSize: 13.5, bold: true, color: "FFFFFF", fontFace: TITLE_FONT, valign: "middle"
    });
    curY += 0.32;
    d.points.forEach(p => {
      slide.addText([{ text: p, options: { bullet: { code: "2022" }, fontSize: 12, color: BLACK, fontFace: BODY_FONT } }], {
        x: 0.6, y: curY, w: W - 1, h: 0.33,
        valign: "middle"
      });
      curY += 0.33;
    });
    curY += 0.06;
  });

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 14 – M1 vs M2 POLARIZATION
// ═══════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.background = { color: BG };
  addTitleBar(slide, "M1 vs M2 Macrophage Polarization and APC Function");

  const headerRow = [
    { text: "Property", options: { bold: true, color: "FFFFFF", fill: { color: DARK_BLUE }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } },
    { text: "M1 (Classical)", options: { bold: true, color: "FFFFFF", fill: { color: "C0392B" }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } },
    { text: "M2 (Alternative)", options: { bold: true, color: "FFFFFF", fill: { color: "27AE60" }, fontSize: 13, fontFace: TITLE_FONT, align: "center" } }
  ];
  const rows = [
    ["Trigger", "IFN-γ, LPS", "IL-4, IL-13, IL-10"],
    ["MHC II expression", "High", "Low"],
    ["Costimulatory molecules", "High (B7)", "Low"],
    ["APC function", "Strong", "Weak"],
    ["Cytokines", "IL-12, IL-23, TNF, IL-1", "IL-10, TGF-β, IL-4"],
    ["T cell outcome", "Th1 / Th17 response", "Th2 / Treg response"],
    ["Role", "Killing, inflammation", "Repair, tolerance, tumor promotion"]
  ];
  const tableRows = [
    headerRow,
    ...rows.map((r, i) => [
      { text: r[0], options: { fontSize: 13, color: BLACK, fill: { color: i % 2 === 0 ? LIGHT_BLUE : "EAF2FA" }, fontFace: BODY_FONT, bold: true, valign: "middle" } },
      { text: r[1], options: { fontSize: 13, color: BLACK, fill: { color: i % 2 === 0 ? "FDECEA" : "FDEDED" }, fontFace: BODY_FONT, valign: "middle" } },
      { text: r[2], options: { fontSize: 13, color: BLACK, fill: { color: i % 2 === 0 ? "E8F8EF" : "D5F5E3" }, fontFace: BODY_FONT, valign: "middle" } }
    ])
  ];
  slide.addTable(tableRows, {
    x: 0.4, y: 1.25, w: W - 0.8,
    rowH: 0.5,
    colW: [2.8, 3.2, 3.2],
    border: { type: "solid", color: "AABDD4", pt: 0.5 }
  });

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: H - 0.32, w: W, h: 0.32,
    fill: { color: DARK_BLUE }, line: { color: DARK_BLUE }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 15 – SUMMARY
// ═══════════════════════════════════════════════════════════════════════════
addBulletSlide("Summary: Key Points", [
  "Macrophages are professional APCs bridging innate and adaptive immunity",
  "They capture antigen by phagocytosis and process it via the phagolysosomal pathway",
  "Antigenic peptides (13-25 aa) loaded onto MHC II via the invariant chain / CLIP / HLA-DM system",
  "Peptide : MHC II complex displayed on surface for CD4+ T cell recognition",
  "T cell activation requires TWO signals: TCR-MHC II (Signal 1) + CD28-B7 costimulation (Signal 2)",
  "Macrophage IL-12, TNF, IL-1 provide Signal 3 (cytokine polarization)",
  "Activated Th1 cells feed back via IFN-γ and CD40L → M1 macrophage amplification",
  "Macrophage APC function impaired in M. tuberculosis, HIV, tumor microenvironments",
  "Dendritic cells: primary APCs for naive T cell priming; Macrophages: critical for effector/memory T cell restimulation"
], { bodyY: 1.25, bodyH: 5.9, fontSize: 16 });

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 16 – REFERENCES
// ═══════════════════════════════════════════════════════════════════════════
addBulletSlide("References", [
  { text: "Mescher M.F. – Histology: A Text and Atlas – Monocyte-macrophage as APC, MHC II presentation", fontSize: 15, bold: false },
  { text: "Murphy K., Weaver C. – Janeway's Immunobiology, 10th Edition – MHC class II antigen processing, invariant chain, HLA-DM, Th1-macrophage interaction", fontSize: 15, bold: false },
  { text: "Roitt I. – Roitt's Essential Immunology – Cell-mediated immunity, professional APCs", fontSize: 15, bold: false },
  { text: "Rheumatology, 2-Volume Set (Elsevier 2022) – Macrophage cytokine production and APC function", fontSize: 15, bold: false },
  { text: "Murray R., et al. – Medical Microbiology, 9th Edition – Macrophage as APC in bacterial/viral infections", fontSize: 15, bold: false },
  { text: "Abbas A.K., Lichtman A.H., Pillai S. – Cellular and Molecular Immunology, 10th Edition", fontSize: 15, bold: false }
], { bodyY: 1.25, bodyH: 5.9, fontSize: 15 });

// ═══════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ═══════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/apc-presentation/Antigen_Presenting_Cell.pptx" })
  .then(() => console.log("Done: /home/daytona/workspace/apc-presentation/Antigen_Presenting_Cell.pptx"))
  .catch(err => { console.error(err); process.exit(1); });
Running Command

cd /home/daytona/workspace/apc-presentation && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/apc-presentation/Antigen_Presenting_Cell.pptx

Your presentation is ready. Download it here:

Antigen Presenting Cell

Presentation · PPTX


What's inside (16 slides):
SlideContent
1Title slide
2Contents
3What is an APC? (with 3-box visual for the 3 professional APCs)
4Origin and Distribution of Macrophages (table of tissue macrophages)
5Key Surface Molecules - MHC II, CD80/86, CD40, TLRs, FcR, CD74 (table)
6MHC Class II Pathway - Steps 1-3 (antigen uptake → phagolysosome)
7MHC Class II Pathway - Steps 4-6 (invariant chain, HLA-DM, surface display)
8Pathway Summary Diagram (text-based flowchart)
9Two-Signal Model for T Cell Activation (Signal 1, 2, 3)
10MHC Class I vs Class II comparison table
11Feedback Loop - Th1 → IFN-γ → M1 macrophage amplification
12Macrophages vs Dendritic Cells comparison table
13APC Function in Disease (TB, HIV, RA/SLE, Tumor microenvironment)
14M1 vs M2 Polarization table (with color-coded columns)
15Summary - 9 key points
16References
Style: White background, black text, dark navy blue header bars on every slide - matching your reference DEJ presentation format. All content is sourced from the macrodon.pdf reference material.

why its not downloading

Running Command

ls -lh /home/daytona/workspace/apc-presentation/ && file /home/daytona/workspace…

Running Command

cd /home/daytona/workspace/apc-presentation && node build.js 2>&1 && ls -lh Anti…

The file is confirmed at 400KB and valid. Try clicking this link directly:

Antigen Presenting Cell

Presentation · PPTX

If it still doesn't download, here are a few things to try:
  1. Right-click the link and choose "Save link as..." or "Download linked file"
  2. Try a different browser - Chrome or Edge work best for file downloads from this interface
  3. Clear your browser cache and try again
  4. Check your Downloads folder - the file may have already downloaded silently without showing a prompt
The file is a valid 400KB .pptx file (confirmed as a proper ZIP/Office format). The file itself is fine - it's just a browser download behavior issue on your end.

show downloaded file on bottom of page

I understand you want to see the file appear as a download bar at the bottom of your browser — that's a browser feature that I can't control from my side. I can only provide the file link; the browser decides how to show it.
Here's what to do depending on your browser:
Chrome / Edge:
  1. Click the link below
  2. If nothing appears at the bottom, check the top-right corner for a Downloads icon (↓ arrow)
  3. Or press Ctrl+J (Windows) / Cmd+J (Mac) to open Downloads
Firefox:
  1. Click the link
  2. A save dialog will pop up — choose "Save File"
  3. It will appear at the bottom of the screen

Click here to download:

Antigen Presenting Cell

Presentation · PPTX


Note: I'm an AI assistant — I cannot control your browser's download bar or UI. The file is ready and valid (400KB). The download bar at the bottom of the page is handled entirely by your browser once you click the link.

It still is not downloading

Running Command

ls -lh /home/daytona/workspace/apc-presentation/ && cp /home/daytona/workspace/a…

Running Command

cd /home/daytona/workspace && zip APC_Presentation.zip APC_Presentation.pptx && …

Running Command

# Regenerate fresh with node directly into workspace root cd /home/daytona/works…

Running Command

cd /home/daytona/workspace/apc-presentation && node build.js 2>&1 # now copy usi…

Running Command

# Write directly to workspace root using node cd /home/daytona/workspace/apc-pre…

Running Command

# Write fresh pptx directly to workspace root (not a subdirectory) cd /home/dayt…

Running Command

find /home/daytona -name "pptxgenjs" -type d 2>/dev/null | head -5 find /usr -na…

This is a shared conversation. Sign in to Orris to start your own chat.