prepare a seminar for me regarding pcr as a md biochem pg resident

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

prepare a seminar for me regarding pcr as a md biochem pg resident

Asking for Preferences
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Searching Images

PCR polymerase chain reaction diagram steps denaturation annealing extension

This educational infographic illustrates the diagnostic workflow for Polymerase Chain Reaction (PCR) testing of ocular samples, specifically in the context of infectious uveitis or endophthalmitis. The diagram begins with an 'intraoperative image' showing 'Sampling,' where a fine-gauge needle is used to perform an anterior chamber tap to collect aqueous humor from the eye. The process flows through 'Pretreated sample' preparation, where the viral gene is extracted and mixed with specific primers and probes. This mixture is then processed in a 'PCR machine' for target gene amplification. The final stage involves 'Analysis of results' shown via comparative amplification curves. A positive result (Virus-A-DNA(+)) is depicted by a red sigmoidal curve indicating logarithmic amplification, while a negative result (Virus-B-DNA(-)) is shown as a flat blue baseline. This visual highlights the clinical application of molecular diagnostics in ophthalmology for rapid pathogen identification.

This educational infographic illustrates the diagnostic workflow for Polymerase Chain Reaction (PCR) testing of ocular samples, specifically in the context of infectious uveitis or endophthalmitis. The diagram begins with an 'intraoperative image' showing 'Sampling,' where a fine-gauge needle is used to perform an anterior chamber tap to collect aqueous humor from the eye. The process flows through 'Pretreated sample' preparation, where the viral gene is extracted and mixed with specific primers and probes. This mixture is then processed in a 'PCR machine' for target gene amplification. The final stage involves 'Analysis of results' shown via comparative amplification curves. A positive result (Virus-A-DNA(+)) is depicted by a red sigmoidal curve indicating logarithmic amplification, while a negative result (Virus-B-DNA(-)) is shown as a flat blue baseline. This visual highlights the clinical application of molecular diagnostics in ophthalmology for rapid pathogen identification.

This pathophysiology diagram illustrates the biochemical mechanisms by which gold nanoparticles (Au NPs) enhance Polymerase Chain Reaction (PCR) through surface interactions. The visual depicts a central Au NP surrounded by essential molecular components, including primers (squiggly lines), DNA templates (helical strands), dsDNA products, dNTPs (orange spheres), additives (yellow symbols), and DNA polymerase (green icons). The diagram outlines three specific adsorption-based regulatory mechanisms: 1) Polymerase Adsorption, which modulates the concentration of active enzyme in the reaction; 2) Primer Adsorption, which facilitates a decrease in the melting temperature (Tm) of primers, potentially improving binding specificity; and 3) Product Adsorption, which accelerates the dissociation of double-stranded DNA products. This schematic is designed for advanced biotechnology or medical laboratory students to understand the role of metallic nanoparticles in optimizing molecular diagnostic techniques like nanoPCR, emphasizing how surface chemistry influences enzymatic activity and DNA thermodynamics.

This pathophysiology diagram illustrates the biochemical mechanisms by which gold nanoparticles (Au NPs) enhance Polymerase Chain Reaction (PCR) through surface interactions. The visual depicts a central Au NP surrounded by essential molecular components, including primers (squiggly lines), DNA templates (helical strands), dsDNA products, dNTPs (orange spheres), additives (yellow symbols), and DNA polymerase (green icons). The diagram outlines three specific adsorption-based regulatory mechanisms: 1) Polymerase Adsorption, which modulates the concentration of active enzyme in the reaction; 2) Primer Adsorption, which facilitates a decrease in the melting temperature (Tm) of primers, potentially improving binding specificity; and 3) Product Adsorption, which accelerates the dissociation of double-stranded DNA products. This schematic is designed for advanced biotechnology or medical laboratory students to understand the role of metallic nanoparticles in optimizing molecular diagnostic techniques like nanoPCR, emphasizing how surface chemistry influences enzymatic activity and DNA thermodynamics.

This diagnostic image is an electrophoregram (agarose gel electrophoresis) showing the results of Polymerase Chain Reaction (PCR) amplification. The image contains three lanes visualized under UV light. On the far left, a 1 kb DNA ladder serves as a molecular weight marker, displaying approximately eight discrete horizontal bands of varying intensity. In the two rightmost lanes, there are clear, thick, high-intensity bands representing amplified DNA fragments. These specific bands are located in the upper half of the gel, positioned just below the 1500 bp mark of the reference ladder, confirming a product size of 1473 bps. This visualization is used in molecular biology and infectious disease research to confirm the presence of the L1-HPV52 gene, a component of the Human Papillomavirus Type 52. The image demonstrates successful recombinant gene amplification at an annealing temperature of 53°C, used for validating positive transformant colonies in the development of HPV vaccines or diagnostic tools.

This diagnostic image is an electrophoregram (agarose gel electrophoresis) showing the results of Polymerase Chain Reaction (PCR) amplification. The image contains three lanes visualized under UV light. On the far left, a 1 kb DNA ladder serves as a molecular weight marker, displaying approximately eight discrete horizontal bands of varying intensity. In the two rightmost lanes, there are clear, thick, high-intensity bands representing amplified DNA fragments. These specific bands are located in the upper half of the gel, positioned just below the 1500 bp mark of the reference ladder, confirming a product size of 1473 bps. This visualization is used in molecular biology and infectious disease research to confirm the presence of the L1-HPV52 gene, a component of the Human Papillomavirus Type 52. The image demonstrates successful recombinant gene amplification at an annealing temperature of 53°C, used for validating positive transformant colonies in the development of HPV vaccines or diagnostic tools.

This schematic illustration outlines the synthesis and immunostimulatory pathway of CpG-MCA hydrogels. The process begins with DNA synthesis steps: 1) Annealing a long single-stranded DNA template with a primer, followed by ligation with T4 DNA ligase to form a circular template; 2) Rolling circle amplification (RCA) and multi-primed chain amplification (MCA) using phi29 DNA polymerase. This enzymatic reaction results in concatemer DNA that self-assembles into a complex 'nanoflower' structure, identified as the MCA-hydrogel. The second part of the diagram depicts the cellular mechanism within an immune cell, likely a macrophage. The MCA-hydrogel is internalized via cellular uptake and sequestered within an endosome. Once inside, the hydrogel undergoes degradation, releasing CpG motifs that interact with Toll-like receptor 9 (TLR-9). This signaling pathway culminates in the secretion of cytokines (e.g., TNF-̑ and IL-6) from the cell, illustrating the gel's potential as a potent immunostimulant for tumor immunotherapy.

This schematic illustration outlines the synthesis and immunostimulatory pathway of CpG-MCA hydrogels. The process begins with DNA synthesis steps: 1) Annealing a long single-stranded DNA template with a primer, followed by ligation with T4 DNA ligase to form a circular template; 2) Rolling circle amplification (RCA) and multi-primed chain amplification (MCA) using phi29 DNA polymerase. This enzymatic reaction results in concatemer DNA that self-assembles into a complex 'nanoflower' structure, identified as the MCA-hydrogel. The second part of the diagram depicts the cellular mechanism within an immune cell, likely a macrophage. The MCA-hydrogel is internalized via cellular uptake and sequestered within an endosome. Once inside, the hydrogel undergoes degradation, releasing CpG motifs that interact with Toll-like receptor 9 (TLR-9). This signaling pathway culminates in the secretion of cytokines (e.g., TNF-̑ and IL-6) from the cell, illustrating the gel's potential as a potent immunostimulant for tumor immunotherapy.

This diagnostic image shows a 1.5% agarose gel electrophoresis result, a common molecular biology technique used in medical genetics and pathology to visualize DNA fragments. The gel contains four lanes labeled A, B, C, and M. Lanes A, B, and C demonstrate single, prominent PCR amplification products of the NPC1L1 gene, specifically a 437 base pair (bp) fragment. These three lanes represent experimental trials conducted at varying annealing temperatures (61.5°C, 60.5°C, and 59.5°C, respectively) to optimize the Polymerase Chain Reaction (PCR) process. The consistent horizontal position of the bands across A, B, and C indicates uniform fragment size. Lane M contains a DNA ladder (marker) with visible increments ranging from 100 bp to 1000 bp, serving as a size reference. The image illustrates the process of verifying specific gene amplification prior to genetic sequencing or restriction fragment length polymorphism (RFLP) analysis for genotype determination.

This diagnostic image shows a 1.5% agarose gel electrophoresis result, a common molecular biology technique used in medical genetics and pathology to visualize DNA fragments. The gel contains four lanes labeled A, B, C, and M. Lanes A, B, and C demonstrate single, prominent PCR amplification products of the NPC1L1 gene, specifically a 437 base pair (bp) fragment. These three lanes represent experimental trials conducted at varying annealing temperatures (61.5°C, 60.5°C, and 59.5°C, respectively) to optimize the Polymerase Chain Reaction (PCR) process. The consistent horizontal position of the bands across A, B, and C indicates uniform fragment size. Lane M contains a DNA ladder (marker) with visible increments ranging from 100 bp to 1000 bp, serving as a size reference. The image illustrates the process of verifying specific gene amplification prior to genetic sequencing or restriction fragment length polymorphism (RFLP) analysis for genotype determination.

Loading Image
Loading Image
Reading File
Searching Images

real-time PCR qPCR amplification curve fluorescence

This diagnostic image displays real-time quantitative PCR (RT-qPCR) amplification curves, a key molecular biology technique used in hematology-oncology for detecting fusion genes and monitoring minimal residual disease. The figure is divided into two panels, A and B. Both panels plot Delta Rn (normalized fluorescence signal) on a logarithmic y-axis against Cycle Number on the x-axis, ranging from 1 to 45 cycles. A horizontal green threshold line is visible in both charts to define the cycle threshold (Ct) value. Panel A illustrates the amplification curve for the NUP98/RARG fusion gene, showing baseline fluctuations followed by an exponential increase starting around cycle 21 and reaching a plateau after cycle 35. Panel B depicts the amplification of the ABL control gene, showing a characteristic sigmoidal curve that crosses the threshold at approximately cycle 22. These curves provide visual evidence of a positive NUP98/RARG rearrangement in a clinical sample, likely from a patient with an atypical acute promyelocytic leukemia (APL) phenotype where traditional PML-RARA fusions are absent.

This diagnostic image displays real-time quantitative PCR (RT-qPCR) amplification curves, a key molecular biology technique used in hematology-oncology for detecting fusion genes and monitoring minimal residual disease. The figure is divided into two panels, A and B. Both panels plot Delta Rn (normalized fluorescence signal) on a logarithmic y-axis against Cycle Number on the x-axis, ranging from 1 to 45 cycles. A horizontal green threshold line is visible in both charts to define the cycle threshold (Ct) value. Panel A illustrates the amplification curve for the NUP98/RARG fusion gene, showing baseline fluctuations followed by an exponential increase starting around cycle 21 and reaching a plateau after cycle 35. Panel B depicts the amplification of the ABL control gene, showing a characteristic sigmoidal curve that crosses the threshold at approximately cycle 22. These curves provide visual evidence of a positive NUP98/RARG rearrangement in a clinical sample, likely from a patient with an atypical acute promyelocytic leukemia (APL) phenotype where traditional PML-RARA fusions are absent.

Two diagnostic plots (A and B) representing real-time quantitative PCR (qPCR) melting or dissociation curves for VEGF-C and EGFR genes. Each plot shows the negative derivative of fluorescence over temperature (-dF/dT vs. Temperature in degrees Celsius). In panel A (VEGF-C), multiple curves overlap to show a single distinct, narrow peak approximately at 84.5°C, indicating a high specificity of the PCR product with consistent melting behavior across samples. Panel B (EGFR) displays a similar narrow, unimodal distribution with a single peak at approximately 83-84°C, confirming the absence of non-specific amplification or primer dimers. This visual information is used to validate the quality of gene expression analysis in the context of lung cancer research, assessing mRNA levels in tumor and lymph node tissues compared to benign lung diseases. The narrow width and single peak of the curves serve as a quality control measure for the primer design and amplification efficiency of these specific oncological markers.

Two diagnostic plots (A and B) representing real-time quantitative PCR (qPCR) melting or dissociation curves for VEGF-C and EGFR genes. Each plot shows the negative derivative of fluorescence over temperature (-dF/dT vs. Temperature in degrees Celsius). In panel A (VEGF-C), multiple curves overlap to show a single distinct, narrow peak approximately at 84.5°C, indicating a high specificity of the PCR product with consistent melting behavior across samples. Panel B (EGFR) displays a similar narrow, unimodal distribution with a single peak at approximately 83-84°C, confirming the absence of non-specific amplification or primer dimers. This visual information is used to validate the quality of gene expression analysis in the context of lung cancer research, assessing mRNA levels in tumor and lymph node tissues compared to benign lung diseases. The narrow width and single peak of the curves serve as a quality control measure for the primer design and amplification efficiency of these specific oncological markers.

This diagnostic graphic consists of two melt peak charts (A and B) generated via quantitative real-time PCR (qRT-PCR) for molecular analysis. Both charts plot Temperature in Celsius on the x-axis against the negative derivative of fluorescence over temperature (-d(RFU)/dT) on the y-axis to identify DNA melting points. 

Panel A illustrates the melt curve for the DEV UL55 gene, showing a baseline of multiple overlapping data lines that remain flat until approximately 82°C, followed by a sharp, uniform peak at 85.0°C. This single, narrow peak indicates high primer specificity and the presence of a single amplification product. 

Panel B shows the melt curve for β-actin, used as an internal control. The data remains stable until roughly 86°C, where it transitions into a distinct single peak at 89.5°C. The absence of secondary peaks or 'shoulders' in both panels confirms the absence of primer-dimers or non-specific genomic DNA amplification, validating the accuracy of the quantitative gene expression analysis.

This diagnostic graphic consists of two melt peak charts (A and B) generated via quantitative real-time PCR (qRT-PCR) for molecular analysis. Both charts plot Temperature in Celsius on the x-axis against the negative derivative of fluorescence over temperature (-d(RFU)/dT) on the y-axis to identify DNA melting points. Panel A illustrates the melt curve for the DEV UL55 gene, showing a baseline of multiple overlapping data lines that remain flat until approximately 82°C, followed by a sharp, uniform peak at 85.0°C. This single, narrow peak indicates high primer specificity and the presence of a single amplification product. Panel B shows the melt curve for β-actin, used as an internal control. The data remains stable until roughly 86°C, where it transitions into a distinct single peak at 89.5°C. The absence of secondary peaks or 'shoulders' in both panels confirms the absence of primer-dimers or non-specific genomic DNA amplification, validating the accuracy of the quantitative gene expression analysis.

Searching Images

gel electrophoresis agarose DNA bands molecular weight ladder

A diagnostic laboratory image showing agarose gel electrophoresis used in molecular biology research. The gel contains three primary lanes. On the far left, a molecular weight DNA ladder (marker) exhibits a series of distinct horizontal white bands used for size estimation, with a prominent band labeled at 1500 base pairs (bp). To the right are two experimental lanes labeled (1) and (2). Both lanes (1) and (2) show a single, clear, high-intensity horizontal band positioned slightly below the 956 bp reference line. The context indicates this represents the negative control for Peripheral Blood Mononuclear Cell (PBMC) transfection using a vector backbone. The uniformity in size and intensity of the bands in lanes (1) and (2) suggests consistent plasmid concentration and successful migration. This image is used to confirm the molecular size and integrity of genetic constructs during the development of CRISPR/Cas9-mediated PD-1 knockout protocols in human immune cells.

A diagnostic laboratory image showing agarose gel electrophoresis used in molecular biology research. The gel contains three primary lanes. On the far left, a molecular weight DNA ladder (marker) exhibits a series of distinct horizontal white bands used for size estimation, with a prominent band labeled at 1500 base pairs (bp). To the right are two experimental lanes labeled (1) and (2). Both lanes (1) and (2) show a single, clear, high-intensity horizontal band positioned slightly below the 956 bp reference line. The context indicates this represents the negative control for Peripheral Blood Mononuclear Cell (PBMC) transfection using a vector backbone. The uniformity in size and intensity of the bands in lanes (1) and (2) suggests consistent plasmid concentration and successful migration. This image is used to confirm the molecular size and integrity of genetic constructs during the development of CRISPR/Cas9-mediated PD-1 knockout protocols in human immune cells.

Diagnostic diagnostic image showing an agarose gel electrophoresis result for the analysis of bacterial 16S rDNA. The image features a dark background with fluorescent horizontal bands organized in vertical lanes. Lane M contains a DNA molecular weight ladder with labeled reference bands at 100, 250, 500, 750, 1000, 2000, 3000, and 5000 base pairs (bp). Lane 1 displays a single, thick, and highly intense fluorescent band representing the amplified UTF-33 16S rDNA product. The vertical position of this band in Lane 1 corresponds to a molecular weight between the 1000 bp and 2000 bp markers, specifically approximately 1440 bp. Lanes 2, 3, and 4 show no visible bands, suggesting they are either negative controls or lanes without successful amplification. The brightness of the bands indicates DNA concentration, and the vertical distribution reflects fragment size separation through the gel matrix. This visual is used to confirm successful genomic extraction and target gene amplification in microbiology and clinical diagnostics.

Diagnostic diagnostic image showing an agarose gel electrophoresis result for the analysis of bacterial 16S rDNA. The image features a dark background with fluorescent horizontal bands organized in vertical lanes. Lane M contains a DNA molecular weight ladder with labeled reference bands at 100, 250, 500, 750, 1000, 2000, 3000, and 5000 base pairs (bp). Lane 1 displays a single, thick, and highly intense fluorescent band representing the amplified UTF-33 16S rDNA product. The vertical position of this band in Lane 1 corresponds to a molecular weight between the 1000 bp and 2000 bp markers, specifically approximately 1440 bp. Lanes 2, 3, and 4 show no visible bands, suggesting they are either negative controls or lanes without successful amplification. The brightness of the bands indicates DNA concentration, and the vertical distribution reflects fragment size separation through the gel matrix. This visual is used to confirm successful genomic extraction and target gene amplification in microbiology and clinical diagnostics.

Running Command

mkdir -p /tmp/workspace/pcr-seminar && ls /tmp/workspace/pcr-seminar/

Writing File

~/pcr-seminar/build_pcr.py


import json, subprocess, base64, textwrap
from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.oxml.ns import qn
from lxml import etree

# ---------- HELPERS ----------
W, H = Inches(13.333), Inches(7.5)

# Color Palette (deep navy + teal accent + white)
NAVY   = RGBColor(0x0D, 0x2A, 0x4A)   # deep navy
TEAL   = RGBColor(0x00, 0x8B, 0x8B)   # dark cyan / teal
LTBLUE = RGBColor(0xE8, 0xF4, 0xFB)   # very light blue bg
GOLD   = RGBColor(0xF0, 0xA5, 0x00)   # accent gold
WHITE  = RGBColor(0xFF, 0xFF, 0xFF)
DKGREY = RGBColor(0x2C, 0x2C, 0x2C)
MGREY  = RGBColor(0x55, 0x55, 0x55)

def rgb_hex(r):
    return "#{:02X}{:02X}{:02X}".format(r[0], r[1], r[2])

prs = Presentation()
prs.slide_width  = W
prs.slide_height = H
blank = prs.slide_layouts[6]

def add_rect(slide, x, y, w, h, fill_rgb=None, alpha=None):
    shape = slide.shapes.add_shape(1, x, y, w, h)   # MSO_SHAPE_TYPE.RECTANGLE = 1
    shape.line.fill.background()
    if fill_rgb:
        shape.fill.solid()
        shape.fill.fore_color.rgb = fill_rgb
    else:
        shape.fill.background()
    return shape

def add_tb(slide, x, y, w, h, text, size, bold=False, color=WHITE,
           align=PP_ALIGN.LEFT, wrap=True, italic=False, font="Calibri"):
    tb = slide.shapes.add_textbox(x, y, w, h)
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
    p = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.name  = font
    run.font.size  = Pt(size)
    run.font.bold  = bold
    run.font.italic = italic
    run.font.color.rgb = color
    return tb

def add_bullet_tb(slide, x, y, w, h, bullets, size=14, bold_first=False,
                  color=DKGREY, spacing_before=6):
    tb = slide.shapes.add_textbox(x, y, w, h)
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top = Pt(2)
    tf.margin_bottom = Pt(2)
    first = True
    for b in bullets:
        if first:
            p = tf.paragraphs[0]
            first = False
        else:
            p = tf.add_paragraph()
        pPr = p._pPr
        if pPr is None:
            pPr = p._p.get_or_add_pPr()
        pPr.set(qn('a:marL'), str(int(Pt(14).pt * 12700)))
        pPr.set(qn('a:indent'), str(int(-Pt(14).pt * 12700)))
        spc = etree.SubElement(pPr, qn('a:spcBef'))
        spcPts = etree.SubElement(spc, qn('a:spcPts'))
        spcPts.set('val', str(spacing_before * 100))
        run = p.add_run()
        run.text = "\u2022  " + b
        run.font.name = "Calibri"
        run.font.size = Pt(size)
        run.font.bold = bold_first and b == bullets[0]
        run.font.color.rgb = color
    return tb

def header_bar(slide, title, subtitle=None):
    # Full navy header bar
    add_rect(slide, 0, 0, W, Inches(1.15), NAVY)
    # Gold accent stripe
    add_rect(slide, 0, Inches(1.15), W, Inches(0.06), GOLD)
    # Title text
    add_tb(slide, Inches(0.4), Inches(0.1), Inches(12.5), Inches(0.65),
           title, 28, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
    if subtitle:
        add_tb(slide, Inches(0.4), Inches(0.72), Inches(12.5), Inches(0.38),
               subtitle, 15, bold=False, color=GOLD, align=PP_ALIGN.LEFT, italic=True)

def light_bg(slide):
    add_rect(slide, 0, 0, W, H, LTBLUE)

def footer(slide, text="PCR - Seminar | MD Biochemistry", page=None):
    add_rect(slide, 0, Inches(7.1), W, Inches(0.4), NAVY)
    label = text + (f"   |   Slide {page}" if page else "")
    add_tb(slide, Inches(0.3), Inches(7.12), Inches(12.5), Inches(0.35),
           label, 10, color=WHITE, align=PP_ALIGN.LEFT)

# ================================================================
# SLIDE 1 — TITLE SLIDE
# ================================================================
def slide_title():
    slide = prs.slides.add_slide(blank)
    # Full navy bg
    add_rect(slide, 0, 0, W, H, NAVY)
    # Teal accent band
    add_rect(slide, 0, Inches(2.8), W, Inches(0.12), TEAL)
    add_rect(slide, 0, Inches(5.5), W, Inches(0.08), GOLD)
    # PCR graphic letters (large decorative)
    add_tb(slide, Inches(9.5), Inches(1.0), Inches(3.5), Inches(4.0),
           "PCR", 160, bold=True, color=RGBColor(0x00,0x6E,0x6E), align=PP_ALIGN.CENTER)
    # Main title
    add_tb(slide, Inches(0.6), Inches(1.1), Inches(9.0), Inches(1.3),
           "Polymerase Chain Reaction", 44, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
    # Subtitle
    add_tb(slide, Inches(0.6), Inches(2.45), Inches(9.0), Inches(0.6),
           "Principles, Types, Variants & Clinical Applications", 22,
           bold=False, color=GOLD, align=PP_ALIGN.LEFT, italic=True)
    # Divider
    add_rect(slide, Inches(0.6), Inches(3.15), Inches(5.0), Inches(0.05), TEAL)
    # Speaker info
    add_tb(slide, Inches(0.6), Inches(3.3), Inches(9.0), Inches(0.45),
           "Seminar Presentation  |  MD Biochemistry PG Residency", 16,
           color=RGBColor(0xAD,0xD8,0xE6), align=PP_ALIGN.LEFT)
    add_tb(slide, Inches(0.6), Inches(3.8), Inches(9.0), Inches(0.4),
           "August 2026", 15, color=RGBColor(0xAD,0xD8,0xE6), align=PP_ALIGN.LEFT)
    # Bottom source note
    add_tb(slide, Inches(0.5), Inches(6.9), Inches(12.0), Inches(0.4),
           "Sources: Henry's Clinical Diagnosis (9780323673204) | Tietz Textbook of Lab Medicine (9780323775724) | Medical Microbiology 9e | Emery's Medical Genetics",
           9, color=RGBColor(0x88, 0xBB, 0xDD), align=PP_ALIGN.LEFT)

# ================================================================
# SLIDE 2 — TABLE OF CONTENTS
# ================================================================
def slide_toc():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Contents at a Glance")
    footer(slide, page=2)

    topics = [
        ("1", "Historical Background & Nobel Prize"),
        ("2", "Basic Principles & Molecular Basis"),
        ("3", "Components of PCR Reaction"),
        ("4", "The Three-Step Thermal Cycle"),
        ("5", "Amplification Kinetics & Efficiency"),
        ("6", "Detection Methods after PCR"),
        ("7", "Types & Variants of PCR"),
        ("8", "Real-Time (qPCR) in Detail"),
        ("9", "Clinical & Diagnostic Applications"),
        ("10", "Limitations, Errors & QC"),
    ]

    cols = [topics[:5], topics[5:]]
    x_starts = [Inches(0.5), Inches(6.9)]
    for col_idx, col in enumerate(cols):
        x = x_starts[col_idx]
        y = Inches(1.5)
        for num, text in col:
            # Number bubble
            add_rect(slide, x, y, Inches(0.55), Inches(0.5), TEAL)
            add_tb(slide, x, y, Inches(0.55), Inches(0.5), num, 16,
                   bold=True, color=WHITE, align=PP_ALIGN.CENTER)
            add_tb(slide, x+Inches(0.65), y+Inches(0.04), Inches(5.8), Inches(0.45),
                   text, 15, color=DKGREY, align=PP_ALIGN.LEFT)
            y += Inches(0.72)

# ================================================================
# SLIDE 3 — HISTORICAL BACKGROUND
# ================================================================
def slide_history():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Historical Background", "From Concept to Nobel Prize")
    footer(slide, page=3)

    milestones = [
        ("1953", "Watson & Crick describe double helix structure of DNA"),
        ("1956", "Arthur Kornberg discovers DNA Polymerase I"),
        ("1971", "Kleppe et al. describe primer-directed DNA replication concept"),
        ("1983", "Kary Mullis conceives PCR during a night drive in California"),
        ("1985", "Saiki et al. publish first PCR paper using Klenow fragment"),
        ("1988", "Taq polymerase introduced - fully automated thermal cycling becomes possible"),
        ("1993", "Kary Mullis awarded Nobel Prize in Chemistry for PCR"),
        ("1992", "Reverse-transcriptase PCR (RT-PCR) developed for RNA targets"),
        ("1996", "Real-time PCR (qPCR) commercially available - TaqMan probes"),
        ("2006+", "Digital PCR and multiplex platforms revolutionize diagnostics"),
    ]

    y = Inches(1.35)
    # Timeline bar
    add_rect(slide, Inches(1.55), Inches(1.4), Inches(0.05), Inches(5.6), TEAL)
    for yr, event in milestones:
        # Year box
        add_rect(slide, Inches(0.3), y, Inches(1.15), Inches(0.42), NAVY)
        add_tb(slide, Inches(0.3), y, Inches(1.15), Inches(0.42), yr, 13,
               bold=True, color=WHITE, align=PP_ALIGN.CENTER)
        # Dot on timeline
        add_rect(slide, Inches(1.46), y+Inches(0.1), Inches(0.22), Inches(0.22), GOLD)
        # Event text
        add_tb(slide, Inches(1.9), y+Inches(0.02), Inches(10.8), Inches(0.4),
               event, 13, color=DKGREY)
        y += Inches(0.55)

# ================================================================
# SLIDE 4 — BASIC PRINCIPLES
# ================================================================
def slide_principles():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Basic Principles of PCR", "In Vitro Enzymatic DNA Amplification")
    footer(slide, page=4)

    add_tb(slide, Inches(0.4), Inches(1.3), Inches(8.5), Inches(0.45),
           "What is PCR?", 18, bold=True, color=NAVY)
    add_tb(slide, Inches(0.4), Inches(1.75), Inches(8.5), Inches(0.8),
           "PCR is a simple in vitro chemical reaction that permits the synthesis of essentially "
           "limitless quantities of a targeted nucleic acid sequence through repeated cycles of "
           "DNA denaturation, primer annealing, and enzymatic extension.",
           13, color=DKGREY, wrap=True)

    add_tb(slide, Inches(0.4), Inches(2.6), Inches(8.5), Inches(0.4),
           "Key Molecular Basis:", 16, bold=True, color=TEAL)
    bullets = [
        "DNA polymerase copies a DNA strand - requires a primer (short oligonucleotide) and template",
        "Two primers flank the target sequence on opposite strands (forward & reverse)",
        "Primers are typically 18-30 bases long; complementary to opposite strands",
        "Heat-stable Taq polymerase (from Thermus aquaticus) allows automated cycling",
        "Each cycle theoretically doubles the amount of product: 2n amplification after n cycles",
        "After 20 cycles: ~10^6-fold amplification; after 30 cycles: ~10^9-fold amplification",
        "Entire reaction carried out in a programmable thermal cycler",
    ]
    add_bullet_tb(slide, Inches(0.5), Inches(3.1), Inches(8.2), Inches(3.8),
                  bullets, size=13)

    # PCR diagram image
    add_tb(slide, Inches(9.0), Inches(1.3), Inches(4.0), Inches(0.4),
           "PCR Cycle Diagram", 13, bold=True, color=NAVY, align=PP_ALIGN.CENTER)
    # Download and embed image
    result = json.loads(subprocess.check_output([
        "python", "/tmp/skills/shared/scripts/fetch_images.py",
        "https://cdn.orris.care/cdss_images/4c60c84b781337c52d27aad4770be55fd482bcdfd116eddc21c9071edda75d5a.png"
    ]))
    if result and result[0].get("base64"):
        raw = base64.b64decode(result[0]["base64"].split(",", 1)[-1])
        from pptx.util import Inches as In
        slide.shapes.add_picture(BytesIO(raw), Inches(8.9), Inches(1.7), Inches(4.2), Inches(5.4))

# ================================================================
# SLIDE 5 — COMPONENTS OF PCR
# ================================================================
def slide_components():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Components of a PCR Reaction", "What Goes Into the Tube")
    footer(slide, page=5)

    components = [
        ("Template DNA", "Target dsDNA to be amplified; can be genomic, plasmid, or cDNA", NAVY),
        ("Forward Primer", "18-30 nt oligonucleotide; binds 5' end of sense strand; sets left boundary", TEAL),
        ("Reverse Primer", "18-30 nt oligonucleotide; binds 5' end of antisense strand; sets right boundary", RGBColor(0x8B,0x00,0x8B)),
        ("Taq Polymerase", "Thermostable DNA polymerase from Thermus aquaticus; active at 72°C; lacks 3'→5' proofreading", RGBColor(0xB8,0x49,0x00)),
        ("dNTPs", "Equimolar mixture of dATP, dCTP, dGTP, dTTP; building blocks for new strand synthesis", RGBColor(0x00,0x6B,0x3C)),
        ("MgCl2", "Essential cofactor for Taq polymerase; optimal 1.5-2.5 mM; excess inhibits reaction", RGBColor(0x8B,0x45,0x13)),
        ("Buffer (KCl, Tris-HCl)", "Maintains optimal pH (~8.3-8.8 at room temp); KCl stabilizes primer-template binding", MGREY),
    ]

    y = Inches(1.4)
    for comp, desc, color in components:
        add_rect(slide, Inches(0.3), y, Inches(2.5), Inches(0.52), color)
        add_tb(slide, Inches(0.3), y, Inches(2.5), Inches(0.52), comp, 13,
               bold=True, color=WHITE, align=PP_ALIGN.CENTER)
        add_tb(slide, Inches(2.95), y+Inches(0.05), Inches(10.0), Inches(0.45),
               desc, 13, color=DKGREY)
        y += Inches(0.68)

    # Note box
    add_rect(slide, Inches(0.3), Inches(6.45), Inches(12.6), Inches(0.55), RGBColor(0xFF,0xF3,0xCD))
    add_tb(slide, Inches(0.4), Inches(6.47), Inches(12.4), Inches(0.5),
           "NOTE: Reaction also requires mineral oil overlay (older cyclers) or hot-start modifications. "
           "Proofread polymerases (Pfu, Phusion) have 3'→5' exonuclease activity but lower speed.",
           11, color=RGBColor(0x7B,0x4F,0x00))

# ================================================================
# SLIDE 6 — THREE-STEP THERMAL CYCLE
# ================================================================
def slide_cycle():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "The Three-Step Thermal Cycle", "Denaturation → Annealing → Extension")
    footer(slide, page=6)

    steps = [
        ("STEP 1\nDENATURATION", "94-96°C\n20-30 sec",
         "Hydrogen bonds between base pairs are broken\nDouble-stranded DNA separates into two single strands\nExposes both template strands for primer binding\nInitial denaturation: 94-98°C for 2-5 min to fully denature template",
         NAVY),
        ("STEP 2\nANNEALING", "50-65°C\n20-40 sec",
         "Temperature lowered to allow primers to bind\nPrimers hybridize to complementary single-stranded templates\nAnnealing Temp (Ta) = Tm - 5°C (where Tm = 2(A+T) + 4(G+C))\nSpecificity determined here; too low = non-specific; too high = no product",
         TEAL),
        ("STEP 3\nEXTENSION", "72°C\n1 min/kb",
         "Taq polymerase extends primers from 3' end\nSynthesizes new complementary strand in 5'→3' direction\n72°C = optimal temperature for Taq polymerase activity\nFinal extension: 72°C for 5-10 min to complete all partial products",
         RGBColor(0x00,0x6B,0x3C)),
    ]

    x = Inches(0.35)
    for title, temp, desc, color in steps:
        add_rect(slide, x, Inches(1.35), Inches(4.1), Inches(1.1), color)
        add_tb(slide, x, Inches(1.35), Inches(4.1), Inches(0.7),
               title, 14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
        add_tb(slide, x, Inches(2.05), Inches(4.1), Inches(0.4),
               temp, 13, bold=True, color=GOLD, align=PP_ALIGN.CENTER)

        add_rect(slide, x, Inches(2.5), Inches(4.1), Inches(3.5), WHITE)
        add_tb(slide, x+Inches(0.15), Inches(2.6), Inches(3.8), Inches(3.3),
               desc, 13, color=DKGREY, wrap=True)
        x += Inches(4.35)

    # Arrows between steps
    for ax in [Inches(4.5), Inches(8.85)]:
        add_rect(slide, ax, Inches(1.85), Inches(0.4), Inches(0.08), GOLD)
        # Arrow head hint via text
        add_tb(slide, ax-Inches(0.05), Inches(1.75), Inches(0.5), Inches(0.4),
               "▶", 18, color=GOLD, align=PP_ALIGN.CENTER)

    # Cycle note
    add_rect(slide, Inches(0.35), Inches(6.2), Inches(12.65), Inches(0.65),
             RGBColor(0xE0, 0xF7, 0xFA))
    add_tb(slide, Inches(0.5), Inches(6.25), Inches(12.4), Inches(0.55),
           "CYCLE KINETICS: After n cycles → (1+e)^n amplification (e = efficiency, 0-1). "
           "At 100% efficiency: 20 cycles = 10^6 fold; 30 cycles = 10^9 fold. "
           "Typical diagnostic PCR runs 30-45 cycles. Initial denaturation + final extension are extra steps.",
           12, color=NAVY)

# ================================================================
# SLIDE 7 — DETECTION METHODS
# ================================================================
def slide_detection():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Detection of PCR Products", "Visualization & Analysis Methods")
    footer(slide, page=7)

    methods = [
        ("Agarose Gel Electrophoresis",
         "Classic method. Products separated by size in 1-2% agarose gel. "
         "Visualized with EtBr or SYBR Safe under UV light. "
         "Size confirmed using DNA ladder. Simple, cheap, qualitative.",
         "Sensitivity: ~1-10 ng DNA | Limitations: Open-tube contamination risk, semi-quantitative only"),
        ("Capillary Electrophoresis",
         "Finer size discrimination than gel. Automated, high-throughput. "
         "Fluorescently labeled primers allow multiplexed fragment analysis. "
         "Used in forensic DNA typing (STR analysis) and microsatellite analysis.",
         "Sensitivity: single-molecule | Applications: Fragment sizing, HLA typing, mutation scanning"),
        ("Probe Hybridization / TaqMan",
         "Dual-labeled probe (fluorophore + quencher) binds internal to product. "
         "5'→3' exonuclease activity of Taq cleaves probe → fluorescence released. "
         "Signal proportional to product amount - forms basis of real-time PCR.",
         "Specificity: Very high | Key advantage: Closed-tube, no post-PCR processing needed"),
        ("Melting Curve Analysis",
         "After amplification, slow temperature increase dissociates dsDNA. "
         "Melting temperature (Tm) characteristic of sequence and GC content. "
         "Mutations alter Tm - allows genotyping without sequencing. "
         "SYBR Green or hybridization probes used.",
         "First derivative (-dF/dT) plotted vs. temperature - each product gives distinct peak"),
        ("Mass Spectrometry",
         "Accurate sizing of PCR products. Used in microbial identification (MALDI-TOF based). "
         "Can detect multiple amplicons simultaneously and identify SNPs.",
         "Applications: Broad-range pathogen identification, SNP genotyping, methylation analysis"),
    ]

    y = Inches(1.38)
    for i, (method, desc, note) in enumerate(methods):
        bg = WHITE if i % 2 == 0 else RGBColor(0xF0, 0xF8, 0xFF)
        add_rect(slide, Inches(0.3), y, Inches(12.7), Inches(0.92), bg)
        add_tb(slide, Inches(0.45), y+Inches(0.04), Inches(3.0), Inches(0.35),
               method, 13, bold=True, color=NAVY)
        add_tb(slide, Inches(0.45), y+Inches(0.38), Inches(6.0), Inches(0.5),
               desc, 11, color=DKGREY, wrap=True)
        add_tb(slide, Inches(6.7), y+Inches(0.04), Inches(6.2), Inches(0.82),
               note, 11, color=MGREY, wrap=True, italic=True)
        y += Inches(0.97)

    # Gel image
    result = json.loads(subprocess.check_output([
        "python", "/tmp/skills/shared/scripts/fetch_images.py",
        "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9d9c48eda10404b23254c5d5933cd2e27730d7d1cafecffec4ffb5a044022964.jpg"
    ]))
    if result and result[0].get("base64"):
        raw = base64.b64decode(result[0]["base64"].split(",",1)[-1])
        slide.shapes.add_picture(BytesIO(raw), Inches(10.3), Inches(6.15), Inches(2.5), Inches(1.1))
        add_tb(slide, Inches(10.3), Inches(6.1), Inches(2.5), Inches(0.25),
               "Gel electrophoresis - PCR product", 8, color=MGREY, align=PP_ALIGN.CENTER)

# ================================================================
# SLIDE 8 — TYPES & VARIANTS
# ================================================================
def slide_types():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Types & Variants of PCR", "Expanding the Technology")
    footer(slide, page=8)

    variants = [
        ("RT-PCR\n(Reverse Transcriptase)", NAVY,
         "RNA → cDNA (via reverse transcriptase) → PCR amplification. "
         "Single-enzyme (thermostable RT+Taq) or two-enzyme system. "
         "Applications: RNA viruses (HIV, Influenza, COVID-19), gene expression analysis, mRNA quantification."),
        ("Nested PCR", TEAL,
         "Two rounds of PCR with two primer sets. Outer primers (Rd 1, 15-30 cycles) then inner "
         "primers (Rd 2) amplify internal sequence. Increases sensitivity and specificity. "
         "Hemi-nested: one primer shared between rounds. Risk: contamination during transfer."),
        ("Multiplex PCR", RGBColor(0x8B,0x00,0x8B),
         "Multiple primer pairs in single reaction amplify different targets simultaneously. "
         "All primers must have similar Tm; bands must be different sizes for separation. "
         "Applications: STD panels, respiratory panels, CFTR mutation analysis."),
        ("Real-Time PCR (qPCR)", RGBColor(0xB8,0x49,0x00),
         "Detects and quantifies amplification in real time via fluorescence. "
         "SYBR Green (intercalating dye) or TaqMan probes. Ct value inversely proportional "
         "to initial template quantity. Gold standard for quantitative nucleic acid testing."),
        ("Digital PCR (dPCR)", RGBColor(0x00,0x6B,0x3C),
         "Partitions sample into thousands of micro-droplets or chambers. Each contains 0 or 1 "
         "target molecule. Absolute quantification without standard curve. "
         "Droplet Digital PCR (ddPCR): ~20,000 droplets per reaction. Exquisite sensitivity."),
        ("Hot-Start PCR", RGBColor(0x4B,0x00,0x82),
         "Taq polymerase inactivated by antibody or chemical modification until initial denaturation. "
         "Prevents non-specific amplification at lower temperatures during setup. "
         "Improves specificity and yield."),
        ("Allele-Specific PCR (ARMS)", RGBColor(0x8B,0x45,0x13),
         "Amplification Refractory Mutation System. Primer designed to anneal only to specific allele "
         "at 3' end. If mismatch at 3' end → no extension. Detects known SNPs/mutations. "
         "Used in CFTR, Factor V Leiden, sickle cell disease."),
        ("Long-Range PCR", RGBColor(0x2F,0x4F,0x4F),
         "Proofreading polymerase blends enable amplification of 10-40 kb fragments. "
         "Required for whole-gene analysis, large deletion detection, phasing of variants."),
    ]

    x, y = Inches(0.25), Inches(1.38)
    col_count = 0
    for i, (name, color, desc) in enumerate(variants):
        if col_count == 4:
            x = Inches(6.75)
            y = Inches(1.38)
        add_rect(slide, x, y, Inches(6.25), Inches(1.3), color)
        add_tb(slide, x+Inches(0.12), y+Inches(0.06), Inches(6.0), Inches(0.45),
               name, 13, bold=True, color=WHITE)
        add_tb(slide, x+Inches(0.12), y+Inches(0.48), Inches(6.0), Inches(0.78),
               desc, 11, color=RGBColor(0xE8,0xE8,0xE8), wrap=True)
        y += Inches(1.45)
        col_count += 1

# ================================================================
# SLIDE 9 — REAL-TIME PCR IN DETAIL
# ================================================================
def slide_qpcr():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Real-Time PCR (qPCR) - In Detail", "Quantitative Fluorescence-Based Detection")
    footer(slide, page=9)

    # Left column: principles
    add_tb(slide, Inches(0.4), Inches(1.35), Inches(6.3), Inches(0.4),
           "Principle of qPCR", 16, bold=True, color=NAVY)
    add_tb(slide, Inches(0.4), Inches(1.78), Inches(6.3), Inches(1.5),
           "Fluorescence monitored after each cycle. Signal rises as product accumulates. "
           "The cycle at which fluorescence exceeds background is the threshold cycle (Ct). "
           "Ct is inversely proportional to the log of initial template concentration.",
           13, color=DKGREY, wrap=True)

    add_tb(slide, Inches(0.4), Inches(3.35), Inches(6.3), Inches(0.4),
           "Phases of qPCR Amplification Curve", 15, bold=True, color=TEAL)
    phases = [
        "Baseline phase: Fluorescence below detection threshold",
        "Exponential phase: Doubling of product each cycle (most accurate for quantification)",
        "Linear phase: Reaction efficiency begins to decrease",
        "Plateau phase: Reagent depletion - product stops increasing",
    ]
    add_bullet_tb(slide, Inches(0.5), Inches(3.8), Inches(6.0), Inches(1.7),
                  phases, size=12)

    add_tb(slide, Inches(0.4), Inches(5.55), Inches(6.3), Inches(0.4),
           "Detection Chemistries", 15, bold=True, color=TEAL)
    chems = [
        "SYBR Green: Intercalating dye - binds all dsDNA; cheap; risk of non-specific signals",
        "TaqMan Probe: 5' FAM + 3' QUENCHER - cleaved by Taq exonuclease; highly specific",
        "Molecular Beacons: Hairpin structure; opens when target bound; no degradation",
        "FRET probes: Two adjacent probes; energy transfer only when both bound to target",
    ]
    add_bullet_tb(slide, Inches(0.5), Inches(5.98), Inches(6.0), Inches(1.35),
                  chems, size=12)

    # Right column: qPCR image + quantification
    add_tb(slide, Inches(7.0), Inches(1.35), Inches(6.0), Inches(0.4),
           "Amplification Curves", 15, bold=True, color=NAVY, align=PP_ALIGN.CENTER)
    result = json.loads(subprocess.check_output([
        "python", "/tmp/skills/shared/scripts/fetch_images.py",
        "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9e62953b871c277fe50f3546a52a2bbda85016fb36f0b390ceb5e6aa8c7b74ac.jpg"
    ]))
    if result and result[0].get("base64"):
        raw = base64.b64decode(result[0]["base64"].split(",",1)[-1])
        slide.shapes.add_picture(BytesIO(raw), Inches(7.0), Inches(1.8), Inches(5.9), Inches(2.5))

    add_tb(slide, Inches(7.0), Inches(4.4), Inches(6.0), Inches(0.4),
           "Quantification Methods", 15, bold=True, color=TEAL)
    quant = [
        "Absolute quantification: Standard curve with known copy numbers",
        "Relative quantification: Normalized to housekeeping gene (GAPDH, beta-actin) using 2^-DDCt",
        "Efficiency-corrected calculation: Accounts for variable amplification efficiency",
        "Digital PCR: Absolute quant without standards - Poisson distribution based",
    ]
    add_bullet_tb(slide, Inches(7.1), Inches(4.9), Inches(6.0), Inches(1.8),
                  quant, size=12)

# ================================================================
# SLIDE 10 — CLINICAL APPLICATIONS
# ================================================================
def slide_clinical():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Clinical & Diagnostic Applications of PCR",
               "From Bench to Bedside")
    footer(slide, page=10)

    categories = [
        ("Infectious Disease\nDiagnosis", NAVY, [
            "HIV-1/2 viral load monitoring (RT-PCR)",
            "HBV/HCV quantification - guides antiviral therapy",
            "TB detection (Xpert MTB/RIF - automated PCR)",
            "COVID-19 SARS-CoV-2 RT-PCR",
            "STI panels: Chlamydia, Gonorrhoea, HSV",
            "Respiratory multiplex: Flu A/B, RSV, adenovirus",
        ]),
        ("Genetic &\nMolecular Diagnosis", TEAL, [
            "Carrier screening: CFTR mutations (cystic fibrosis)",
            "Factor V Leiden, prothrombin G20210A (ARMS-PCR)",
            "Sickle cell disease, beta-thalassaemia genotyping",
            "HLA typing for organ transplantation",
            "Chromosomal microarray + QF-PCR (prenatal diagnosis)",
            "Trinucleotide repeat expansion: Huntington's, Fragile X",
        ]),
        ("Oncology", RGBColor(0xB8,0x49,0x00), [
            "BCR-ABL1 quantification (CML - MRD monitoring)",
            "EGFR, KRAS, BRAF mutation detection",
            "Liquid biopsy - ctDNA detection (ddPCR)",
            "HPV genotyping (cervical cancer screening)",
            "MSI testing in colorectal cancer",
            "Clonality analysis (IGH/TCR rearrangements)",
        ]),
        ("Forensic &\nOther Applications", RGBColor(0x2F,0x4F,0x4F), [
            "Forensic DNA profiling (STR multiplex PCR)",
            "Paternity & identity testing",
            "Food authenticity testing (species ID)",
            "Sepsis/bloodstream infection (rapid PCR panels)",
            "Research: Gene expression, cloning, mutagenesis",
            "Pharmacogenomics: CYP2C9, CYP2C19, CYP2D6",
        ]),
    ]

    x = Inches(0.25)
    for cat_name, color, apps in categories:
        add_rect(slide, x, Inches(1.38), Inches(3.15), Inches(5.8), WHITE)
        add_rect(slide, x, Inches(1.38), Inches(3.15), Inches(0.85), color)
        add_tb(slide, x+Inches(0.1), Inches(1.38), Inches(2.95), Inches(0.85),
               cat_name, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
        by = Inches(2.32)
        for app in apps:
            add_tb(slide, x+Inches(0.12), by, Inches(2.9), Inches(0.48),
                   "• " + app, 11, color=DKGREY, wrap=True)
            by += Inches(0.8)
        x += Inches(3.28)

# ================================================================
# SLIDE 11 — LIMITATIONS & QC
# ================================================================
def slide_limitations():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Limitations, Sources of Error & Quality Control",
               "Critical Evaluation of PCR Results")
    footer(slide, page=11)

    # Left: Limitations
    add_rect(slide, Inches(0.3), Inches(1.38), Inches(6.0), Inches(5.8), WHITE)
    add_rect(slide, Inches(0.3), Inches(1.38), Inches(6.0), Inches(0.5), NAVY)
    add_tb(slide, Inches(0.3), Inches(1.38), Inches(6.0), Inches(0.5),
           "Limitations & Sources of Error", 14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    lims = [
        ("False Positives",
         "Contamination from prior PCR products (amplicon carryover). "
         "Addressed by: closed-tube systems, UNG (uracil-N-glycosylase) carry-over prevention, "
         "separate pre/post PCR areas, dUTP substitution."),
        ("False Negatives",
         "Inhibitors in clinical specimens (haemoglobin, heparin, bile salts, EDTA, humic acid). "
         "Primer-target mismatch due to sequence variation/mutation in target region. "
         "Inadequate sample quality or extraction failure."),
        ("Non-specific Amplification",
         "Primer dimers, mispriming at suboptimal annealing temperature. "
         "Incorrect Tm calculation. Remedied by hot-start PCR, touchdown PCR, redesigning primers."),
        ("Inhibition",
         "PCR efficiency formula: (1+e)^n. Inhibitors reduce 'e'. Internal amplification "
         "controls (IAC) added to detect inhibition. Beta-globin as sample quality control."),
    ]
    y = Inches(2.0)
    for title, desc in lims:
        add_tb(slide, Inches(0.5), y, Inches(5.6), Inches(0.35), title, 13, bold=True, color=TEAL)
        add_tb(slide, Inches(0.5), y+Inches(0.36), Inches(5.6), Inches(0.8), desc, 11, color=DKGREY, wrap=True)
        y += Inches(1.22)

    # Right: QC Measures
    add_rect(slide, Inches(6.8), Inches(1.38), Inches(6.2), Inches(5.8), WHITE)
    add_rect(slide, Inches(6.8), Inches(1.38), Inches(6.2), Inches(0.5), TEAL)
    add_tb(slide, Inches(6.8), Inches(1.38), Inches(6.2), Inches(0.5),
           "Quality Control & Troubleshooting", 14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    qcs = [
        "Positive Control: Known positive sample - confirms reagents working",
        "Negative Control (NTC): No-template control - detects contamination",
        "Internal Amplification Control: Competitor template in same tube - detects inhibition",
        "Extraction Control: Confirms nucleic acid extraction efficiency",
        "Efficiency check: qPCR standard curve slope should be -3.3 (100% efficiency = 2-fold/cycle)",
        "Ct reproducibility: CV <2% acceptable for duplicates",
        "Proficiency testing: Mandatory for accredited clinical labs (NABL/CAP/ISO 15189)",
        "Equipment: Thermal cycler calibration, uniform block temperature verification",
        "Pre-analytic: Sample quality (A260/280 = 1.8-2.0), storage conditions, freeze-thaw cycles",
        "Reporting: Always report assay details - platform, gene target, limit of detection",
    ]
    add_bullet_tb(slide, Inches(7.0), Inches(2.0), Inches(5.8), Inches(5.0),
                  qcs, size=12, color=DKGREY, spacing_before=4)

# ================================================================
# SLIDE 12 — COMPARISON TABLE
# ================================================================
def slide_comparison():
    slide = prs.slides.add_slide(blank)
    light_bg(slide)
    header_bar(slide, "Comparative Summary of PCR Variants",
               "Quick Reference for Clinical Decision Making")
    footer(slide, page=12)

    headers = ["PCR Type", "Target", "Quantitative?", "Key Feature", "Clinical Use"]
    rows = [
        ["Conventional PCR", "DNA", "No", "Simple, qualitative", "Pathogen detection, genotyping"],
        ["RT-PCR", "RNA", "No", "RNA amplification via cDNA", "RNA viruses, gene expression"],
        ["Nested PCR", "DNA/RNA", "No", "Ultra-sensitive, 2 rounds", "Low-copy targets (TB, viral load)"],
        ["Multiplex PCR", "Multiple", "No", "Multiple targets at once", "Respiratory panels, STI panels"],
        ["Real-Time qPCR", "DNA/RNA", "Yes (relative)", "Fluorescence quantification", "Viral loads, MRD, oncology"],
        ["Digital PCR", "DNA/RNA", "Yes (absolute)", "Partition + Poisson stats", "Rare mutation detection, ctDNA"],
        ["ARMS-PCR", "DNA", "No", "Allele-specific primers", "SNP/mutation genotyping"],
        ["Hot-Start PCR", "DNA", "No", "Enzyme blocked till 95°C", "Improves specificity"],
    ]

    col_widths = [Inches(2.2), Inches(1.2), Inches(1.4), Inches(3.0), Inches(4.8)]
    x_starts = [Inches(0.3)]
    for w in col_widths[:-1]:
        x_starts.append(x_starts[-1] + w + Inches(0.03))

    # Header row
    y = Inches(1.38)
    for i, (hdr, w) in enumerate(zip(headers, col_widths)):
        add_rect(slide, x_starts[i], y, w, Inches(0.5), NAVY)
        add_tb(slide, x_starts[i], y, w, Inches(0.5), hdr, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

    # Data rows
    for r, row in enumerate(rows):
        y += Inches(0.55)
        bg = WHITE if r % 2 == 0 else RGBColor(0xF0, 0xF8, 0xFF)
        for i, (cell, w) in enumerate(zip(row, col_widths)):
            add_rect(slide, x_starts[i], y, w, Inches(0.52), bg)
            c = NAVY if i == 0 else DKGREY
            add_tb(slide, x_starts[i]+Inches(0.05), y+Inches(0.04), w-Inches(0.1), Inches(0.45),
                   cell, 11, bold=(i==0), color=c, wrap=True)

# ================================================================
# SLIDE 13 — SUMMARY / TAKE-HOME
# ================================================================
def slide_summary():
    slide = prs.slides.add_slide(blank)
    add_rect(slide, 0, 0, W, H, NAVY)
    add_rect(slide, 0, Inches(1.7), W, Inches(0.08), GOLD)
    add_rect(slide, 0, Inches(5.9), W, Inches(0.08), TEAL)
    footer(slide, page=13)

    add_tb(slide, Inches(0.5), Inches(0.3), Inches(12.0), Inches(0.65),
           "Key Take-Home Messages", 34, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_tb(slide, Inches(0.5), Inches(1.05), Inches(12.0), Inches(0.55),
           "What Every MD Biochemistry Resident Must Know About PCR",
           18, bold=False, color=GOLD, align=PP_ALIGN.CENTER, italic=True)

    messages = [
        ("Principle", "PCR amplifies specific DNA sequences via exponential replication - "
                      "3 steps: Denaturation (94-96°C), Annealing (50-65°C), Extension (72°C)."),
        ("Power", "A single target DNA molecule can yield over 1 billion copies in 30 cycles. "
                  "Amplification efficiency: (1+e)^n fold."),
        ("Variants Matter", "RT-PCR detects RNA viruses; qPCR quantifies; multiplex detects panels; "
                            "digital PCR provides absolute quantification without standards."),
        ("Clinical Utility", "HIV/HBV/HCV viral loads, TB (Xpert), COVID-19, BCR-ABL1, CFTR, "
                              "prenatal diagnosis, forensics - PCR touches every specialty."),
        ("Quality First", "Always include positive + negative controls. Carryover contamination "
                          "is the #1 source of false positives. Inhibitors cause false negatives."),
    ]

    y = Inches(2.0)
    for key, msg in messages:
        add_rect(slide, Inches(0.5), y, Inches(12.0), Inches(0.72), RGBColor(0x12, 0x3A, 0x60))
        add_tb(slide, Inches(0.65), y+Inches(0.05), Inches(2.2), Inches(0.6),
               key + ":", 14, bold=True, color=GOLD)
        add_tb(slide, Inches(2.9), y+Inches(0.05), Inches(9.5), Inches(0.6),
               msg, 13, color=WHITE, wrap=True)
        y += Inches(0.82)

    add_tb(slide, Inches(0.5), Inches(6.25), Inches(12.0), Inches(0.45),
           "\"The PCR assay has not simply affected medical diagnosis; it has transformed it.\"",
           14, italic=True, color=RGBColor(0xAD, 0xD8, 0xE6), align=PP_ALIGN.CENTER)
    add_tb(slide, Inches(0.5), Inches(6.7), Inches(12.0), Inches(0.35),
           "Sources: Henry's Clinical Diagnosis (Henry's 9e) | Tietz Lab Medicine 7e | Medical Microbiology 9e | Emery's Medical Genetics",
           9, color=RGBColor(0x66, 0x99, 0xBB), align=PP_ALIGN.CENTER)

# ================================================================
# BUILD ALL SLIDES
# ================================================================
print("Building slide 1 - Title...")
slide_title()
print("Building slide 2 - TOC...")
slide_toc()
print("Building slide 3 - History...")
slide_history()
print("Building slide 4 - Principles...")
slide_principles()
print("Building slide 5 - Components...")
slide_components()
print("Building slide 6 - Cycle...")
slide_cycle()
print("Building slide 7 - Detection...")
slide_detection()
print("Building slide 8 - Types...")
slide_types()
print("Building slide 9 - qPCR...")
slide_qpcr()
print("Building slide 10 - Clinical...")
slide_clinical()
print("Building slide 11 - Limitations...")
slide_limitations()
print("Building slide 12 - Comparison...")
slide_comparison()
print("Building slide 13 - Summary...")
slide_summary()

out_path = "/tmp/workspace/pcr-seminar/PCR_Seminar_MD_Biochemistry.pptx"
prs.save(out_path)
print(f"SAVED: {out_path}")
Running Command

cd /tmp/workspace/pcr-seminar && python build_pcr.py 2>&1

Finding Files

**/fetch_images.py in /tmp/skills

Running Command

python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/cdss_images/4c60c84b781337c52d27aad4770be55fd482bcdfd116eddc21c9071edda75d5a.png" 2>&1 | head -5

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.