mkdir -p /tmp/workspace/biochem-notes && cat > /tmp/workspace/biochem-notes/make_pdf.py << 'PYEOF'
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
TableStyle, HRFlowable, PageBreak, KeepTogether)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus.flowables import HRFlowable
output_path = "/tmp/workspace/biochem-notes/Biochemistry_Exam_Notes.pdf"
doc = SimpleDocTemplate(
output_path,
pagesize=A4,
leftMargin=1.8*cm, rightMargin=1.8*cm,
topMargin=2*cm, bottomMargin=2*cm
)
W = A4[0] - 3.6*cm # usable width
# ── Styles ──────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
TITLE_S = ParagraphStyle("title_s", parent=styles["Title"],
fontSize=22, leading=28, textColor=colors.HexColor("#1a237e"),
spaceAfter=4, alignment=TA_CENTER)
SUBTITLE_S = ParagraphStyle("subtitle_s", parent=styles["Normal"],
fontSize=10, textColor=colors.HexColor("#5c6bc0"),
alignment=TA_CENTER, spaceAfter=12)
H1 = ParagraphStyle("h1", parent=styles["Heading1"],
fontSize=13, leading=16, textColor=colors.white,
backColor=colors.HexColor("#1a237e"),
spaceBefore=14, spaceAfter=4,
leftIndent=-8, rightIndent=-8,
borderPad=5)
H2 = ParagraphStyle("h2", parent=styles["Heading2"],
fontSize=11, leading=14, textColor=colors.HexColor("#1a237e"),
spaceBefore=10, spaceAfter=3,
borderPad=2)
H3 = ParagraphStyle("h3", parent=styles["Heading3"],
fontSize=10, leading=13, textColor=colors.HexColor("#283593"),
spaceBefore=7, spaceAfter=2, fontName="Helvetica-Bold")
BODY = ParagraphStyle("body", parent=styles["Normal"],
fontSize=9, leading=13, spaceAfter=4, alignment=TA_JUSTIFY)
BULLET = ParagraphStyle("bullet", parent=styles["Normal"],
fontSize=9, leading=13, leftIndent=14, spaceAfter=2,
bulletIndent=4)
MNEMONIC = ParagraphStyle("mnemonic", parent=styles["Normal"],
fontSize=9, leading=13, leftIndent=12, spaceAfter=4,
backColor=colors.HexColor("#fff9c4"), borderPad=4,
borderColor=colors.HexColor("#f9a825"), borderWidth=1)
HIGHLIGHT = ParagraphStyle("highlight", parent=styles["Normal"],
fontSize=9, leading=13, leftIndent=12, spaceAfter=4,
backColor=colors.HexColor("#e3f2fd"), borderPad=4)
CODE = ParagraphStyle("code", parent=styles["Code"],
fontSize=8, leading=12, leftIndent=12, spaceAfter=4,
backColor=colors.HexColor("#f5f5f5"), borderPad=4,
fontName="Courier")
# ── Helpers ──────────────────────────────────────────────────────────────────
def h1(text): return Paragraph(f" {text}", H1)
def h2(text): return Paragraph(text, H2)
def h3(text): return Paragraph(text, H3)
def p(text): return Paragraph(text, BODY)
def b(text): return Paragraph(f"• {text}", BULLET)
def mn(text): return Paragraph(f"<b>Mnemonic:</b> {text}", MNEMONIC)
def hl(text): return Paragraph(text, HIGHLIGHT)
def sp(h=6): return Spacer(1, h)
def hr(): return HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#5c6bc0"), spaceAfter=4, spaceBefore=4)
TH_BG = colors.HexColor("#283593")
TH_FG = colors.white
ALT_ROW = colors.HexColor("#e8eaf6")
GRID = colors.HexColor("#9fa8da")
def make_table(headers, rows, col_widths=None):
data = [[Paragraph(f"<b><font color='white'>{h}</font></b>", ParagraphStyle("th", parent=BODY, fontSize=8, leading=11, alignment=TA_CENTER)) for h in headers]]
for i, row in enumerate(rows):
data.append([Paragraph(str(c), ParagraphStyle("td", parent=BODY, fontSize=8, leading=11)) for c in row])
style = TableStyle([
("BACKGROUND", (0,0), (-1,0), TH_BG),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, ALT_ROW]),
("GRID", (0,0), (-1,-1), 0.4, GRID),
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
])
t = Table(data, colWidths=col_widths, style=style, repeatRows=1)
return t
# ═══════════════════════════════════════════════════════════════════════════
# CONTENT
# ═══════════════════════════════════════════════════════════════════════════
story = []
# ── Cover ──
story += [
sp(20),
Paragraph("BIOCHEMISTRY EXAM NOTES", TITLE_S),
Paragraph("1st Year MBBS | All Topics | Exam Ready", SUBTITLE_S),
Paragraph("Prepared for your exam — concise, complete, easy to memorize", ParagraphStyle("sub2", parent=BODY, alignment=TA_CENTER, textColor=colors.grey)),
sp(10),
HRFlowable(width="60%", thickness=2, color=colors.HexColor("#1a237e"), hAlign="CENTER"),
sp(40),
]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 1: TUMOUR MARKERS & ONCOGENES
# ════════════════════════════════════════════════════════════════════════════
story += [h1("1. TUMOUR MARKERS & ONCOGENES"), sp(4)]
story += [h2("What is a Tumour Marker?"), sp(2)]
story += [p("A substance (protein, hormone, enzyme, etc.) produced <b>by tumour cells or by the body in response to a tumour</b>, found in blood/urine/tissue. Used for: screening, diagnosis, monitoring treatment response, and detecting recurrence."), sp(4)]
story += [make_table(
["Marker", "Cancer"],
[
["AFP (Alpha-fetoprotein)", "Hepatocellular carcinoma, testicular germ cell"],
["PSA (Prostate-specific antigen)", "Prostate cancer"],
["CEA (Carcinoembryonic antigen)", "Colorectal, lung, breast"],
["CA-125", "Ovarian cancer"],
["CA 19-9", "Pancreatic cancer"],
["hCG", "Choriocarcinoma, testicular cancer"],
["Calcitonin", "Medullary thyroid carcinoma"],
["Bence Jones protein", "Multiple myeloma"],
["S-100", "Melanoma"],
],
col_widths=[W*0.35, W*0.65]
), sp(6)]
story += [mn("AFP → 'A Father's Pain' (liver/testis); CEA → 'Colon Eats Away'; CA-125 → Ovarian (O = 125 shape); PSA → Prostate")]
story += [hl("<b>Ideal tumour marker:</b> 100% sensitive and specific. None currently exists. Levels should correlate with tumour burden."), sp(4)]
story += [h2("What is an Oncogene?"), sp(2)]
story += [
b("<b>Proto-oncogene:</b> Normal gene regulating cell growth/division."),
b("<b>Oncogene:</b> Mutated/overactivated proto-oncogene → uncontrolled proliferation. <b>Gain-of-function</b> — only ONE allele needs to be affected."),
b("Acts like a <b>stuck accelerator</b> in a car."),
b("<b>Tumour Suppressor Genes</b> (p53, Rb) = brakes. BOTH alleles must be lost."),
sp(6),
]
story += [h2("Mechanisms of Oncogene Activation"), sp(2)]
story += [mn("PAINT: Point mutation | Amplification | Insertion | Non-disjunction/Translocation | Transcription dysregulation")]
story += [make_table(
["Mechanism", "How", "Example"],
[
["Point mutation", "Single base change → constitutively active protein", "KRAS (codon 12/13/61) in pancreatic >95%, colon 40%"],
["Amplification", "Multiple gene copies → overexpression", "MYC in breast/prostate; MYCN in neuroblastoma"],
["Retroviral insertion", "Retrovirus inserts near proto-oncogene", "HIV, HTLV"],
["Translocation", "Chromosome rearrangement near active promoter", "BCR-ABL t(9;22) in CML; MYC-IgH t(8;14) Burkitt"],
],
col_widths=[W*0.22, W*0.38, W*0.40]
), sp(4)]
story += [hl("<b>KRAS key point:</b> Mutations lock RAS in GTP-bound (active) form → constitutive signalling even without growth factors.")]
story += [h3("Oncogene categories:"), sp(2)]
story += [make_table(
["Category", "Examples"],
[
["Growth factors", "SIS (PDGF)"],
["Growth factor receptors", "EGFR, HER2/neu"],
["Signal transducers", "RAS, RAF, ABL"],
["Transcription factors", "MYC, JUN, FOS"],
["Cell cycle regulators", "Cyclin D1"],
["Anti-apoptotic", "BCL-2"],
],
col_widths=[W*0.4, W*0.6]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 2: LAC OPERON
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("2. LAC OPERON"), sp(4)]
story += [h2("Concept"), sp(2)]
story += [p("Model of <b>gene regulation in prokaryotes (E. coli)</b>. Controls lactose-metabolizing genes. Has two controls: <b>negative</b> (repressor) and <b>positive</b> (CAP/CRP)."), sp(4)]
story += [h2("Structure"), sp(2)]
story += [Paragraph("<font face='Courier'>[Promoter] — [Operator] — [lacZ] — [lacY] — [lacA]</font>", CODE), sp(2)]
story += [make_table(
["Gene", "Product", "Function"],
[
["lacZ", "β-galactosidase", "Hydrolyzes lactose → glucose + galactose"],
["lacY", "Permease", "Transports lactose into cell"],
["lacA", "Transacetylase", "Acetylates β-galactosides (function unclear)"],
],
col_widths=[W*0.15, W*0.3, W*0.55]
), sp(6)]
story += [h2("Negative Control (Repressor System)"), sp(2)]
story += [
b("Repressor protein (from lacI gene) binds operator → blocks transcription"),
b("Lactose present → converted to <b>allolactose</b> (the inducer)"),
b("Allolactose binds repressor → shape change → cannot bind operator → transcription ON"),
mn('"Lactose unlocks the block"'),
sp(4),
]
story += [h2("Positive Control (CAP/CRP System)"), sp(2)]
story += [
b("Glucose absent → cAMP rises"),
b("cAMP binds CRP (CAP) → activates it"),
b("cAMP-CRP complex binds promoter → enhances RNA polymerase binding → MORE transcription"),
b("Glucose present → low cAMP → CRP inactive → low transcription even with lactose"),
mn('"No glucose = more cAMP = max lactose gene expression" (catabolite repression)'),
sp(4),
]
story += [make_table(
["Glucose", "Lactose", "cAMP", "Repressor", "Transcription"],
[
["High", "Absent", "Low", "Active (bound)", "OFF"],
["High", "Present", "Low", "Inactive", "Low"],
["Low", "Absent", "High", "Active (bound)", "OFF"],
["Low ✓", "Present ✓", "High ✓", "Inactive ✓", "MAXIMUM ON ✓"],
],
col_widths=[W*0.17, W*0.17, W*0.15, W*0.25, W*0.26]
), sp(4)]
story += [hl("<b>Trp Operon contrast:</b> Tryptophan = COREPRESSOR that ACTIVATES the repressor → shuts off trp synthesis when Trp is abundant. Opposite to lac induction.")]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 3: INHIBITORS
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("3. INHIBITORS OF REPLICATION, TRANSCRIPTION & TRANSLATION"), sp(4)]
story += [h2("A. Inhibitors of DNA Replication"), sp(2)]
story += [make_table(
["Drug/Agent", "Mechanism"],
[
["Hydroxyurea", "Inhibits ribonucleotide reductase (blocks dNTP supply)"],
["Cytarabine (Ara-C)", "False nucleoside → chain termination"],
["Fluoroquinolones (ciprofloxacin)", "Inhibit bacterial DNA gyrase (Topoisomerase II)"],
["Camptothecin", "Inhibits Topoisomerase I"],
["Etoposide", "Inhibits Topoisomerase II"],
["Acyclovir / AZT", "Inhibit viral DNA polymerase / chain termination"],
["UV radiation", "Creates pyrimidine (TT) dimers"],
],
col_widths=[W*0.38, W*0.62]
), sp(6)]
story += [h2("B. Inhibitors of Transcription"), sp(2)]
story += [make_table(
["Drug/Agent", "Mechanism"],
[
["Rifampicin", "Inhibits BACTERIAL RNA polymerase (β subunit) — used in TB"],
["Actinomycin D", "Intercalates in DNA → blocks RNA polymerase movement"],
["α-Amanitin (mushroom toxin)", "Inhibits eukaryotic RNA polymerase II (mRNA synthesis)"],
["Doxorubicin", "Intercalates in DNA → inhibits replication AND transcription"],
],
col_widths=[W*0.35, W*0.65]
), sp(4)]
story += [hl("<b>Exam tip:</b> Rifampicin = classic — inhibits PROKARYOTIC RNA polymerase only."), sp(6)]
story += [h2("C. Inhibitors of Translation (Protein Synthesis)"), sp(2)]
story += [p("Bacteria have <b>70S ribosomes</b> (50S + 30S subunits) — targeted selectively by antibiotics."), sp(4)]
story += [h3("30S Inhibitors:"), sp(2)]
story += [mn("AAT: Aminoglycosides, Tetracycline (+ Spectinomycin)")]
story += [make_table(
["Drug", "Mechanism"],
[
["Aminoglycosides (Streptomycin, Gentamicin)", "Block 30S A site; cause misreading of mRNA"],
["Tetracycline", "Blocks aminoacyl-tRNA binding to 30S A site"],
],
col_widths=[W*0.45, W*0.55]
), sp(6)]
story += [h3("50S Inhibitors:"), sp(2)]
story += [mn('"Big MACE": Macrolides | Amphenicols (Chloramphenicol) | Clindamycin | Everninomicins/Linezolid')]
story += [make_table(
["Drug", "Mechanism"],
[
["Chloramphenicol", "Inhibits peptidyl transferase on 23S rRNA of 50S"],
["Erythromycin (macrolides)", "Blocks translocation on 50S"],
["Clindamycin/Lincomycin", "Block 50S translocation"],
["Linezolid", "Inhibits 50S — prevents 70S initiation complex"],
],
col_widths=[W*0.38, W*0.62]
), sp(6)]
story += [h3("Eukaryote-specific inhibitors:"), sp(2)]
story += [make_table(
["Drug", "Target", "Notes"],
[
["Cycloheximide", "60S (eukaryotes only)", "Inhibits peptidyl transferase; NOT clinical"],
["Puromycin", "Both 70S and 80S", "Analog of tyrosinyl-tRNA; premature chain release"],
["Diphtheria toxin", "EF-2 (eukaryotes only)", "ADP-ribosylates EF-2 → stops translocation"],
["Ricin", "28S rRNA of 60S", "Cleaves single adenine from 28S rRNA"],
],
col_widths=[W*0.28, W*0.32, W*0.40]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 4: POST-TRANSCRIPTIONAL & POST-TRANSLATIONAL MODIFICATIONS
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("4. POST-TRANSCRIPTIONAL & POST-TRANSLATIONAL MODIFICATIONS"), sp(4)]
story += [h2("Post-Transcriptional Modifications (pre-mRNA → mature mRNA)"), sp(2)]
story += [p("In eukaryotes, pre-mRNA (hnRNA) must be processed before leaving the nucleus. Three main modifications:"), sp(4)]
story += [h3("1. 5' Capping"), sp(2)]
story += [
b("A <b>7-methylguanosine (m7G) cap</b> is added to the 5' end"),
b("Functions: protects from degradation, helps ribosome binding (translation initiation), aids nuclear export"),
sp(4),
]
story += [h3("2. 3' Polyadenylation"), sp(2)]
story += [
b("A <b>poly-A tail</b> (100-250 adenine residues) added to the 3' end"),
b("Signal: <b>AAUAAA</b> sequence just upstream of cleavage site"),
b("Functions: mRNA stability (protects from exonucleases), export, translation efficiency"),
sp(4),
]
story += [h3("3. Splicing — Removal of Introns"), sp(2)]
story += [
b("<b>Introns</b> (intervening) = removed | <b>Exons</b> (expressed) = kept and joined"),
b("Done by the <b>spliceosome</b> (complex of snRNPs)"),
b("Splice sites: intron starts with <b>GU</b>, ends with <b>AG</b> (GU-AG rule)"),
b("<b>Alternative splicing</b> = one gene → multiple proteins (e.g., tropomyosin)"),
mn('"I Got Excited" = Introns Gone, Exons stay'),
sp(6),
]
story += [h2("Post-Translational Modifications (PTMs)"), sp(2)]
story += [mn("GPS-MUG: Glycosylation | Phosphorylation | Signal cleavage | Methylation | Ubiquitination | GPI anchor")]
story += [make_table(
["Modification", "What happens", "Example / Clinical"],
[
["Glycosylation", "Sugar added (N-linked or O-linked)", "Antibodies, blood groups, cell surface"],
["Phosphorylation", "Phosphate added to Ser/Thr/Tyr by kinases", "Signal transduction, enzyme regulation"],
["Signal peptide cleavage", "N-terminal signal sequence removed", "Targets protein to ER/membrane"],
["Methylation", "Methyl groups on Lys/Arg", "Histone modification, gene regulation"],
["Ubiquitination", "Ubiquitin tags protein", "Marks for proteasomal degradation"],
["GPI anchor", "Glycophosphatidylinositol links protein to membrane", "CD55, CD59 — absent in PNH"],
["Hydroxylation", "Pro & Lys in collagen hydroxylated", "Requires Vit C — deficiency = SCURVY"],
["Carboxylation", "Glu → Gla", "Requires Vit K — clotting factors II, VII, IX, X"],
["Proteolytic cleavage", "Zymogen activation", "Pepsinogen→Pepsin; Proinsulin→Insulin"],
["Disulfide bonds", "Cys-Cys bond in ER", "Stabilizes proteins (e.g., insulin, IgG)"],
],
col_widths=[W*0.25, W*0.35, W*0.40]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 5: MUTATION
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("5. MUTATION & TYPES OF MUTATION"), sp(4)]
story += [h2("Definition"), sp(2)]
story += [p("A <b>permanent change in DNA sequence</b>. Can be heritable (germline) or somatic (acquired)."), sp(4)]
story += [h2("A. Point Mutations (Single base affected)"), sp(2)]
story += [h3("Types of Substitution:"), sp(2)]
story += [
b("<b>Transition:</b> Purine ↔ Purine (A↔G) OR Pyrimidine ↔ Pyrimidine (C↔T) — same type"),
b("<b>Transversion:</b> Purine ↔ Pyrimidine — different type (e.g., A→T)"),
sp(4),
]
story += [h3("Effects on protein:"), sp(2)]
story += [make_table(
["Type", "What happens", "Example"],
[
["Silent/Synonymous", "Codon changes but SAME amino acid (code degeneracy)", "GAA→GAG (both Glu)"],
["Missense", "Codon changes → DIFFERENT amino acid", "Sickle cell: GAG→GTG (Glu→Val)"],
["Nonsense", "Codon changes → STOP codon → truncated protein", "CGA→TGA"],
["Frameshift", "Indel of non-multiple-of-3 bases → frame shifts", "Almost always deleterious"],
],
col_widths=[W*0.25, W*0.45, W*0.30]
), sp(4)]
story += [hl("<b>Sickle cell disease exam classic:</b> A→T TRANSVERSION at codon 6 of β-globin gene. GAG (Glu) → GTG (Val). One missense mutation causes the entire disease."), sp(4)]
story += [h2("B. Insertions & Deletions (Indels)"), sp(2)]
story += [
b("NOT a multiple of 3 → <b>frameshift mutation</b> (severe)"),
b("Multiple of 3 → in-frame insertion/deletion (protein may retain partial function)"),
sp(6),
]
story += [h2("C. Trinucleotide Repeat Expansions"), sp(2)]
story += [make_table(
["Disease", "Repeat", "Gene"],
[
["Huntington's disease", "CAG", "HTT"],
["Fragile X syndrome", "CGG", "FMR1"],
["Myotonic dystrophy", "CTG", "DMPK"],
],
col_widths=[W*0.4, W*0.2, W*0.4]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 6: DNA REPAIR
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("6. DNA REPAIR MECHANISMS & GENETIC DISORDERS"), sp(4)]
story += [mn("BEN-MRD: Base Excision | Excision (Nucleotide) | Non-homologous End Joining | Mismatch Repair | Recombination | Direct repair")]
story += [h2("1. Base Excision Repair (BER)"), sp(2)]
story += [
b("Fixes <b>small, non-bulky damage</b>: oxidized bases, alkylated bases, deaminated cytosine (→ uracil)"),
b("Steps: DNA glycosylase removes base → AP endonuclease cuts backbone → DNA pol fills gap → ligase seals"),
sp(6),
]
story += [h2("2. Nucleotide Excision Repair (NER)"), sp(2)]
story += [
b("Fixes <b>bulky helix-distorting lesions</b>: UV-induced pyrimidine dimers, chemical adducts"),
b("Removes ~25-30 nucleotide patch around lesion → DNA pol fills → ligase seals"),
b("<b>Defect → Xeroderma Pigmentosum (XP):</b> extreme UV sensitivity, skin cancers early in life, neurological defects"),
sp(6),
]
story += [h2("3. Mismatch Repair (MMR)"), sp(2)]
story += [
b("Fixes <b>replication errors</b>: mismatched base pairs that escaped proofreading"),
b("Uses methylation to distinguish template (methylated) from new daughter strand"),
b("Proteins: MutS (recognizes) → MutL → MutH (cuts unmethylated strand) in E.coli"),
b("Human homologs: <b>MSH2, MLH1</b>"),
b("Reduces error rate: 1 in 10<super>7</super> → 1 in 10<super>9</super>"),
b("<b>Defect → HNPCC/Lynch Syndrome:</b> colorectal cancer + microsatellite instability"),
sp(6),
]
story += [h2("4. Double-Strand Break Repair"), sp(2)]
story += [make_table(
["Type", "Mechanism", "When active", "Accuracy"],
[
["Homologous Recombination (HR)", "Uses sister chromatid as template; BRCA1/2 involved", "S/G2 phase", "Accurate"],
["Non-Homologous End Joining (NHEJ)", "Rejoins broken ends directly", "All cell cycle phases", "Error-prone"],
],
col_widths=[W*0.28, W*0.38, W*0.18, W*0.16]
), sp(4)]
story += [hl("<b>BRCA1/BRCA2 mutations:</b> Defective HR → hereditary breast and ovarian cancer syndrome"), sp(6)]
story += [h2("5. Direct Repair"), sp(2)]
story += [
b("<b>Photolyase:</b> repairs pyrimidine dimers using light energy (mainly bacteria/plants)"),
b("<b>MGMT (O6-methylguanine methyltransferase):</b> removes alkyl groups from O6-guanine directly"),
sp(6),
]
story += [h2("Summary Table — Repair Defects"), sp(2)]
story += [make_table(
["Repair Defect", "Disease", "Key Features"],
[
["NER", "Xeroderma Pigmentosum", "UV sensitivity, early skin cancers, neurological defects"],
["MMR", "HNPCC/Lynch Syndrome", "Colon cancer, microsatellite instability"],
["HR (BRCA1/2)", "Hereditary Breast/Ovarian Cancer", "Early-onset breast & ovarian cancer"],
["NER (partial)", "Cockayne Syndrome", "Photosensitivity, premature aging, NO cancer"],
["NER+NHEJ", "Trichothiodystrophy", "Brittle hair, photosensitivity"],
],
col_widths=[W*0.20, W*0.30, W*0.50]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 7: BETA / ALPHA / OMEGA OXIDATION
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("7. BETA, ALPHA & OMEGA OXIDATION"), sp(4)]
story += [h2("Beta Oxidation — Main Pathway"), sp(2)]
story += [
b("Site: <b>Mitochondria</b>"),
b("Degradation: 2 carbons removed at a time as <b>acetyl-CoA</b>"),
sp(4),
]
story += [h3("Entry into mitochondria — Carnitine Shuttle:"), sp(2)]
story += [
b("FA + CoA + ATP → Fatty acyl-CoA (by acyl-CoA synthetase/thiokinase)"),
b("CPT-I (outer membrane): rate-limiting, regulated — transfers acyl to carnitine"),
b("Carnitine-acylcarnitine translocase: moves acylcarnitine across inner membrane"),
b("CPT-II (inner membrane): regenerates fatty acyl-CoA inside"),
hl("<b>CPT-I is inhibited by malonyl-CoA</b> — prevents simultaneous synthesis + breakdown"),
sp(4),
]
story += [h3("The 4-step Beta Oxidation Cycle (OHAB):"), sp(2)]
story += [mn("OHAB: Oxidation | Hydration | Another oxidation | Beta-ketothiolysis")]
story += [make_table(
["Step", "Reaction", "Product", "Coenzyme"],
[
["1. Oxidation", "Acyl-CoA → trans-Δ2-enoyl-CoA", "FADH2", "FAD"],
["2. Hydration", "→ L-3-hydroxyacyl-CoA", "—", "H2O"],
["3. Oxidation", "→ 3-ketoacyl-CoA", "NADH", "NAD+"],
["4. Thiolysis", "→ Acetyl-CoA + shorter acyl-CoA (2C less)", "Acetyl-CoA", "CoA"],
],
col_widths=[W*0.22, W*0.38, W*0.18, W*0.22]
), sp(4)]
story += [hl("<b>Palmitate (16C) energy yield:</b> 7 cycles → 8 acetyl-CoA + 7 FADH2 + 7 NADH → ~106 net ATP")]
story += [h3("Special cases:"), sp(2)]
story += [
b("<b>Odd-chain fatty acids:</b> Final product = propionyl-CoA → succinyl-CoA (requires Biotin + Vit B12)"),
b("<b>Unsaturated FAs:</b> Need extra isomerase/reductase → slightly less ATP"),
sp(6),
]
story += [h2("Alpha Oxidation"), sp(2)]
story += [
b("Site: <b>Peroxisomes</b>"),
b("Removes ONE carbon (as CO2) from the alpha (2nd) carbon"),
b("Important for <b>branched-chain FAs</b> (e.g., phytanic acid from plant food)"),
b("<b>Defect → Refsum disease:</b> phytanic acid accumulates → peripheral neuropathy, ataxia, retinitis pigmentosa"),
sp(6),
]
story += [h2("Omega Oxidation"), sp(2)]
story += [
b("Site: <b>Endoplasmic reticulum</b> (microsomes)"),
b("Oxidation at the omega (last methyl) end → produces <b>dicarboxylic acids</b>"),
b("Minor pathway; important when beta-oxidation is impaired"),
b("Dicarboxylic acids found in urine = diagnostic clue for fatty acid oxidation disorders"),
sp(4),
]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 8: FATTY ACID SYNTHESIS & NADPH
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("8. FATTY ACID SYNTHESIS & REGULATION"), sp(4)]
story += [h2("Key Features (contrast with Beta Oxidation)"), sp(2)]
story += [make_table(
["Feature", "Fatty Acid Synthesis", "Beta Oxidation"],
[
["Site", "Cytosol", "Mitochondria"],
["Coenzyme", "NADPH (reducing)", "NAD+, FAD (oxidizing)"],
["Acetyl-CoA source", "Via citrate shuttle from mitochondria", "Direct in mitochondria"],
["Product", "Palmitate (16:0)", "Acetyl-CoA"],
],
col_widths=[W*0.25, W*0.38, W*0.37]
), sp(6)]
story += [h2("Step 1: COMMITTED Rate-Limiting Step"), sp(2)]
story += [hl("<b>Acetyl-CoA + CO2 + ATP → Malonyl-CoA</b> (by Acetyl-CoA Carboxylase / ACC) — requires BIOTIN"), sp(4)]
story += [h2("Step 2: Palmitate on Fatty Acid Synthase (FAS)"), sp(2)]
story += [
b("FAS = multifunctional enzyme (one large polypeptide in animals, 7 enzymatic activities)"),
b("Prosthetic group: <b>ACP (Acyl Carrier Protein)</b> — uses <b>pantothenic acid (Vit B5)</b>"),
b("Each elongation cycle: adds 2C from malonyl-CoA, uses 2 NADPH, releases CO2"),
b("7 cycles → <b>Palmitate (16C)</b>"),
sp(4),
]
story += [hl("<b>Overall:</b> 8 Acetyl-CoA + 7 ATP + 14 NADPH → Palmitate + 8 CoA + 7 ADP + 14 NADP+"), sp(6)]
story += [h2("Regulation of Fatty Acid Synthesis (ACC is key)"), sp(2)]
story += [make_table(
["Factor", "Effect on ACC", "Net effect on FA synthesis"],
[
["Citrate (high energy signal)", "Allosteric ACTIVATION", "↑ Synthesis"],
["Palmitoyl-CoA (product)", "Allosteric INHIBITION", "↓ Synthesis (feedback)"],
["Malonyl-CoA", "—", "Inhibits CPT-I → prevents beta-oxidation"],
["Insulin", "Activates (dephosphorylation)", "↑ Synthesis"],
["Glucagon/Epinephrine", "Inhibits (phosphorylation via PKA)", "↓ Synthesis"],
["AMP-kinase (AMPK)", "Phosphorylates → inhibits", "↓ Synthesis (low energy state)"],
],
col_widths=[W*0.30, W*0.35, W*0.35]
), sp(6)]
story += [h2("Sources of NADPH"), sp(2)]
story += [make_table(
["Source", "Pathway", "Note"],
[
["Pentose Phosphate Pathway (PPP)", "G6PD → NADPH (x2 per glucose)", "MAJOR SOURCE — G6PD deficiency → hemolytic anemia"],
["Malic enzyme", "Malate → Pyruvate + CO2 + NADPH", "OAA from citrate cleavage → malate → pyruvate"],
["Isocitrate dehydrogenase (cytosolic)", "Isocitrate → α-ketoglutarate", "Minor"],
["Folate pathway (MTHFR)", "One-carbon metabolism", "Minor"],
],
col_widths=[W*0.33, W*0.37, W*0.30]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 9: KETOGENESIS
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("9. KETOGENESIS"), sp(4)]
story += [h2("Where & When"), sp(2)]
story += [
b("Site: <b>Liver mitochondria</b> (ONLY)"),
b("Liver <b>PRODUCES</b> ketone bodies; liver <b>CANNOT USE</b> them (lacks succinyl-CoA transferase/thiophorase)"),
b("<b>Extrahepatic tissues</b> (brain, heart, kidney, muscle) USE ketone bodies"),
sp(4),
]
story += [h2("The Three Ketone Bodies"), sp(2)]
story += [make_table(
["Ketone Body", "Notes"],
[
["Acetoacetate", "First formed; the 'true' ketone"],
["β-Hydroxybutyrate", "Reduced form (NADH-dependent); major form in blood during ketosis; NOT technically a ketone"],
["Acetone", "Spontaneous decarboxylation of acetoacetate; exhaled → FRUITY BREATH (diagnostic!)"],
],
col_widths=[W*0.35, W*0.65]
), sp(6)]
story += [h2("Pathway of Ketogenesis"), sp(2)]
story += [Paragraph(
"""2 Acetyl-CoA → Acetoacetyl-CoA (thiolase)<br/>
+ Acetyl-CoA → HMG-CoA (HMG-CoA synthase) ← RATE-LIMITING STEP<br/>
HMG-CoA → Acetoacetate + Acetyl-CoA (HMG-CoA lyase)<br/>
Acetoacetate ⇌ β-Hydroxybutyrate (β-hydroxybutyrate dehydrogenase; needs NADH)<br/>
Acetoacetate → Acetone (spontaneous decarboxylation)""",
CODE), sp(4)]
story += [hl("<b>Note:</b> HMG-CoA synthase in MITOCHONDRIA (ketogenesis) is different from HMG-CoA synthase in CYTOSOL (cholesterol synthesis)"), sp(6)]
story += [h2("Triggers for Ketogenesis"), sp(2)]
story += [make_table(
["Condition", "Mechanism"],
[
["Starvation/Fasting", "Low glucose → low insulin → lipolysis ↑ → high acetyl-CoA. OAA used for gluconeogenesis → can't enter TCA"],
["Diabetes Mellitus (Type 1)", "No insulin → uncontrolled lipolysis → massive acetyl-CoA. Can cause DIABETIC KETOACIDOSIS (DKA)"],
["High-fat, low-carb diet", "Same mechanism as starvation, milder"],
],
col_widths=[W*0.30, W*0.70]
), sp(6)]
story += [h2("Regulation of Ketogenesis"), sp(2)]
story += [
b("<b>Insulin:</b> inhibits ketogenesis (inhibits lipolysis; activates ACC → malonyl-CoA → blocks CPT-I)"),
b("<b>Glucagon:</b> promotes ketogenesis (promotes lipolysis)"),
b("Rate-limiting enzyme: <b>HMG-CoA synthase</b> (mitochondrial)"),
sp(6),
]
story += [h2("Utilization in Extrahepatic Tissues"), sp(2)]
story += [Paragraph(
"β-Hydroxybutyrate → Acetoacetate (β-hydroxybutyrate dehydrogenase)<br/>Acetoacetate + Succinyl-CoA → Acetoacetyl-CoA + Succinate (THIOPHORASE — absent in liver!)<br/>Acetoacetyl-CoA → 2 Acetyl-CoA → TCA cycle → ATP",
CODE), sp(4)]
story += [hl("<b>Brain adaptation:</b> Uses glucose normally, but switches to ketone bodies after 4+ days of fasting (provides 60-70% of brain fuel in prolonged starvation).")]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 10: LIPOPROTEINS
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("10. LIPOPROTEINS"), sp(4)]
story += [h2("Structure"), sp(2)]
story += [p("Lipoprotein = hydrophobic core (TAG, cholesterol esters) + hydrophilic shell (phospholipids, free cholesterol) + <b>apolipoproteins</b> on surface."), sp(4)]
story += [h2("Classification"), sp(2)]
story += [mn("Cows Venture Into Large Herds: Chylomicron | VLDL | IDL | LDL | HDL (density increases ↑, size decreases ↓)")]
story += [make_table(
["Lipoprotein", "Made in", "Carries mainly", "Key Apo", "Function"],
[
["Chylomicrons", "Intestine", "Dietary TAG (exogenous)", "ApoB-48, ApoC-II, ApoE", "Delivers dietary fat to tissues"],
["VLDL", "Liver", "Endogenous TAG", "ApoB-100, ApoC-II, ApoE", "Delivers liver-made TAG to tissues"],
["IDL", "From VLDL", "TAG + Cholesterol", "ApoB-100, ApoE", "Intermediate; → liver or LDL"],
["LDL", "From IDL", "Cholesterol esters (mainly)", "ApoB-100 ONLY", "Delivers cholesterol to cells ('bad')"],
["HDL", "Liver + Intestine", "Picks up cholesterol", "ApoA-I", "Reverse cholesterol transport ('good')"],
],
col_widths=[W*0.16, W*0.14, W*0.20, W*0.22, W*0.28]
), sp(6)]
story += [h2("Functions of Key Apolipoproteins"), sp(2)]
story += [make_table(
["Apolipoprotein", "Function"],
[
["ApoA-I", "Activates LCAT (Lecithin-Cholesterol AcylTransferase); major HDL protein; reverse cholesterol transport"],
["ApoB-100", "Binds LDL receptor → receptor-mediated endocytosis"],
["ApoB-48", "Structural for chylomicrons (intestinal truncated form)"],
["ApoC-II", "Activates Lipoprotein Lipase (LPL) → hydrolyzes TAG in chylomicrons/VLDL"],
["ApoC-III", "Inhibits LPL"],
["ApoE", "Mediates receptor uptake of chylomicron remnants & IDL by liver"],
],
col_widths=[W*0.20, W*0.80]
), sp(6)]
story += [h2("Lipoprotein Metabolism"), sp(2)]
story += [h3("Exogenous pathway (dietary fat):"), sp(2)]
story += [
b("Intestine → Chylomicrons → lymph → blood → LPL (activated by ApoC-II) hydrolyzes TAG"),
b("Tissues take up fatty acids → Chylomicron remnant → liver via ApoE binding"),
sp(4),
]
story += [h3("Endogenous pathway (liver-made):"), sp(2)]
story += [
b("Liver → VLDL → LPL hydrolyzes TAG → IDL → either liver (ApoE) OR → LDL (loses ApoE, keeps ApoB-100)"),
sp(4),
]
story += [h3("LDL receptor pathway:"), sp(2)]
story += [
b("LDL → binds LDL receptor via ApoB-100 → receptor-mediated endocytosis"),
b("Cholesterol released inside cell → inhibits HMG-CoA reductase + downregulates LDL receptors (feedback)"),
sp(4),
]
story += [h3("Reverse cholesterol transport (HDL):"), sp(2)]
story += [
b("HDL (ApoA-I) → picks up cholesterol from peripheral tissues → LCAT esterifies it"),
b("HDL delivers cholesterol esters to liver (SR-B1 receptor) or transfers to VLDL/LDL via CETP"),
sp(6),
]
story += [h2("Lipoprotein (a) — Lp(a)"), sp(2)]
story += [
b("LDL-like particle with extra protein: <b>Apo(a)</b> linked to ApoB-100 by disulfide bond"),
b("Apo(a) structurally similar to <b>plasminogen</b> → competes → inhibits fibrinolysis"),
b("Result: <b>Prothrombotic + proatherogenic</b> — independent cardiovascular risk factor"),
b("Levels are <b>genetically determined</b> (not much affected by diet/lifestyle)"),
sp(4),
]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 11: FATTY LIVER
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("11. FATTY LIVER"), sp(4)]
story += [h2("Definition"), sp(2)]
story += [p("Accumulation of fat (mainly TAG) in hepatocytes <b>>5% of liver weight</b> (steatosis). Seen histologically as fat droplets in cells."), sp(4)]
story += [h2("Causes"), sp(2)]
story += [mn("ABCD: Alcohol | Besity (Obesity/NAFLD) | Corticosteroids/drugs | Diabetes type 2")]
story += [make_table(
["Cause", "Notes"],
[
["Alcohol", "#1 cause in developed countries"],
["Obesity (NAFLD/NASH)", "Non-alcoholic fatty liver disease; associated with insulin resistance"],
["Drugs", "Methotrexate, amiodarone, tamoxifen, corticosteroids"],
["Diabetes mellitus type 2", "Insulin resistance → increased lipolysis → hepatic fat"],
["Starvation/TPN", "Reduced apolipoprotein synthesis → decreased VLDL secretion"],
["Pregnancy (AFLP)", "Acute Fatty Liver of Pregnancy — rare, serious"],
],
col_widths=[W*0.30, W*0.70]
), sp(6)]
story += [h2("Mechanism in Alcoholism"), sp(2)]
story += [
b("Alcohol → acetaldehyde → excess <b>NADH</b> (shifts NAD+/NADH ratio)"),
b("Excess NADH inhibits gluconeogenesis and <b>beta-oxidation</b>"),
b("OAA → malate; pyruvate → lactate (lactic acidosis)"),
b("Acetyl-CoA accumulates → <b>increased fatty acid synthesis</b>"),
b("Acetaldehyde impairs apolipoprotein synthesis → <b>decreased VLDL secretion</b>"),
b("<b>Net: fat accumulates in liver</b>"),
sp(4),
]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 12: CHOLESTEROL BIOSYNTHESIS
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("12. CHOLESTEROL BIOSYNTHESIS & REGULATION"), sp(4)]
story += [h2("Overview"), sp(2)]
story += [
b("Site: <b>Liver</b> primarily (also intestine, adrenal, gonads)"),
b("All carbons from <b>Acetyl-CoA</b>; requires NADPH and ATP"),
sp(4),
]
story += [h2("Mevalonate Pathway — Key Steps"), sp(2)]
story += [Paragraph(
"3 Acetyl-CoA → HMG-CoA (cytosolic HMG-CoA synthase)<br/>"
"↓<br/>"
"<b>HMG-CoA → Mevalonate</b> [by HMG-CoA REDUCTASE — RATE-LIMITING STEP] ← STATINS target here<br/>"
"↓<br/>"
"Mevalonate → Isoprene units (IPP, DMAPP)<br/>"
"↓<br/>"
"6 Isoprene units → Squalene → Lanosterol → Cholesterol",
CODE), sp(6)]
story += [h2("Regulation of HMG-CoA Reductase"), sp(2)]
story += [make_table(
["Factor", "Effect", "Mechanism"],
[
["Intracellular cholesterol ↑", "Inhibits", "Decreases transcription (via SREBP); increases enzyme degradation"],
["Insulin", "Activates", "Dephosphorylation → active form"],
["Glucagon", "Inhibits", "Phosphorylation → inactive form"],
["Statins", "Competitive inhibition", "Structural analog of HMG-CoA; competitive inhibitor"],
],
col_widths=[W*0.28, W*0.18, W*0.54]
), sp(4)]
story += [hl("<b>SREBP</b> (Sterol Regulatory Element Binding Protein): When cholesterol is low → SREBP activated → increases transcription of HMG-CoA reductase AND LDL receptor genes simultaneously."), sp(6)]
story += [h2("Products Derived from Cholesterol"), sp(2)]
story += [make_table(
["Product", "Details"],
[
["Bile acids", "Primary: cholic acid, chenodeoxycholic acid. Rate-limiting enzyme: cholesterol 7α-hydroxylase"],
["Steroid hormones", "Glucocorticoids (cortisol), mineralocorticoids (aldosterone), sex hormones (testosterone, estrogen, DHEA)"],
["Vitamin D3", "Cholesterol → 7-dehydrocholesterol → UV in skin → cholecalciferol (D3) → kidney/liver activation"],
["Cell membranes", "Structural component; regulates membrane fluidity"],
],
col_widths=[W*0.25, W*0.75]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 13: HEME BIOSYNTHESIS
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("13. BIOSYNTHESIS OF HEME"), sp(4)]
story += [h2("Overview"), sp(2)]
story += [
b("Main sites: <b>Liver</b> and <b>Erythroid bone marrow</b> (>85% in erythroid tissue)"),
b("Pathway spans <b>mitochondria AND cytosol</b>"),
b("Mature RBCs lack mitochondria → CANNOT synthesize heme"),
sp(4),
]
story += [h2("Pathway"), sp(2)]
story += [Paragraph(
"<b>IN MITOCHONDRIA:</b><br/>"
"Succinyl-CoA + Glycine → δ-ALA (by ALA synthase, needs PLP/B6) ← RATE-LIMITING STEP<br/>"
"<b>IN CYTOSOL:</b><br/>"
"2 ALA → Porphobilinogen / PBG (by ALA dehydratase) ← Inhibited by LEAD<br/>"
"4 PBG → Hydroxymethylbilane → Uroporphyrinogen III → Coproporphyrinogen III<br/>"
"<b>BACK TO MITOCHONDRIA:</b><br/>"
"Coproporphyrinogen → Protoporphyrinogen IX → Protoporphyrin IX<br/>"
"Protoporphyrin IX + Fe²⁺ → <b>HEME</b> (by ferrochelatase) ← Also inhibited by LEAD",
CODE), sp(6)]
story += [h2("Regulation of ALA Synthase (ALAS1)"), sp(2)]
story += [
b("Heme/Hemin (excess) → inhibits ALAS1 (negative feedback) by:"),
b("1) Repressing ALAS1 gene transcription", ),
b("2) Increasing ALAS1 mRNA degradation"),
b("3) Blocking import of ALAS1 into mitochondria"),
b("Drugs (e.g., barbiturates, griseofulvin) → increase CYP synthesis → consume heme → reduce free heme → INCREASE ALAS1"),
sp(6),
]
story += [h2("Porphyrias — Key Enzyme Defects"), sp(2)]
story += [make_table(
["Porphyria", "Deficient Enzyme", "Key Features"],
[
["AIP (Acute Intermittent Porphyria)", "HMB synthase (PBG deaminase)", "Abdominal pain, neuropathy, NO skin involvement; elevated ALA + PBG in urine"],
["PCT (Porphyria Cutanea Tarda)", "Uroporphyrinogen decarboxylase", "Blistering skin photosensitivity (most common porphyria); no neurological symptoms"],
["Lead poisoning", "Inhibits ALA dehydratase + ferrochelatase", "Anemia (microcytic), abdominal pain, neuropathy; elevated ALA"],
],
col_widths=[W*0.28, W*0.30, W*0.42]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 14: BILIRUBIN METABOLISM & JAUNDICE
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("14. BILIRUBIN METABOLISM & JAUNDICE"), sp(4)]
story += [h2("Formation"), sp(2)]
story += [Paragraph(
"RBC breakdown (mainly spleen macrophages) → Hb → Heme + Globin<br/>"
"Heme → Biliverdin (by heme oxygenase; releases Fe²⁺ and CO)<br/>"
"Biliverdin → Bilirubin (by biliverdin reductase; requires NADPH)<br/>"
"~85% from RBC; 15% from myoglobin, CYPs, etc. (~250-350 mg/day in adults)",
CODE), sp(6)]
story += [h2("Transport to Liver"), sp(2)]
story += [
b("Unconjugated bilirubin = <b>water-insoluble, lipid-soluble, TOXIC</b> to brain (kernicterus)"),
b("Travels in blood <b>bound to albumin</b> — cannot be filtered by kidney → no urinary bilirubin"),
b("Enters hepatocyte via OATP transporters; binds <b>ligandin (Y protein)</b> inside"),
sp(6),
]
story += [h2("Conjugation in Liver"), sp(2)]
story += [
b("Bilirubin + UDP-glucuronic acid → <b>Bilirubin diglucuronide</b> (conjugated bilirubin)"),
b("Enzyme: <b>UDP-glucuronosyltransferase (UGT1A1)</b>"),
b("Conjugated bilirubin = <b>water-soluble, non-toxic</b>, excreted in bile"),
sp(6),
]
story += [h2("Excretion & Enterohepatic Circulation"), sp(2)]
story += [
b("Conjugated bilirubin → bile → intestine → bacteria convert to <b>urobilinogen</b>"),
b("Most urobilinogen → <b>stercobilin</b> (brown color of feces)"),
b("Some urobilinogen reabsorbed → liver (enterohepatic circulation) → small amount in urine"),
sp(6),
]
story += [h2("Jaundice"), sp(2)]
story += [p("<b>Definition:</b> Yellow discoloration of skin/sclera when serum bilirubin >2.5-3 mg/dL (normal <1 mg/dL)."), sp(4)]
story += [make_table(
["Feature", "Pre-hepatic (Hemolytic)", "Hepatic", "Post-hepatic (Obstructive)"],
[
["Cause", "Excess RBC breakdown", "Hepatitis, cirrhosis", "Gallstones, pancreatic cancer"],
["Bilirubin", "Unconjugated ↑↑", "Both ↑", "Conjugated ↑↑"],
["Urine bilirubin", "ABSENT", "Present", "Present"],
["Urine urobilinogen", "Increased", "Variable", "ABSENT"],
["Fecal color", "Normal/Dark", "Pale", "PALE/Clay-coloured"],
["Pruritus", "No", "Variable", "YES (bile salts)"],
["ALP", "Normal", "Mild ↑", "Markedly ↑↑"],
],
col_widths=[W*0.22, W*0.26, W*0.26, W*0.26]
), sp(6)]
story += [h2("Named Syndromes"), sp(2)]
story += [make_table(
["Syndrome", "Defect", "Bilirubin type", "Key feature"],
[
["Gilbert's syndrome", "Mild ↓ UGT1A1", "Unconjugated ↑ (mild)", "Most common hereditary; benign; triggered by fasting/stress"],
["Crigler-Najjar Type I", "Complete UGT1A1 absence", "Unconjugated ↑↑ (severe)", "Kernicterus → fatal without liver transplant"],
["Crigler-Najjar Type II (Arias)", "Partial UGT1A1 deficiency", "Unconjugated ↑ (moderate)", "Treatable with phenobarbital"],
["Dubin-Johnson", "MRP2 transporter mutation (bile secretion defect)", "Conjugated ↑", "Benign; dark liver on biopsy (black pigment)"],
["Rotor syndrome", "OATP1B1/1B3 deficiency", "Conjugated ↑", "Similar to Dubin-Johnson but NO dark pigment"],
],
col_widths=[W*0.22, W*0.28, W*0.20, W*0.30]
), sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# QUICK SUMMARY & MNEMONICS PAGE
# ════════════════════════════════════════════════════════════════════════════
story += [PageBreak(), h1("QUICK SUMMARY & MNEMONICS"), sp(4)]
story += [h2("Master Mnemonic Sheet"), sp(4)]
mnemonics = [
("Oncogene activation", "PAINT: Point mutation | Amplification | Insertion | Non-disjunction/Translocation | Transcription factor"),
("Tumour markers", "AFP=liver/testis | CEA=colon | CA-125=ovary | CA19-9=pancreas | PSA=prostate | Calcitonin=medullary thyroid"),
("DNA Repair → Disease", "NER→XP | MMR→HNPCC/Lynch | BRCA→Hereditary breast/ovarian"),
("Beta oxidation cycle", "OHAB: Oxidation (FAD) | Hydration | Another oxidation (NAD) | Beta-ketothiolysis"),
("30S antibiotic inhibitors", "AAT: Aminoglycosides, Aminoglycosides, Tetracycline"),
("50S antibiotic inhibitors", "Big MACE: Macrolides, Amphenicols (chloramphenicol), Clindamycin, Everninomicins/Linezolid"),
("Lipoprotein order", "Cows Venture Into Large Herds: Chylomicrons|VLDL|IDL|LDL|HDL (density ↑)"),
("ApoC-II function", "ApoC-II = Calls LPL to work (activates lipoprotein lipase)"),
("Ketogenesis trigger", "Low OAA + High Acetyl-CoA = Ketones"),
("Jaundice types", "Pre=unconjugated↑(no urine Bil); Post=conjugated↑(pale stools, pruritus, dark urine)"),
("Heme rate-limiting enzyme", "ALA Synthase (needs PLP/B6); inhibited by heme; LEAD blocks ALA dehydratase + ferrochelatase"),
("Fatty acid synthesis site", "FAS in Cytosol; beta-oxidation in Mitochondria (OPPOSITE!)"),
("Sources of NADPH", "PPP (G6PD) = major; Malic enzyme; Isocitrate DH (cytosolic)"),
("Post-transcriptional mods", "5' cap (m7G) | 3' poly-A tail | Splicing (GU-AG rule)"),
("Post-translational mods", "GPS-MUG: Glycosylation|Phosphorylation|Signal cleavage|Methylation|Ubiquitination|GPI anchor"),
("Fatty liver in alcohol", "Alcohol→NADH↑→beta-oxidation↓, gluconeogenesis↓, FA synthesis↑, VLDL secretion↓→FAT in liver"),
]
for topic, mnemonic in mnemonics:
story += [
Paragraph(f"<b>{topic}:</b>", H3),
Paragraph(mnemonic, MNEMONIC),
sp(4),
]
# ── Build ──
doc.build(story)
print(f"SUCCESS: PDF created at {output_path}")
PYEOF
echo "Script written."
show command