Give me a good template for genetics

Asking for Preferences
Reading File
Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"

Running Command

mkdir -p /home/daytona/workspace/genetics-pptx

Writing File

~/genetics-pptx/genetics.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Introduction to Genetics";
pres.author = "Genetics Template";

// ─── COLOR PALETTE ────────────────────────────────────────────────────────────
// Deep navy dominant, teal accent, amber highlight, light slate text
const C = {
  navy:       "0D1B2A",
  navyMid:    "1A3050",
  teal:       "0EA5A0",
  tealDark:   "077A76",
  amber:      "F5A623",
  white:      "FFFFFF",
  lightSlate: "C8D8E8",
  grayText:   "8AA0B5",
  divider:    "1E3D5C",
  cardBg:     "122537",
};

// ─── HELPER: section label pill ───────────────────────────────────────────────
function sectionPill(slide, label, x, y) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w: 1.8, h: 0.28,
    fill: { color: C.teal },
    line: { color: C.teal },
    rectRadius: 0.14,
  });
  slide.addText(label.toUpperCase(), {
    x, y, w: 1.8, h: 0.28,
    fontSize: 7.5, bold: true, color: C.navy,
    align: "center", valign: "middle", charSpacing: 2,
  });
}

// ─── SLIDE 1: TITLE ───────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();

  // Background
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });

  // Teal left accent bar
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });

  // Large decorative circle (top-right)
  sl.addShape(pres.ShapeType.ellipse, { x: 6.8, y: -1.4, w: 4.5, h: 4.5, fill: { color: C.navyMid }, line: { color: C.teal, size: 1.5 } });
  // Inner circle
  sl.addShape(pres.ShapeType.ellipse, { x: 7.5, y: -0.7, w: 3.1, h: 3.1, fill: { color: C.divider }, line: { color: C.divider } });

  // DNA helix dots decoration (manual circles)
  const dotPositions = [
    [7.0, 1.2], [7.6, 1.5], [8.2, 1.3], [8.7, 1.6],
    [7.2, 2.0], [7.8, 2.3], [8.4, 2.1], [9.0, 2.4],
  ];
  dotPositions.forEach(([dx, dy]) => {
    sl.addShape(pres.ShapeType.ellipse, { x: dx, y: dy, w: 0.16, h: 0.16, fill: { color: C.teal }, line: { color: C.teal } });
  });

  // Section pill
  sectionPill(sl, "INTRODUCTION TO", 0.45, 1.3);

  // Main title
  sl.addText("GENETICS", {
    x: 0.35, y: 1.75, w: 6.2, h: 1.3,
    fontSize: 60, bold: true, color: C.white, fontFace: "Calibri",
    align: "left", valign: "middle",
  });

  // Subtitle
  sl.addText("Foundations of heredity, DNA, and molecular biology", {
    x: 0.35, y: 3.15, w: 6.0, h: 0.55,
    fontSize: 16, color: C.lightSlate, align: "left", italic: true,
  });

  // Divider line
  sl.addShape(pres.ShapeType.rect, { x: 0.35, y: 3.78, w: 4.0, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });

  // Course / Author placeholder
  sl.addText("Course Name  ·  Instructor Name  ·  Year", {
    x: 0.35, y: 3.95, w: 5.5, h: 0.35,
    fontSize: 10, color: C.grayText, align: "left",
  });
}

// ─── SLIDE 2: TABLE OF CONTENTS ───────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });

  sectionPill(sl, "OVERVIEW", 0.45, 0.32);
  sl.addText("Contents", {
    x: 0.45, y: 0.7, w: 9, h: 0.6,
    fontSize: 30, bold: true, color: C.white,
  });
  sl.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.38, w: 9, h: 0.03, fill: { color: C.divider }, line: { color: C.divider } });

  const topics = [
    ["01", "DNA Structure & Replication"],
    ["02", "Genes & the Genome"],
    ["03", "Mendelian Inheritance"],
    ["04", "Non-Mendelian Inheritance"],
    ["05", "Mutations & Genetic Variation"],
    ["06", "Genetic Technologies"],
  ];

  // Two columns of 3
  const colXs = [0.45, 5.2];
  topics.forEach(([num, title], i) => {
    const col = i < 3 ? 0 : 1;
    const row = i % 3;
    const x = colXs[col];
    const y = 1.55 + row * 1.22;
    const w = 4.5;

    // Number badge
    sl.addShape(pres.ShapeType.ellipse, { x, y: y + 0.25, w: 0.5, h: 0.5, fill: { color: C.teal }, line: { color: C.teal } });
    sl.addText(num, { x, y: y + 0.25, w: 0.5, h: 0.5, fontSize: 11, bold: true, color: C.navy, align: "center", valign: "middle" });

    // Topic title
    sl.addText(title, {
      x: x + 0.62, y: y + 0.25, w: w - 0.65, h: 0.5,
      fontSize: 14, color: C.white, valign: "middle",
    });

    // Thin underline
    sl.addShape(pres.ShapeType.rect, { x: x + 0.62, y: y + 0.8, w: w - 0.65, h: 0.025, fill: { color: C.divider }, line: { color: C.divider } });
  });
}

// ─── SLIDE 3: DNA STRUCTURE ────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });

  // Slide number top-right
  sl.addText("01", { x: 8.8, y: 0.2, w: 0.8, h: 0.4, fontSize: 22, bold: true, color: C.divider, align: "right" });

  sectionPill(sl, "DNA STRUCTURE & REPLICATION", 0.45, 0.22);
  sl.addText("The Double Helix", { x: 0.45, y: 0.6, w: 8, h: 0.65, fontSize: 30, bold: true, color: C.white });
  sl.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.3, w: 9, h: 0.03, fill: { color: C.divider }, line: { color: C.divider } });

  // Key fact cards
  const cards = [
    { icon: "🧬", title: "Structure", body: "DNA is a double helix made of two antiparallel polynucleotide strands wound around each other, stabilised by hydrogen bonds between complementary bases." },
    { icon: "🔗", title: "Base Pairing", body: "Adenine (A) pairs with Thymine (T) via 2 H-bonds; Guanine (G) pairs with Cytosine (C) via 3 H-bonds. This is Chargaff's Rule." },
    { icon: "⚙️", title: "Replication", body: "Semi-conservative: each strand acts as a template. Key enzymes: Helicase (unwinds), Primase (primer), DNA Polymerase III (synthesis 5'→3'), Ligase (seals)." },
  ];

  cards.forEach((card, i) => {
    const x = 0.38 + i * 3.22;
    const y = 1.5;
    sl.addShape(pres.ShapeType.roundRect, { x, y, w: 3.0, h: 3.8, fill: { color: C.cardBg }, line: { color: C.teal, size: 0.75 }, rectRadius: 0.12 });
    sl.addText(card.icon, { x, y: y + 0.2, w: 3.0, h: 0.55, fontSize: 26, align: "center" });
    sl.addText(card.title, { x, y: y + 0.82, w: 3.0, h: 0.42, fontSize: 14, bold: true, color: C.teal, align: "center" });
    sl.addShape(pres.ShapeType.rect, { x: x + 0.3, y: y + 1.28, w: 2.4, h: 0.025, fill: { color: C.divider }, line: { color: C.divider } });
    sl.addText(card.body, { x: x + 0.18, y: y + 1.38, w: 2.65, h: 2.2, fontSize: 10, color: C.lightSlate, align: "left", wrap: true });
  });
}

// ─── SLIDE 4: GENES & GENOME ───────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("02", { x: 8.8, y: 0.2, w: 0.8, h: 0.4, fontSize: 22, bold: true, color: C.divider, align: "right" });

  sectionPill(sl, "GENES & THE GENOME", 0.45, 0.22);
  sl.addText("From DNA to Protein", { x: 0.45, y: 0.6, w: 8, h: 0.65, fontSize: 30, bold: true, color: C.white });
  sl.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.3, w: 9, h: 0.03, fill: { color: C.divider }, line: { color: C.divider } });

  // Left column: key definitions
  const defs = [
    ["Gene", "A segment of DNA that encodes a functional product (protein or RNA)."],
    ["Genome", "The complete set of genetic material in an organism (~3 billion bp in humans)."],
    ["Locus", "The fixed position of a gene on a chromosome."],
    ["Allele", "Alternative forms of a gene at a given locus."],
    ["Genotype", "The genetic makeup of an individual (e.g. Aa, BB)."],
    ["Phenotype", "The observable traits produced by genotype × environment."],
  ];

  defs.forEach(([term, def], i) => {
    const y = 1.45 + i * 0.67;
    sl.addShape(pres.ShapeType.rect, { x: 0.38, y: y, w: 0.07, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } });
    sl.addText(term + ":", { x: 0.55, y, w: 1.5, h: 0.42, fontSize: 11, bold: true, color: C.amber, valign: "middle" });
    sl.addText(def, { x: 2.05, y, w: 7.5, h: 0.42, fontSize: 10, color: C.lightSlate, valign: "middle", wrap: true });
  });

  // Central dogma banner at bottom
  sl.addShape(pres.ShapeType.rect, { x: 0.38, y: 5.1, w: 9.3, h: 0.4, fill: { color: C.navyMid }, line: { color: C.divider } });
  sl.addText("Central Dogma:  DNA  →  Transcription  →  mRNA  →  Translation  →  Protein", {
    x: 0.38, y: 5.1, w: 9.3, h: 0.4,
    fontSize: 10.5, color: C.teal, align: "center", valign: "middle", bold: true,
  });
}

// ─── SLIDE 5: MENDELIAN INHERITANCE ───────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("03", { x: 8.8, y: 0.2, w: 0.8, h: 0.4, fontSize: 22, bold: true, color: C.divider, align: "right" });

  sectionPill(sl, "MENDELIAN INHERITANCE", 0.45, 0.22);
  sl.addText("Mendel's Laws", { x: 0.45, y: 0.6, w: 8, h: 0.65, fontSize: 30, bold: true, color: C.white });
  sl.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.3, w: 9, h: 0.03, fill: { color: C.divider }, line: { color: C.divider } });

  // Three law cards (horizontal)
  const laws = [
    { num: "I", name: "Law of Segregation", body: "Allele pairs separate during gamete formation. Each gamete carries only one allele for each gene." },
    { num: "II", name: "Law of Independent Assortment", body: "Genes on different chromosomes assort independently. Produces 9:3:3:1 ratio in dihybrid crosses." },
    { num: "III", name: "Law of Dominance", body: "One allele can mask the expression of another. Dominant (uppercase) is expressed; recessive (lowercase) is masked." },
  ];

  laws.forEach((law, i) => {
    const x = 0.38 + i * 3.22;
    sl.addShape(pres.ShapeType.roundRect, { x, y: 1.5, w: 3.0, h: 2.5, fill: { color: C.cardBg }, line: { color: C.navyMid, size: 0.5 }, rectRadius: 0.1 });
    sl.addShape(pres.ShapeType.ellipse, { x: x + 1.15, y: 1.45, w: 0.7, h: 0.7, fill: { color: C.teal }, line: { color: C.teal } });
    sl.addText(law.num, { x: x + 1.15, y: 1.45, w: 0.7, h: 0.7, fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle" });
    sl.addText(law.name, { x: x + 0.1, y: 2.25, w: 2.8, h: 0.55, fontSize: 12, bold: true, color: C.white, align: "center", wrap: true });
    sl.addText(law.body, { x: x + 0.18, y: 2.85, w: 2.65, h: 1.1, fontSize: 10, color: C.lightSlate, align: "left", wrap: true });
  });

  // Punnett square example
  sl.addShape(pres.ShapeType.rect, { x: 0.38, y: 4.15, w: 9.3, h: 1.25, fill: { color: C.cardBg }, line: { color: C.divider } });
  sl.addText("Example Punnett Square (Aa × Aa):", { x: 0.55, y: 4.2, w: 3.5, h: 0.35, fontSize: 10, bold: true, color: C.amber });
  sl.addText("AA  :  Aa  :  Aa  :  aa   →   Phenotype ratio 3:1  |  Genotype ratio 1:2:1", {
    x: 0.55, y: 4.62, w: 9, h: 0.35, fontSize: 10.5, color: C.white,
  });
  sl.addText("Dominant phenotype (AA + Aa) = 75%   |   Recessive phenotype (aa) = 25%", {
    x: 0.55, y: 4.98, w: 9, h: 0.3, fontSize: 10, color: C.grayText,
  });
}

// ─── SLIDE 6: NON-MENDELIAN INHERITANCE ──────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("04", { x: 8.8, y: 0.2, w: 0.8, h: 0.4, fontSize: 22, bold: true, color: C.divider, align: "right" });

  sectionPill(sl, "NON-MENDELIAN INHERITANCE", 0.45, 0.22);
  sl.addText("Beyond Mendel", { x: 0.45, y: 0.6, w: 8, h: 0.65, fontSize: 30, bold: true, color: C.white });
  sl.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.3, w: 9, h: 0.03, fill: { color: C.divider }, line: { color: C.divider } });

  const patterns = [
    ["Incomplete Dominance", "Neither allele is fully dominant. Heterozygote shows intermediate phenotype (e.g. red × white = pink flowers in snapdragons)."],
    ["Codominance", "Both alleles are equally expressed simultaneously (e.g. ABO blood type AB; both A and B antigens present)."],
    ["Multiple Alleles", "More than two alleles exist for a gene in the population (e.g. ABO locus has I^A, I^B, and i alleles)."],
    ["Polygenic Traits", "Phenotype controlled by multiple genes, producing a continuous distribution (e.g. skin colour, height, IQ)."],
    ["Epistasis", "One gene masks or modifies the expression of another (e.g. coat colour in Labrador retrievers: 9:3:4 ratio)."],
    ["Sex-Linkage", "Genes on X or Y chromosome. X-linked recessive traits are more prevalent in males (e.g. haemophilia, colour blindness)."],
  ];

  patterns.forEach(([term, body], i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.38 : 5.25;
    const y = 1.5 + row * 1.35;
    sl.addShape(pres.ShapeType.roundRect, { x, y, w: 4.65, h: 1.2, fill: { color: C.cardBg }, line: { color: C.navyMid, size: 0.5 }, rectRadius: 0.1 });
    sl.addShape(pres.ShapeType.rect, { x, y, w: 0.12, h: 1.2, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1 });
    sl.addText(term, { x: x + 0.2, y: y + 0.1, w: 4.35, h: 0.38, fontSize: 11.5, bold: true, color: C.amber });
    sl.addText(body, { x: x + 0.2, y: y + 0.5, w: 4.3, h: 0.65, fontSize: 9.5, color: C.lightSlate, wrap: true });
  });
}

// ─── SLIDE 7: MUTATIONS & VARIATION ──────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("05", { x: 8.8, y: 0.2, w: 0.8, h: 0.4, fontSize: 22, bold: true, color: C.divider, align: "right" });

  sectionPill(sl, "MUTATIONS & GENETIC VARIATION", 0.45, 0.22);
  sl.addText("Mutations", { x: 0.45, y: 0.6, w: 8, h: 0.65, fontSize: 30, bold: true, color: C.white });
  sl.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.3, w: 9, h: 0.03, fill: { color: C.divider }, line: { color: C.divider } });

  // Two-column layout: left = point mutations, right = chromosomal
  // Left header
  sl.addShape(pres.ShapeType.rect, { x: 0.38, y: 1.42, w: 4.4, h: 0.38, fill: { color: C.navyMid }, line: { color: C.navyMid } });
  sl.addText("POINT MUTATIONS", { x: 0.38, y: 1.42, w: 4.4, h: 0.38, fontSize: 11, bold: true, color: C.teal, align: "center", valign: "middle", charSpacing: 1.5 });

  const pointMuts = [
    ["Silent", "Codon changes but same amino acid (synonymous)."],
    ["Missense", "Codon changes → different amino acid (e.g. sickle cell: Glu→Val)."],
    ["Nonsense", "Codon changes → stop codon → truncated protein."],
    ["Frameshift", "Insertion or deletion shifts the reading frame downstream."],
  ];
  pointMuts.forEach(([type, desc], i) => {
    const y = 1.92 + i * 0.78;
    sl.addShape(pres.ShapeType.roundRect, { x: 0.38, y, w: 4.4, h: 0.68, fill: { color: C.cardBg }, line: { color: C.divider }, rectRadius: 0.08 });
    sl.addText(type, { x: 0.5, y: y + 0.05, w: 1.2, h: 0.28, fontSize: 10.5, bold: true, color: C.amber });
    sl.addText(desc, { x: 0.5, y: y + 0.32, w: 4.1, h: 0.32, fontSize: 9.5, color: C.lightSlate });
  });

  // Right header
  sl.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.42, w: 4.4, h: 0.38, fill: { color: C.navyMid }, line: { color: C.navyMid } });
  sl.addText("CHROMOSOMAL MUTATIONS", { x: 5.15, y: 1.42, w: 4.4, h: 0.38, fontSize: 11, bold: true, color: C.teal, align: "center", valign: "middle", charSpacing: 1.5 });

  const chromMuts = [
    ["Deletion", "Loss of a chromosomal segment (e.g. cri du chat syndrome, del 5p)."],
    ["Duplication", "Extra copy of a segment → gene dosage imbalance."],
    ["Inversion", "Segment reversed within same chromosome; may disrupt genes."],
    ["Translocation", "Segment moves to a non-homologous chromosome (e.g. Philadelphia chromosome t(9;22))."],
  ];
  chromMuts.forEach(([type, desc], i) => {
    const y = 1.92 + i * 0.78;
    sl.addShape(pres.ShapeType.roundRect, { x: 5.15, y, w: 4.4, h: 0.68, fill: { color: C.cardBg }, line: { color: C.divider }, rectRadius: 0.08 });
    sl.addText(type, { x: 5.27, y: y + 0.05, w: 1.5, h: 0.28, fontSize: 10.5, bold: true, color: C.amber });
    sl.addText(desc, { x: 5.27, y: y + 0.32, w: 4.1, h: 0.32, fontSize: 9.5, color: C.lightSlate });
  });
}

// ─── SLIDE 8: GENETIC TECHNOLOGIES ───────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("06", { x: 8.8, y: 0.2, w: 0.8, h: 0.4, fontSize: 22, bold: true, color: C.divider, align: "right" });

  sectionPill(sl, "GENETIC TECHNOLOGIES", 0.45, 0.22);
  sl.addText("Modern Tools", { x: 0.45, y: 0.6, w: 8, h: 0.65, fontSize: 30, bold: true, color: C.white });
  sl.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.3, w: 9, h: 0.03, fill: { color: C.divider }, line: { color: C.divider } });

  const tools = [
    { icon: "🔬", name: "PCR", desc: "Polymerase Chain Reaction amplifies specific DNA sequences exponentially using thermocycling: denature → anneal primers → extend." },
    { icon: "✂️", name: "CRISPR-Cas9", desc: "Precise genome editing using guide RNA to direct the Cas9 nuclease to cut a target sequence; enables knock-in, knock-out, and repair." },
    { icon: "📊", name: "DNA Sequencing", desc: "Sanger (chain-termination) and Next-Gen Sequencing (NGS) methods determine the nucleotide sequence of DNA fragments rapidly." },
    { icon: "🔭", name: "Gel Electrophoresis", desc: "Separates DNA fragments by size through an agarose gel under electric current. Smaller fragments migrate further." },
    { icon: "🗺️", name: "SNP Genotyping", desc: "Single Nucleotide Polymorphisms used in GWAS studies to identify loci associated with complex diseases or traits." },
    { icon: "🧪", name: "Gene Therapy", desc: "Introduces functional genes into cells to correct genetic disorders. Uses viral vectors (e.g. AAV) or lipid nanoparticles for delivery." },
  ];

  tools.forEach((tool, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.38 + col * 3.2;
    const y = 1.5 + row * 1.95;

    sl.addShape(pres.ShapeType.roundRect, { x, y, w: 3.0, h: 1.78, fill: { color: C.cardBg }, line: { color: C.teal, size: 0.6 }, rectRadius: 0.1 });
    sl.addText(tool.icon, { x, y: y + 0.1, w: 3.0, h: 0.42, fontSize: 20, align: "center" });
    sl.addText(tool.name, { x, y: y + 0.52, w: 3.0, h: 0.32, fontSize: 12, bold: true, color: C.white, align: "center" });
    sl.addText(tool.desc, { x: x + 0.12, y: y + 0.86, w: 2.76, h: 0.88, fontSize: 9, color: C.lightSlate, align: "left", wrap: true });
  });
}

// ─── SLIDE 9: KEY VOCABULARY ──────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });

  sectionPill(sl, "REFERENCE", 0.45, 0.22);
  sl.addText("Key Vocabulary", { x: 0.45, y: 0.6, w: 8, h: 0.65, fontSize: 30, bold: true, color: C.white });
  sl.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.3, w: 9, h: 0.03, fill: { color: C.divider }, line: { color: C.divider } });

  const vocab = [
    ["Homozygous", "Two identical alleles at a locus (AA or aa)"],
    ["Heterozygous", "Two different alleles at a locus (Aa)"],
    ["Diploid (2n)", "Two sets of chromosomes (46 in humans)"],
    ["Haploid (n)", "One set of chromosomes (23 in gametes)"],
    ["Mitosis", "Cell division → two genetically identical daughter cells"],
    ["Meiosis", "Cell division → four genetically unique haploid gametes"],
    ["Crossing Over", "Recombination between homologous chromosomes in meiosis I"],
    ["Linkage", "Genes close together on the same chromosome; tend to inherit together"],
    ["Hardy-Weinberg", "p² + 2pq + q² = 1; allele frequencies stay constant in ideal populations"],
    ["Penetrance", "Proportion of individuals with a genotype who show the associated phenotype"],
  ];

  vocab.forEach(([term, def], i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.38 : 5.2;
    const y = 1.45 + row * 0.82;

    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 0.72, fill: { color: i % 2 === 0 ? C.cardBg : C.navy }, line: { color: C.divider } });
    sl.addText(term, { x: x + 0.15, y: y + 0.06, w: 1.7, h: 0.3, fontSize: 10.5, bold: true, color: C.amber });
    sl.addText(def, { x: x + 0.15, y: y + 0.36, w: 4.3, h: 0.3, fontSize: 9.5, color: C.lightSlate });
  });
}

// ─── SLIDE 10: CLOSING / THANK YOU ────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });

  // Large teal circle decoration
  sl.addShape(pres.ShapeType.ellipse, { x: -1.2, y: 2.5, w: 5, h: 5, fill: { color: C.navyMid }, line: { color: C.teal, size: 1.5 } });
  sl.addShape(pres.ShapeType.ellipse, { x: -0.4, y: 3.2, w: 3.4, h: 3.4, fill: { color: C.divider }, line: { color: C.divider } });

  sl.addText("Thank You", { x: 2.5, y: 1.3, w: 7, h: 1.2, fontSize: 52, bold: true, color: C.white, align: "center" });
  sl.addShape(pres.ShapeType.rect, { x: 3.5, y: 2.6, w: 3.0, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addText("Questions & Discussion", { x: 2.5, y: 2.75, w: 7, h: 0.55, fontSize: 18, color: C.lightSlate, align: "center", italic: true });

  // Bottom strip
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.425, fill: { color: C.navyMid }, line: { color: C.navyMid } });
  sl.addText("Genetics Presentation  ·  [Course Name]  ·  [Instructor]  ·  [Institution]", {
    x: 0.3, y: 5.2, w: 9.4, h: 0.425, fontSize: 9, color: C.grayText, align: "center", valign: "middle",
  });
}

// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/genetics-pptx/Genetics_Template.pptx" })
  .then(() => console.log("✅ Saved: /home/daytona/workspace/genetics-pptx/Genetics_Template.pptx"))
  .catch(err => { console.error("❌ Error:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/genetics-pptx && node genetics.js

Your genetics presentation template is ready!

Genetics Template

Presentation · PPTX


What's included — 10 slides with a deep navy + teal design:
SlideContent
1Title slide — course name / instructor placeholders
2Table of Contents — 6 topic overview
3DNA Structure & Replication — double helix, base pairing, replication enzymes
4Genes & the Genome — key definitions (gene, locus, allele, genotype, phenotype) + central dogma banner
5Mendelian Inheritance — 3 laws + Punnett square example
6Non-Mendelian Inheritance — incomplete dominance, codominance, polygenic traits, epistasis, sex-linkage
7Mutations & Variation — point mutations (silent/missense/nonsense/frameshift) + chromosomal mutations
8Genetic Technologies — PCR, CRISPR-Cas9, sequencing, gel electrophoresis, SNP genotyping, gene therapy
9Key Vocabulary reference — 10 terms with definitions
10Closing / Thank You slide
Just replace the placeholder text (course name, instructor, institution) and you're good to go. Let me know if you'd like any slides added, removed, or redesigned.
This is a shared conversation. Sign in to Orris to start your own chat.