← All courses
COURSE COLLECTION

Molecular Genetics

Molecular Genetics is a comprehensive course exploring the molecular mechanisms of heredity, gene expression, regulation, and genetic variation. Participants will learn DNA replication, transcription, translation, mutations, genetic engineering, and molecular techniques, including PCR, gel electrophoresis, and sequencing, with applications in biotechnology, medical diagnostics, and biomedical research.

1 topics10 chaptersLearn at your own pace
CHAPTER 1

Introduction to Molecular Genetics

1
TOPIC

Definition, scope and importance of molecular genetics

By Md. Mahmudur Rahman · Executive Director, Omics Bangladesh

<!-- =====================================================================     BEGIN EMBED (copy from here to END EMBED into your website page)     Everything is scoped to .mgl so it will not affect the rest of your site.     No external images, fonts or libraries are needed.     ===================================================================== --><style>.mgl{  --bg:#f6f8fb; --card:#ffffff; --ink:#1b2430; --muted:#5b6778; --line:#e3e8ef;  --brand:#2563eb; --brand2:#7c3aed; --teal:#0d9488; --amber:#d97706; --rose:#e11d48; --green:#16a34a;  --radius:16px;  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;  color:var(--ink); background:var(--bg); line-height:1.65; font-size:16px;  max-width:1100px; margin:0 auto; padding:0 16px 40px; box-sizing:border-box;}.mgl *{box-sizing:border-box}.mgl h1,.mgl h2,.mgl h3,.mgl h4{line-height:1.25;margin:0 0 .5em;color:var(--ink)}.mgl h2{font-size:1.65rem;margin-top:0}.mgl h3{font-size:1.2rem}.mgl p{margin:0 0 1em}.mgl a{color:var(--brand)}.mgl .sec{margin:44px 0 0}.mgl .eyebrow{display:inline-block;font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--brand2);background:#ede9fe;padding:3px 10px;border-radius:999px;margin-bottom:10px}.mgl .card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:0 1px 2px rgba(16,24,40,.04)}.mgl .grid{display:grid;gap:16px}.mgl .g2{grid-template-columns:repeat(2,1fr)}.mgl .g3{grid-template-columns:repeat(3,1fr)}.mgl .g4{grid-template-columns:repeat(4,1fr)}@media(max-width:860px){.mgl .g3,.mgl .g4{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.mgl .g2,.mgl .g3,.mgl .g4{grid-template-columns:1fr}}
/* hero */.mgl .hero{margin-top:16px;border-radius:24px;overflow:hidden;background:linear-gradient(135deg,#0f172a,#1e3a8a 55%,#5b21b6);color:#fff;padding:36px 28px 0}.mgl .hero h1{color:#fff;font-size:clamp(1.8rem,4.2vw,2.8rem);margin-bottom:.3em}.mgl .hero p{color:#dbe4ff;max-width:720px;font-size:1.05rem}.mgl .hero canvas{display:block;width:100%;height:170px;margin-top:8px}.mgl .chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.mgl .chip{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25);padding:4px 12px;border-radius:999px;font-size:.85rem}
/* objectives */.mgl .lo{counter-reset:lo;list-style:none;margin:0;padding:0;display:grid;gap:10px}.mgl .lo li{counter-increment:lo;display:flex;gap:12px;align-items:flex-start;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px 14px}.mgl .lo li::before{content:"LO" counter(lo);flex:0 0 auto;font-weight:700;font-size:.78rem;color:#fff;background:var(--brand);border-radius:8px;padding:3px 8px;margin-top:2px}
/* definition */.mgl .defbox{border-left:6px solid var(--brand);background:linear-gradient(90deg,#eff6ff,#fff);padding:18px 20px;border-radius:12px;font-size:1.08rem}.mgl .pill{display:inline-block;font-size:.8rem;font-weight:600;border-radius:999px;padding:2px 10px;margin:0 6px 6px 0}.mgl .p-blue{background:#dbeafe;color:#1d4ed8}.mgl .p-teal{background:#ccfbf1;color:#0f766e}.mgl .p-amber{background:#fef3c7;color:#b45309}.mgl .p-rose{background:#ffe4e6;color:#be123c}.mgl .p-violet{background:#ede9fe;color:#6d28d9}.mgl .p-green{background:#dcfce7;color:#15803d}.mgl table{width:100%;border-collapse:collapse;font-size:.95rem}.mgl th,.mgl td{border:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}.mgl th{background:#f1f5f9}.mgl .tscroll{overflow-x:auto}.mgl .example{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:14px 16px;margin:14px 0}.mgl .example b.t{display:block;color:#b45309;font-size:.8rem;letter-spacing:.06em;text-transform:uppercase;margin-bottom:4px}.mgl figure{margin:0}.mgl figcaption{font-size:.85rem;color:var(--muted);margin-top:6px;text-align:center}.mgl svg{max-width:100%;height:auto;display:block}.mgl .fig{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px}
/* controls */.mgl button{font:inherit;cursor:pointer}.mgl .btn{background:var(--brand);color:#fff;border:0;border-radius:10px;padding:9px 16px;font-weight:600}.mgl .btn:hover{filter:brightness(1.08)}.mgl .btn.alt{background:#fff;color:var(--brand);border:1px solid var(--brand)}.mgl .btn.rose{background:var(--rose)}.mgl .row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* central dogma */.mgl .dogma text{font-family:inherit}.mgl .dogma .node{transition:filter .4s, transform .4s}.mgl .dogma .arrow{stroke:#94a3b8;stroke-width:3;fill:none;stroke-dasharray:8 6;transition:stroke .3s}.mgl .dogma .arrow.on{stroke:var(--brand);animation:mgl-dash 0.8s linear infinite}.mgl .dogma .lbl{fill:#64748b;font-size:13px;font-weight:600;transition:fill .3s}.mgl .dogma .lbl.on{fill:var(--brand)}.mgl .dogma .node.on{filter:drop-shadow(0 0 8px rgba(37,99,235,.55))}@keyframes mgl-dash{to{stroke-dashoffset:-14}}.mgl .stepbox{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;padding:12px 14px;min-height:74px;margin-top:10px}
/* zoom flow */.mgl .zoom{display:flex;gap:6px;align-items:stretch;overflow-x:auto;padding-bottom:6px}.mgl .zoom .z{flex:1 0 140px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px;text-align:center}.mgl .zoom .z small{display:block;color:var(--muted)}.mgl .zoom .ar{flex:0 0 22px;display:flex;align-items:center;justify-content:center;color:var(--brand);font-weight:800;animation:mgl-pulse 1.6s ease-in-out infinite}@keyframes mgl-pulse{50%{transform:translateX(5px);opacity:.5}}
/* tabs */.mgl .tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.mgl .tab{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 14px;font-size:.92rem;font-weight:600;color:var(--muted)}.mgl .tab[aria-selected="true"]{background:var(--brand);border-color:var(--brand);color:#fff}.mgl .panel{display:none}.mgl .panel.on{display:block;animation:mgl-fade .35s ease}@keyframes mgl-fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.mgl ul.tight{margin:0 0 1em;padding-left:1.2em}.mgl ul.tight li{margin:3px 0}
/* stats */.mgl .stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}@media(max-width:700px){.mgl .stats{grid-template-columns:repeat(2,1fr)}}.mgl .stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;text-align:center}.mgl .stat b{display:block;font-size:1.7rem;color:var(--brand)}.mgl .stat span{font-size:.85rem;color:var(--muted)}
/* importance cards */.mgl .imp h3{display:flex;align-items:center;gap:10px}.mgl .imp .ic{width:36px;height:36px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:.95rem}
/* simulator */.mgl textarea,.mgl input[type=text]{width:100%;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:1rem;border:1px solid #cbd5e1;border-radius:10px;padding:10px;background:#fff;color:var(--ink)}.mgl .seqline{font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.12em;word-break:break-all;background:#f8fafc;border:1px solid var(--line);border-radius:8px;padding:6px 10px;margin:4px 0 10px;font-size:.95rem}.mgl .seqlbl{font-size:.8rem;font-weight:700;color:var(--muted)}.mgl .codons{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.mgl .cod{background:#fff;border:1px solid var(--line);border-radius:10px;padding:6px 8px;text-align:center;min-width:62px;opacity:0;animation:mgl-pop .45s ease forwards}.mgl .cod .c{font-family:ui-monospace,Menlo,Consolas,monospace;font-weight:700;font-size:.95rem}.mgl .cod .a{font-size:.8rem;font-weight:700;border-radius:6px;margin-top:4px;padding:1px 4px;color:#fff}.mgl .cod.mut{outline:3px solid var(--rose);background:#fff1f2}.mgl .cod.stop .a{background:#334155 !important}@keyframes mgl-pop{from{opacity:0;transform:scale(.6) translateY(10px)}to{opacity:1;transform:none}}.mgl .base-A{color:#16a34a}.mgl .base-T,.mgl .base-U{color:#dc2626}.mgl .base-G{color:#d97706}.mgl .base-C{color:#2563eb}
/* quiz */.mgl .q{border-top:1px solid var(--line);padding:16px 0}.mgl .q:first-child{border-top:0}.mgl .opt{display:block;width:100%;text-align:left;background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px 12px;margin:6px 0;color:var(--ink)}.mgl .opt:hover{border-color:var(--brand)}.mgl .opt.ok{background:#dcfce7;border-color:#16a34a}.mgl .opt.bad{background:#ffe4e6;border-color:#e11d48}.mgl .exp{display:none;font-size:.92rem;background:#f1f5f9;border-radius:10px;padding:8px 12px;margin-top:6px}.mgl .exp.on{display:block}.mgl .score{font-weight:700;color:var(--brand2)}
/* scroll reveal (only when JS is active) */.mgl.mgl-js .rv{opacity:0;transform:translateY(18px);transition:opacity .7s ease,transform .7s ease}.mgl.mgl-js .rv.in{opacity:1;transform:none}@media (prefers-reduced-motion:reduce){  .mgl *{animation:none !important;transition:none !important}  .mgl.mgl-js .rv{opacity:1;transform:none}  .mgl .cod{opacity:1}}.mgl footer{margin-top:40px;font-size:.85rem;color:var(--muted)}</style>
<div class="mgl" id="mgl">
  <!-- ======================= HERO ======================= -->  <header class="hero">    <span class="chip" style="display:inline-block;margin-bottom:12px">Unit 1 · Introduction</span>    <h1>Molecular Genetics</h1>    <p>Definition, Scope and Importance &mdash; how the information stored in DNA is built, copied, read, changed and put to work in medicine, agriculture, forensics and industry.</p>    <div class="chips">      <span class="chip">DNA</span><span class="chip">RNA</span><span class="chip">Protein</span><span class="chip">Genes</span><span class="chip">Genomes</span>    </div>    <canvas id="mgl-helix" aria-label="Animated rotating DNA double helix" role="img"></canvas>  </header>
  <!-- ======================= OBJECTIVES ======================= -->  <section class="sec rv" id="mgl-lo">    <span class="eyebrow">Learning objectives</span>    <h2>By the end of this lesson you will be able to&hellip;</h2>    <ol class="lo">      <li><span><b>Define</b> molecular genetics and explain how it differs from classical (Mendelian) genetics.</span></li>      <li><span><b>Describe</b> the central dogma and the basic structure of the genetic material (DNA and RNA).</span></li>      <li><span><b>Outline the scope</b> of molecular genetics: its major sub-areas, techniques and links to other sciences.</span></li>      <li><span><b>Explain the importance</b> of molecular genetics with real examples from medicine, agriculture, forensics, industry and evolution.</span></li>      <li><span><b>Apply</b> the genetic code to convert a DNA sequence into mRNA and protein, and predict the effect of a mutation.</span></li>    </ol>  </section>
  <!-- ======================= 1. DEFINITION ======================= -->  <section class="sec rv" id="mgl-def">    <span class="eyebrow">Part 1 · LO1, LO2</span>    <h2>1. Definition of Molecular Genetics</h2>
    <div class="defbox">      <b>Molecular genetics</b> is the branch of biology that studies the <b>structure, function, replication, expression, variation and regulation of genes at the molecular level</b> &mdash; that is, in terms of DNA, RNA and the proteins they encode.    </div>
    <p style="margin-top:16px">Classical genetics asks <i>&ldquo;how are traits inherited?&rdquo;</i> Molecular genetics asks <i>&ldquo;what is a gene physically made of, how does it make a trait, and what happens inside the cell when it changes?&rdquo;</i> It therefore sits where genetics, biochemistry and cell biology meet.</p>
    <div class="grid g3" style="margin:16px 0">      <div class="card"><span class="pill p-blue">Pillar 1</span><h3>Structure</h3><p>What genes are made of: DNA and RNA, nucleotides, chromatin, chromosomes and genomes.</p></div>      <div class="card"><span class="pill p-teal">Pillar 2</span><h3>Information flow</h3><p>How information is copied (replication), read (transcription) and decoded (translation).</p></div>      <div class="card"><span class="pill p-amber">Pillar 3</span><h3>Variation &amp; control</h3><p>How mutations arise, how genes are switched on and off, and how DNA can be edited.</p></div>    </div>
    <h3>The building blocks (LO2)</h3>    <div class="grid g2">      <figure class="fig">        <svg viewBox="0 0 420 300" role="img" aria-label="Base pairing in DNA: A pairs with T by two hydrogen bonds, G pairs with C by three">          <rect x="0" y="0" width="420" height="300" fill="#fff"/>          <!-- backbones -->          <rect x="70" y="20" width="16" height="260" rx="8" fill="#93c5fd"/>          <rect x="334" y="20" width="16" height="260" rx="8" fill="#fcd34d"/>          <text x="78" y="14" text-anchor="middle" font-size="11" fill="#1d4ed8">5′</text>          <text x="342" y="14" text-anchor="middle" font-size="11" fill="#b45309">3′</text>          <text x="78" y="296" text-anchor="middle" font-size="11" fill="#1d4ed8">3′</text>          <text x="342" y="296" text-anchor="middle" font-size="11" fill="#b45309">5′</text>          <g font-weight="700" font-size="20" text-anchor="middle">            <!-- row 1 A=T -->            <rect x="100" y="38" width="44" height="40" rx="10" fill="#dcfce7" stroke="#16a34a"/><text x="122" y="66" fill="#15803d">A</text>            <rect x="276" y="38" width="44" height="40" rx="10" fill="#fee2e2" stroke="#dc2626"/><text x="298" y="66" fill="#b91c1c">T</text>            <line x1="148" y1="52" x2="272" y2="52" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <line x1="148" y1="64" x2="272" y2="64" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <!-- row 2 T=A -->            <rect x="100" y="98" width="44" height="40" rx="10" fill="#fee2e2" stroke="#dc2626"/><text x="122" y="126" fill="#b91c1c">T</text>            <rect x="276" y="98" width="44" height="40" rx="10" fill="#dcfce7" stroke="#16a34a"/><text x="298" y="126" fill="#15803d">A</text>            <line x1="148" y1="112" x2="272" y2="112" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <line x1="148" y1="124" x2="272" y2="124" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <!-- row 3 G≡C -->            <rect x="100" y="158" width="44" height="40" rx="10" fill="#fef3c7" stroke="#d97706"/><text x="122" y="186" fill="#b45309">G</text>            <rect x="276" y="158" width="44" height="40" rx="10" fill="#dbeafe" stroke="#2563eb"/><text x="298" y="186" fill="#1d4ed8">C</text>            <line x1="148" y1="165" x2="272" y2="165" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <line x1="148" y1="178" x2="272" y2="178" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <line x1="148" y1="191" x2="272" y2="191" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <!-- row 4 C≡G -->            <rect x="100" y="218" width="44" height="40" rx="10" fill="#dbeafe" stroke="#2563eb"/><text x="122" y="246" fill="#1d4ed8">C</text>            <rect x="276" y="218" width="44" height="40" rx="10" fill="#fef3c7" stroke="#d97706"/><text x="298" y="246" fill="#b45309">G</text>            <line x1="148" y1="225" x2="272" y2="225" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <line x1="148" y1="238" x2="272" y2="238" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>            <line x1="148" y1="251" x2="272" y2="251" stroke="#64748b" stroke-width="2" stroke-dasharray="4 4"/>          </g>          <text x="210" y="46" text-anchor="middle" font-size="11" fill="#64748b">2 H-bonds</text>          <text x="210" y="154" text-anchor="middle" font-size="11" fill="#64748b">3 H-bonds</text>        </svg>        <figcaption>Figure 1. Complementary base pairing holds the two antiparallel strands together (A–T and G–C).</figcaption>      </figure>      <div>        <ul class="tight">          <li><b>Nucleotide</b> = sugar + phosphate + nitrogenous base. DNA bases: <span class="base-A"><b>A</b></span>, <span class="base-T"><b>T</b></span>, <span class="base-G"><b>G</b></span>, <span class="base-C"><b>C</b></span>. In RNA, T is replaced by <span class="base-U"><b>U</b></span>.</li>          <li><b>Chargaff&rsquo;s rules:</b> in any double-stranded DNA, A = T and G = C, which pointed Watson and Crick (1953) to base pairing.</li>          <li><b>Gene</b> = a stretch of DNA that carries the instructions for making an RNA and, usually, a protein.</li>          <li><b>Genome</b> = the complete set of DNA in a cell. The human genome has about 3.1 billion base pairs and roughly 20,000 protein-coding genes.</li>        </ul>        <div class="example"><b class="t">Example: from Mendel&rsquo;s factor to a molecule</b>          Mendel (1866) described wrinkled vs. round peas as an allele pair <i>R/r</i>. Molecular genetics showed that the wrinkled allele is a DNA insertion that disrupts the gene for starch-branching enzyme (SBEI). Less enzyme means less starch, more sugar and water, and the seed wrinkles as it dries. The &ldquo;factor&rdquo; was a gene; the trait was a protein-level effect.        </div>      </div>    </div>
    <h3 style="margin-top:22px">The Central Dogma &mdash; the core idea (animation)</h3>    <p>Genetic information flows from DNA to RNA to protein. Press <b>Play</b> to watch each step light up.</p>    <div class="card">      <svg class="dogma" id="mgl-dogma" viewBox="0 0 780 300" role="img" aria-label="Central dogma: DNA to RNA to protein, with replication and reverse transcription">        <!-- DNA node -->        <g class="node" data-n="dna">          <rect x="20" y="95" width="170" height="110" rx="18" fill="#dbeafe" stroke="#2563eb" stroke-width="2"/>          <path d="M40 130 q15 -22 30 0 t30 0 t30 0 t30 0" fill="none" stroke="#2563eb" stroke-width="4"/>          <path d="M40 130 q15 22 30 0 t30 0 t30 0 t30 0" fill="none" stroke="#f59e0b" stroke-width="4"/>          <path d="M55 120v20M85 120v20M115 120v20M145 120v20" stroke="#64748b" stroke-width="2"/>          <text x="105" y="178" text-anchor="middle" font-weight="800" font-size="20" fill="#1e3a8a">DNA</text>          <text x="105" y="196" text-anchor="middle" font-size="11" fill="#475569">gene (in the nucleus)</text>        </g>        <!-- RNA node -->        <g class="node" data-n="rna">          <rect x="305" y="95" width="170" height="110" rx="18" fill="#fee2e2" stroke="#dc2626" stroke-width="2"/>          <path d="M325 135 q15 -24 30 0 t30 0 t30 0 t30 0" fill="none" stroke="#dc2626" stroke-width="4"/>          <circle cx="340" cy="123" r="4" fill="#dc2626"/><circle cx="370" cy="147" r="4" fill="#dc2626"/><circle cx="400" cy="123" r="4" fill="#dc2626"/><circle cx="430" cy="147" r="4" fill="#dc2626"/>          <text x="390" y="178" text-anchor="middle" font-weight="800" font-size="20" fill="#991b1b">mRNA</text>          <text x="390" y="196" text-anchor="middle" font-size="11" fill="#475569">working copy of the gene</text>        </g>        <!-- Protein node -->        <g class="node" data-n="pro">          <rect x="590" y="95" width="170" height="110" rx="18" fill="#dcfce7" stroke="#16a34a" stroke-width="2"/>          <circle cx="615" cy="130" r="10" fill="#22c55e"/><circle cx="640" cy="118" r="10" fill="#16a34a"/><circle cx="665" cy="132" r="10" fill="#4ade80"/><circle cx="690" cy="120" r="10" fill="#15803d"/><circle cx="715" cy="134" r="10" fill="#22c55e"/>          <path d="M615 130 L640 118 L665 132 L690 120 L715 134" stroke="#166534" stroke-width="2" fill="none"/>          <text x="675" y="178" text-anchor="middle" font-weight="800" font-size="20" fill="#14532d">Protein</text>          <text x="675" y="196" text-anchor="middle" font-size="11" fill="#475569">trait / function</text>        </g>        <!-- arrows -->        <path class="arrow" data-a="tx" d="M195 150 H298"/>        <path d="M290 143 l10 7 -10 7z" fill="#94a3b8" data-ah="tx"/>        <text class="lbl" data-l="tx" x="246" y="138" text-anchor="middle">Transcription</text>        <path class="arrow" data-a="tl" d="M480 150 H583"/>        <path d="M575 143 l10 7 -10 7z" fill="#94a3b8" data-ah="tl"/>        <text class="lbl" data-l="tl" x="531" y="138" text-anchor="middle">Translation</text>        <!-- replication loop -->        <path class="arrow" data-a="rep" d="M60 92 C 60 25, 150 25, 150 88"/>        <path d="M143 80 l7 12 7 -12z" fill="#94a3b8" data-ah="rep"/>        <text class="lbl" data-l="rep" x="105" y="40" text-anchor="middle">Replication</text>        <!-- reverse transcription -->        <path class="arrow" data-a="rt" d="M340 208 C 300 270, 160 270, 120 212" style="stroke-dasharray:3 7"/>        <path d="M113 220 l7 -12 7 12z" fill="#94a3b8" data-ah="rt"/>        <text class="lbl" data-l="rt" x="230" y="268" text-anchor="middle">Reverse transcription (e.g. HIV)</text>        <!-- moving dots -->        <circle r="5" fill="#2563eb"><animateMotion dur="2.2s" repeatCount="indefinite" path="M195 150 H298"/></circle>        <circle r="5" fill="#dc2626"><animateMotion dur="2.2s" repeatCount="indefinite" path="M480 150 H583"/></circle>      </svg>      <div class="row" style="margin-top:6px">        <button class="btn" id="mgl-play">&#9654; Play</button>        <button class="btn alt" id="mgl-stop">Reset</button>      </div>      <div class="stepbox" id="mgl-stepbox"><b>Ready.</b> Press Play to walk through DNA &rarr; RNA &rarr; protein.</div>    </div>
    <h3 style="margin-top:22px">Classical genetics vs. molecular genetics</h3>    <div class="tscroll"><table>      <tr><th></th><th>Classical (Mendelian) genetics</th><th>Molecular genetics</th></tr>      <tr><td><b>Unit of study</b></td><td>Trait, allele, phenotype ratios</td><td>DNA sequence, RNA, protein</td></tr>      <tr><td><b>Typical question</b></td><td>How is flower colour inherited?</td><td>Which enzyme makes the pigment, and which DNA change breaks it?</td></tr>      <tr><td><b>Main tools</b></td><td>Crosses, pedigrees, microscopy</td><td>PCR, sequencing, cloning, gel electrophoresis, CRISPR</td></tr>      <tr><td><b>Example</b></td><td>3:1 ratio of tall to dwarf peas</td><td>Single-base change in a gene explaining dwarfism</td></tr>    </table></div>    <p style="font-size:.9rem;color:var(--muted);margin-top:8px">The two approaches are complementary: crosses locate and follow a gene; molecular methods reveal what it is and how it works.</p>
    <h3 style="margin-top:22px">Key milestones</h3>    <div class="tscroll"><table>      <tr><th>Year</th><th>Discovery</th><th>Why it matters</th></tr>      <tr><td>1866</td><td>Mendel&rsquo;s laws of inheritance</td><td>Genes as discrete units</td></tr>      <tr><td>1869</td><td>Miescher isolates &ldquo;nuclein&rdquo;</td><td>First isolation of DNA</td></tr>      <tr><td>1928&ndash;1944</td><td>Griffith transformation; Avery, MacLeod &amp; McCarty</td><td>DNA is the transforming (genetic) material</td></tr>      <tr><td>1952</td><td>Hershey&ndash;Chase experiment</td><td>Confirmed DNA carries heredity in phage</td></tr>      <tr><td>1953</td><td>Watson &amp; Crick double helix (with Franklin &amp; Wilkins&rsquo; data)</td><td>Structure explains copying and storage</td></tr>      <tr><td>1958</td><td>Meselson&ndash;Stahl</td><td>Replication is semi-conservative</td></tr>      <tr><td>1961&ndash;1966</td><td>Genetic code cracked</td><td>Triplet codons specify amino acids</td></tr>      <tr><td>1970s</td><td>Restriction enzymes, recombinant DNA, Sanger sequencing</td><td>Genes can be cut, moved and read</td></tr>      <tr><td>1983&ndash;85</td><td>PCR (Mullis)</td><td>Amplify any DNA segment</td></tr>      <tr><td>2003</td><td>Human Genome Project completed</td><td>Reference human genome</td></tr>      <tr><td>2012&ndash;2023</td><td>CRISPR-Cas9 editing; first CRISPR therapy approved (2023)</td><td>Precise gene editing reaches the clinic</td></tr>    </table></div>  </section>
  <!-- ======================= 2. SCOPE ======================= -->  <section class="sec rv" id="mgl-scope">    <span class="eyebrow">Part 2 · LO3</span>    <h2>2. Scope of Molecular Genetics</h2>    <p>&ldquo;Scope&rdquo; means how far the subject reaches: the levels it studies, the topics it covers, the tools it uses and the sciences it connects to.</p>
    <h3>(a) Levels of study &mdash; from a base to an organism</h3>    <div class="zoom">      <div class="z"><svg viewBox="0 0 100 70"><ellipse cx="50" cy="35" rx="42" ry="28" fill="#e0f2fe" stroke="#0284c7" stroke-width="2"/><circle cx="50" cy="35" r="13" fill="#c4b5fd" stroke="#7c3aed" stroke-width="2"/></svg><b>Cell</b><small>nucleus holds DNA</small></div>      <div class="ar">&rarr;</div>      <div class="z"><svg viewBox="0 0 100 70"><path d="M35 8 q-10 27 0 54 M65 8 q10 27 0 54" fill="none" stroke="#7c3aed" stroke-width="9" stroke-linecap="round"/><rect x="38" y="30" width="24" height="10" fill="#a78bfa"/></svg><b>Chromosome</b><small>DNA + proteins</small></div>      <div class="ar">&rarr;</div>      <div class="z"><svg viewBox="0 0 100 70"><path d="M10 25 q10 -20 20 0 t20 0 t20 0 t20 0" fill="none" stroke="#2563eb" stroke-width="4"/><path d="M10 25 q10 20 20 0 t20 0 t20 0 t20 0" fill="none" stroke="#f59e0b" stroke-width="4"/><path d="M20 15v20M40 15v20M60 15v20M80 15v20" stroke="#94a3b8" stroke-width="2"/><rect x="18" y="52" width="64" height="8" rx="4" fill="#16a34a"/></svg><b>Gene</b><small>a segment of DNA</small></div>      <div class="ar">&rarr;</div>      <div class="z"><svg viewBox="0 0 100 70"><g font-size="16" font-weight="800" text-anchor="middle"><text x="15" y="40" fill="#16a34a">A</text><text x="35" y="40" fill="#d97706">G</text><text x="55" y="40" fill="#2563eb">C</text><text x="75" y="40" fill="#dc2626">T</text></g></svg><b>Sequence</b><small>A, T, G, C</small></div>      <div class="ar">&rarr;</div>      <div class="z"><svg viewBox="0 0 100 70"><path d="M15 50 L35 20 L55 45 L75 18 L88 40" stroke="#166534" stroke-width="3" fill="none"/><circle cx="15" cy="50" r="8" fill="#22c55e"/><circle cx="35" cy="20" r="8" fill="#16a34a"/><circle cx="55" cy="45" r="8" fill="#4ade80"/><circle cx="75" cy="18" r="8" fill="#15803d"/><circle cx="88" cy="40" r="8" fill="#22c55e"/></svg><b>Protein</b><small>structure &amp; function</small></div>    </div>    <p style="font-size:.9rem;color:var(--muted)">Molecular geneticists move up and down this ladder to connect a single base change to a whole-organism trait.</p>
    <h3 style="margin-top:20px">(b) Major sub-areas &mdash; click a topic</h3>    <div class="card">      <div class="tabs" role="tablist" id="mgl-tabs"></div>      <div id="mgl-panels"></div>    </div>
    <h3 style="margin-top:22px">(c) The molecular geneticist&rsquo;s toolkit</h3>    <div class="grid g3">      <div class="card"><span class="pill p-blue">PCR</span><p>Copies a chosen DNA region millions of times in a few hours. Used in disease diagnosis (including viral tests), forensics and cloning.</p></div>      <div class="card"><span class="pill p-teal">Gel electrophoresis</span><p>Separates DNA fragments by size using an electric field. Basis of DNA fingerprinting and checking PCR products.</p></div>      <div class="card"><span class="pill p-amber">DNA sequencing</span><p>Reads the exact order of bases. Sanger sequencing (1977) led to next-generation and long-read methods that read whole genomes.</p></div>      <div class="card"><span class="pill p-violet">Recombinant DNA &amp; cloning</span><p>Restriction enzymes cut DNA, ligase joins it, and vectors such as plasmids carry it into host cells.</p></div>      <div class="card"><span class="pill p-rose">CRISPR-Cas9</span><p>A guide RNA directs the Cas9 enzyme to a matching DNA sequence where it cuts, allowing targeted edits.</p></div>      <div class="card"><span class="pill p-green">Bioinformatics</span><p>Software and statistics to align sequences, find genes and compare genomes across species.</p></div>    </div>
    <div class="grid g2" style="margin-top:18px">      <figure class="fig">        <svg viewBox="0 0 440 250" role="img" aria-label="CRISPR-Cas9 cuts DNA at a site matched by guide RNA">          <rect width="440" height="250" fill="#fff"/>          <!-- DNA -->          <rect x="20" y="150" width="400" height="10" rx="5" fill="#93c5fd"/>          <rect x="20" y="170" width="400" height="10" rx="5" fill="#fcd34d"/>          <g stroke="#94a3b8" stroke-width="2"><path d="M40 160v10M70 160v10M100 160v10M130 160v10M160 160v10M190 160v10M220 160v10M250 160v10M280 160v10M310 160v10M340 160v10M370 160v10M400 160v10"/></g>          <!-- Cas9 -->          <ellipse cx="220" cy="85" rx="85" ry="52" fill="#ddd6fe" stroke="#7c3aed" stroke-width="3"/>          <text x="220" y="82" text-anchor="middle" font-weight="800" font-size="20" fill="#5b21b6">Cas9</text>          <text x="220" y="102" text-anchor="middle" font-size="11" fill="#6d28d9">DNA-cutting enzyme</text>          <!-- guide RNA -->          <path d="M200 135 L200 150 M215 135 L215 150 M230 135 L230 150 M245 135 L245 150" stroke="#dc2626" stroke-width="5" stroke-linecap="round"/>          <text x="330" y="125" font-size="12" fill="#b91c1c" font-weight="700">guide RNA matches target</text>          <path d="M325 122 L252 140" stroke="#dc2626" stroke-width="1.5" fill="none"/>          <!-- cut -->          <path d="M222 140 L222 195" stroke="#e11d48" stroke-width="3" stroke-dasharray="5 4"/>          <text x="222" y="215" text-anchor="middle" font-size="18" fill="#e11d48">&#9986;</text>          <text x="222" y="238" text-anchor="middle" font-size="12" fill="#475569">double-strand cut → repair or edit</text>        </svg>        <figcaption>Figure 2. CRISPR-Cas9: guide RNA leads Cas9 to a matching DNA sequence.</figcaption>      </figure>      <div>        <h3>(d) Connections to other fields</h3>        <ul class="tight">          <li><b>Biochemistry</b> &mdash; enzymes, nucleic-acid chemistry</li>          <li><b>Cell &amp; developmental biology</b> &mdash; how gene switches shape cells and body plans</li>          <li><b>Genomics &amp; bioinformatics</b> &mdash; whole-genome data analysis</li>          <li><b>Medicine &amp; pharmacology</b> &mdash; genetic disease, personalised drugs</li>          <li><b>Agriculture &amp; plant breeding</b> &mdash; crop improvement</li>          <li><b>Microbiology &amp; biotechnology</b> &mdash; engineered microbes</li>          <li><b>Evolution &amp; ecology</b> &mdash; molecular phylogenies, conservation genetics</li>          <li><b>Law &amp; ethics</b> &mdash; privacy, forensics, gene-editing rules</li>        </ul>      </div>    </div>  </section>
  <!-- ======================= 3. IMPORTANCE ======================= -->  <section class="sec rv" id="mgl-imp">    <span class="eyebrow">Part 3 · LO4</span>    <h2>3. Importance of Molecular Genetics</h2>    <p>Because DNA is the instruction set of life, understanding it lets us diagnose, treat, improve and protect living things.</p>
    <div class="stats">      <div class="stat"><b>1953</b><span>DNA structure solved</span></div>      <div class="stat"><b>~3.1 billion</b><span>base pairs in the human genome</span></div>      <div class="stat"><b>~99.9%</b><span>DNA shared between any two people</span></div>      <div class="stat"><b>2023</b><span>first CRISPR-based therapy approved</span></div>    </div>
    <div class="grid g2" style="margin-top:18px">      <div class="card imp"><h3><span class="ic" style="background:#e11d48">Rx</span>Medicine &amp; health</h3>        <ul class="tight">          <li><b>Diagnosis:</b> PCR-based tests, newborn screening, carrier testing.</li>          <li><b>Biologic drugs:</b> human insulin made in <i>E. coli</i> since the early 1980s.</li>          <li><b>Targeted cancer therapy:</b> the BCR-ABL fusion in chronic myeloid leukaemia led to imatinib; HER2 testing guides trastuzumab.</li>          <li><b>mRNA vaccines:</b> COVID-19 vaccines used synthetic mRNA to teach cells to make a viral protein.</li>          <li><b>Gene therapy &amp; editing:</b> Luxturna for inherited retinal disease; Casgevy for sickle cell disease and &beta;-thalassaemia.</li>          <li><b>Pharmacogenomics:</b> variants in genes such as <i>CYP2C19</i> or <i>TPMT</i> change how people respond to drugs.</li>        </ul>      </div>      <div class="card imp"><h3><span class="ic" style="background:#16a34a">Ag</span>Agriculture &amp; food</h3>        <ul class="tight">          <li><b>Insect-resistant crops:</b> Bt cotton and Bt brinjal (eggplant, released to farmers in Bangladesh from 2014) carry a bacterial toxin gene against fruit and shoot borer.</li>          <li><b>Biofortification:</b> Golden Rice makes provitamin A (&beta;-carotene).</li>          <li><b>Marker-assisted breeding:</b> the <i>Sub1</i> gene gives flood-tolerant rice, used in varieties for flood-prone regions such as Bangladesh.</li>          <li><b>Genome resources:</b> the jute genome was sequenced in 2010 with Bangladeshi scientists involved, enabling fibre-quality research.</li>        </ul>      </div>      <div class="card imp"><h3><span class="ic" style="background:#2563eb">ID</span>Forensics &amp; identity</h3>        <ul class="tight">          <li><b>DNA fingerprinting</b> (Alec Jeffreys, 1984) compares repeat patterns to identify individuals.</li>          <li>Used in criminal investigation, paternity testing, identifying disaster victims and tracking wildlife crime.</li>        </ul>        <figure>          <svg viewBox="0 0 360 190" role="img" aria-label="DNA fingerprint gel: crime-scene sample matches Suspect B">            <rect width="360" height="190" rx="10" fill="#0f172a"/>            <g font-size="11" fill="#cbd5e1" text-anchor="middle"><text x="55" y="20">Victim</text><text x="125" y="20">Crime scene</text><text x="195" y="20">Suspect A</text><text x="265" y="20">Suspect B</text></g>            <g fill="#facc15">              <rect x="40" y="45" width="30" height="5"/><rect x="40" y="95" width="30" height="5"/><rect x="40" y="140" width="30" height="5"/>              <rect x="110" y="55" width="30" height="5"/><rect x="110" y="85" width="30" height="5"/><rect x="110" y="120" width="30" height="5"/><rect x="110" y="155" width="30" height="5"/>              <rect x="180" y="45" width="30" height="5"/><rect x="180" y="75" width="30" height="5"/><rect x="180" y="130" width="30" height="5"/>              <rect x="250" y="55" width="30" height="5"/><rect x="250" y="85" width="30" height="5"/><rect x="250" y="120" width="30" height="5"/><rect x="250" y="155" width="30" height="5"/>            </g>            <rect x="100" y="42" width="50" height="128" fill="none" stroke="#22c55e" stroke-width="2" stroke-dasharray="4 3"/>            <rect x="240" y="42" width="50" height="128" fill="none" stroke="#22c55e" stroke-width="2" stroke-dasharray="4 3"/>            <text x="180" y="182" text-anchor="middle" font-size="11" fill="#86efac">Bands match: crime scene = Suspect B (illustrative)</text>          </svg>          <figcaption>Figure 3. Illustrative DNA fingerprint comparison.</figcaption>        </figure>      </div>      <div class="card imp"><h3><span class="ic" style="background:#d97706">In</span>Industry &amp; environment</h3>        <ul class="tight">          <li><b>Enzymes</b> from engineered microbes for detergents, food processing and biofuels.</li>          <li><b>Bioremediation:</b> microbes with genes to break down oil or pollutants.</li>          <li><b>Synthetic biology:</b> designing new genetic circuits and bio-based materials.</li>        </ul>      </div>      <div class="card imp"><h3><span class="ic" style="background:#7c3aed">Ev</span>Evolution &amp; conservation</h3>        <ul class="tight">          <li><b>Molecular phylogenetics:</b> comparing gene sequences (for example 16S rRNA) to build the tree of life.</li>          <li><b>DNA barcoding:</b> identifying species from a short standard gene such as COI.</li>          <li><b>Ancient DNA:</b> work of Svante P&auml;&auml;bo (Nobel Prize 2022) showed modern non-Africans carry a few percent of Neanderthal ancestry.</li>        </ul>      </div>      <div class="card imp" style="grid-column:1/-1"><h3><span class="ic" style="background:#0d9488">Ed</span>Society, ethics &amp; basic science</h3>        <p>Molecular genetics answers basic questions about how life works, but it also raises issues: genetic privacy and discrimination, consent in genetic testing, fair access to expensive therapies, and the limits of editing human embryos (the 2018 case of gene-edited babies was widely condemned). Learning the science helps citizens take part in those decisions.</p>      </div>    </div>
    <h3 style="margin-top:24px">Worked example: one letter changes a life (sickle cell disease)</h3>    <div class="grid g2">      <figure class="fig">        <svg viewBox="0 0 440 230" role="img" aria-label="Normal red blood cells are round discs; sickle cells are crescent-shaped">          <rect width="440" height="230" fill="#fff"/>          <text x="110" y="22" text-anchor="middle" font-weight="700" font-size="13" fill="#1d4ed8">Normal HbA</text>          <text x="330" y="22" text-anchor="middle" font-weight="700" font-size="13" fill="#be123c">Sickle HbS</text>          <line x1="220" y1="30" x2="220" y2="215" stroke="#e2e8f0" stroke-width="2"/>          <g fill="#f87171" stroke="#b91c1c" stroke-width="2">            <ellipse cx="60" cy="70" rx="26" ry="22"/><ellipse cx="130" cy="60" rx="26" ry="22"/><ellipse cx="170" cy="115" rx="26" ry="22"/>            <ellipse cx="85" cy="125" rx="26" ry="22"/><ellipse cx="55" cy="180" rx="26" ry="22"/><ellipse cx="135" cy="180" rx="26" ry="22"/>          </g>          <g fill="#fecaca"><ellipse cx="60" cy="70" rx="10" ry="8"/><ellipse cx="130" cy="60" rx="10" ry="8"/><ellipse cx="170" cy="115" rx="10" ry="8"/><ellipse cx="85" cy="125" rx="10" ry="8"/><ellipse cx="55" cy="180" rx="10" ry="8"/><ellipse cx="135" cy="180" rx="10" ry="8"/></g>          <g fill="#f87171" stroke="#b91c1c" stroke-width="2">            <path d="M255 85 q35 -50 70 -5 q-30 -15 -70 5z"/>            <path d="M345 65 q40 -35 70 20 q-40 -25 -70 -20z"/>            <path d="M260 150 q30 -45 75 0 q-35 -10 -75 0z"/>            <path d="M350 135 q35 -40 65 10 q-35 -20 -65 -10z"/>            <path d="M270 205 q35 -40 70 -5 q-35 -5 -70 5z"/>          </g>        </svg>        <figcaption>Figure 4. Round, flexible red cells (left) vs. rigid sickle-shaped cells that can block small vessels (right).</figcaption>      </figure>      <div>        <p>The &beta;-globin gene (<i>HBB</i>) has a codon <b>GAG</b> (glutamic acid) at position 6 of the mature chain. In sickle cell disease it reads <b>G<span style="color:var(--rose)">T</span>G</b> (valine). A single base substitution changes one amino acid; haemoglobin then sticks together when oxygen is low and bends the red cell.</p>        <p>Try it yourself in the simulator below, then see how the same disease is now being treated by editing a regulatory gene with CRISPR.</p>      </div>    </div>  </section>
  <!-- ======================= 4. SIMULATOR ======================= -->  <section class="sec rv" id="mgl-sim">    <span class="eyebrow">Activity · LO5</span>    <h2>Interactive: DNA &rarr; mRNA &rarr; Protein</h2>    <p>Type a DNA <b>coding (sense) strand</b> (letters A, T, G, C), or load an example. The tool finds the first ATG start codon, transcribes it and translates it until a stop codon.</p>    <div class="card">      <label for="mgl-in" class="seqlbl">DNA coding strand 5′&rarr;3′</label>      <input type="text" id="mgl-in" value="ATGGTGCATCTGACTCCTGAGGAGAAG" spellcheck="false" autocomplete="off">      <div class="row" style="margin:10px 0">        <button class="btn" id="mgl-go">Translate &amp; animate</button>        <button class="btn alt" id="mgl-norm">Normal &beta;-globin start</button>        <button class="btn rose" id="mgl-sick">Sickle mutation (GAG&rarr;GTG)</button>        <button class="btn alt" id="mgl-rand">Random gene</button>      </div>      <div id="mgl-out"></div>    </div>    <p style="font-size:.88rem;color:var(--muted);margin-top:8px">The &beta;-globin example is a shortened, simplified teaching sequence of the first codons of the human <i>HBB</i> gene.</p>  </section>
  <!-- ======================= 5. QUIZ ======================= -->  <section class="sec rv" id="mgl-quiz">    <span class="eyebrow">Self-check</span>    <h2>Quick quiz</h2>    <div class="card"><div id="mgl-qs"></div>      <div class="row" style="margin-top:10px"><button class="btn alt" id="mgl-qreset">Restart quiz</button><span class="score" id="mgl-score"></span></div>    </div>  </section>
  <!-- ======================= SUMMARY ======================= -->  <section class="sec rv" id="mgl-sum">    <span class="eyebrow">Summary</span>    <h2>Key takeaways</h2>    <div class="grid g3">      <div class="card"><h3>Definition</h3><p>Study of genes at the DNA/RNA/protein level: their structure, copying, expression, variation and control.</p></div>      <div class="card"><h3>Scope</h3><p>Nucleic-acid structure, replication, transcription, translation, regulation, mutation, recombinant DNA, genomics and evolution &mdash; supported by PCR, sequencing and CRISPR.</p></div>      <div class="card"><h3>Importance</h3><p>Underpins modern diagnosis, therapy, vaccines, crop improvement, forensics, industry and our understanding of life&mdash;with ethical responsibilities.</p></div>    </div>    <h3 style="margin-top:20px">Self-assessment checklist</h3>    <ul class="tight">      <li>I can state a clear definition of molecular genetics. (LO1)</li>      <li>I can draw and explain the central dogma and base pairing. (LO2)</li>      <li>I can list the major sub-areas, techniques and related fields. (LO3)</li>      <li>I can give at least three real examples of its importance. (LO4)</li>      <li>I can translate a DNA sequence and predict a point-mutation effect. (LO5)</li>    </ul>    <h3>Suggested reading</h3>    <p>Watson et al., <i>Molecular Biology of the Gene</i>; Alberts et al., <i>Molecular Biology of the Cell</i>; Lodish et al., <i>Molecular Cell Biology</i>; Brown, <i>Genomes</i>; Griffiths et al., <i>Introduction to Genetic Analysis</i>.</p>  </section>
  <footer>Illustrations on this page are original inline SVG drawings and are simplified for teaching.</footer></div>
<script>(function(){  var root=document.getElementById('mgl'); if(!root) return;  root.classList.add('mgl-js');  var reduce=window.matchMedia&&window.matchMedia('(prefers-reduced-motion: reduce)').matches;  function $(id){return document.getElementById(id);}
  /* ---------- scroll reveal ---------- */  var rv=root.querySelectorAll('.rv');  if('IntersectionObserver' in window){    var io=new IntersectionObserver(function(es){es.forEach(function(e){if(e.isIntersecting){e.target.classList.add('in');io.unobserve(e.target);}});},{threshold:0.06});    for(var i=0;i<rv.length;i++) io.observe(rv[i]);  } else { for(var j=0;j<rv.length;j++) rv[j].classList.add('in'); }
  /* ---------- hero helix (canvas) ---------- */  var cv=$('mgl-helix');  if(cv&&cv.getContext){    var ctx=cv.getContext('2d'), t=0, raf=null;    var pairs=[['#34d399','#f87171'],['#fbbf24','#60a5fa']]; // A-T, G-C    function size(){var dpr=window.devicePixelRatio||1;cv.width=cv.clientWidth*dpr;cv.height=cv.clientHeight*dpr;ctx.setTransform(dpr,0,0,dpr,0,0);}    function draw(){      var w=cv.clientWidth,h=cv.clientHeight;ctx.clearRect(0,0,w,h);      var n=Math.max(24,Math.floor(w/22)), step=w/(n-1), cy=h/2, amp=h*0.34, k=0.34;      var pts=[];      for(var i=0;i<n;i++){        var ph=i*k+t, x=i*step, s=Math.sin(ph), z=Math.cos(ph);        pts.push({x:x,y1:cy+amp*s,y2:cy-amp*s,z:z,p:pairs[(i*7)%2===0?0:1]});      }      // strands      function strand(key,col,front){        ctx.lineWidth=front?5:3;ctx.strokeStyle=col;ctx.globalAlpha=front?1:.45;ctx.beginPath();        for(var i=0;i<n;i++){var y=pts[i][key];i?ctx.lineTo(pts[i].x,y):ctx.moveTo(pts[i].x,y);}        ctx.stroke();ctx.globalAlpha=1;      }      strand('y1','#93c5fd',false);strand('y2','#fcd34d',false);      // rungs      for(var r=0;r<n;r++){        var q=pts[r];ctx.globalAlpha=0.35+0.65*Math.abs(q.z);        var my=(q.y1+q.y2)/2;        ctx.lineWidth=4;ctx.strokeStyle=q.p[0];ctx.beginPath();ctx.moveTo(q.x,q.y1);ctx.lineTo(q.x,my);ctx.stroke();        ctx.strokeStyle=q.p[1];ctx.beginPath();ctx.moveTo(q.x,my);ctx.lineTo(q.x,q.y2);ctx.stroke();      }      ctx.globalAlpha=1;      // nodes: back first then front      for(var pass=0;pass<2;pass++){        for(var m=0;m<n;m++){          var P=pts[m];          var d1=P.z, d2=-P.z;          if((pass===0&&d1<0)||(pass===1&&d1>=0)){ctx.fillStyle='#60a5fa';ctx.beginPath();ctx.arc(P.x,P.y1,5+2.5*d1,0,6.283);ctx.fill();}          if((pass===0&&d2<0)||(pass===1&&d2>=0)){ctx.fillStyle='#fbbf24';ctx.beginPath();ctx.arc(P.x,P.y2,5+2.5*d2,0,6.283);ctx.fill();}        }      }    }    function loop(){t+=0.03;draw();raf=requestAnimationFrame(loop);}    size();draw();    window.addEventListener('resize',function(){size();draw();});    if(!reduce){loop();document.addEventListener('visibilitychange',function(){if(document.hidden){cancelAnimationFrame(raf);}else{loop();}});}  }
  /* ---------- central dogma animation ---------- */  var steps=[    {on:['rep','dna'],txt:'<b>1. Replication.</b> Before a cell divides, DNA is copied. Each new double helix keeps one old strand and one new strand (semi-conservative replication, shown by Meselson and Stahl).'},    {on:['tx','dna','rna'],txt:'<b>2. Transcription.</b> RNA polymerase copies one strand of a gene into messenger RNA (mRNA). In RNA the base U replaces T. In eukaryotes the transcript is also processed (capped, spliced, poly-A tailed).'},    {on:['tl','rna','pro'],txt:'<b>3. Translation.</b> Ribosomes read the mRNA three bases (one codon) at a time. tRNAs bring amino acids, which are joined into a protein chain that folds into its working shape.'},    {on:['rt','rna','dna'],txt:'<b>4. Special case: reverse transcription.</b> Retroviruses such as HIV carry RNA and use reverse transcriptase to make DNA copies, so information can also flow from RNA back to DNA.'}  ];  var svg=$('mgl-dogma'),box=$('mgl-stepbox'),timer=null,si=0;  function show(i){    var a=svg.querySelectorAll('[data-a],[data-l],[data-n],[data-ah]');    for(var x=0;x<a.length;x++){a[x].classList.remove('on');if(a[x].hasAttribute('data-ah'))a[x].setAttribute('fill','#94a3b8');}    if(i<0){box.innerHTML='<b>Ready.</b> Press Play to walk through DNA &rarr; RNA &rarr; protein.';return;}    var s=steps[i];    s.on.forEach(function(k){      var els=svg.querySelectorAll('[data-a="'+k+'"],[data-l="'+k+'"],[data-n="'+k+'"]');      for(var e=0;e<els.length;e++)els[e].classList.add('on');      var ah=svg.querySelector('[data-ah="'+k+'"]');if(ah)ah.setAttribute('fill','#2563eb');    });    box.innerHTML=s.txt;  }  function stop(){clearInterval(timer);timer=null;si=0;show(-1);}  $('mgl-play').onclick=function(){clearInterval(timer);si=0;show(0);timer=setInterval(function(){si++;if(si>=steps.length){clearInterval(timer);timer=null;return;}show(si);},3600);};  $('mgl-stop').onclick=stop;
  /* ---------- scope tabs ---------- */  var topics=[    {n:'Structure of DNA & RNA',c:'p-blue',d:'Studies what the genetic material is and how it is packaged: nucleotides, the double helix, chromatin, chromosomes, and RNA types (mRNA, tRNA, rRNA, regulatory RNAs).',l:['Griffith, Avery and Hershey&ndash;Chase proved DNA is the genetic material.','Packaging: DNA wraps around histones to form nucleosomes and chromatin.'],e:'Chargaff found that A equals T and G equals C in DNA from many species, a clue that led to the base-pairing model.'},    {n:'Replication & repair',c:'p-teal',d:'How DNA is copied accurately (DNA polymerases, helicase, ligase) and how errors and damage are fixed.',l:['Semi-conservative replication.','Repair pathways: mismatch repair, base and nucleotide excision repair.'],e:'In xeroderma pigmentosum, defective nucleotide excision repair leaves people unable to fix UV damage, so they develop skin cancers very easily.'},    {n:'Transcription & RNA processing',c:'p-rose',d:'How RNA polymerase reads a promoter and makes RNA, and how pre-mRNA is capped, spliced and tailed.',l:['Promoters, enhancers and transcription factors.','Alternative splicing makes many proteins from one gene.'],e:'The fruit-fly gene <i>Dscam</i> can produce more than 38,000 different mRNA versions through alternative splicing.'},    {n:'Translation & the genetic code',c:'p-green',d:'How ribosomes and tRNAs decode mRNA. The code is triplet, nearly universal and degenerate: 64 codons, 61 for amino acids and 3 stop signals.',l:['Start codon AUG (Met); stop codons UAA, UAG, UGA.','Bacterial and human ribosomes differ.'],e:'Antibiotics such as streptomycin and tetracycline block bacterial ribosomes but spare human ones, which is why they treat infections.'},    {n:'Gene regulation & epigenetics',c:'p-amber',d:'How cells switch genes on or off in the right place and time, through regulatory proteins, chromatin changes and chemical tags such as DNA methylation.',l:['Operons in bacteria; enhancers and silencers in eukaryotes.','Epigenetic marks can be copied when cells divide.'],e:'In <i>E. coli</i>, the <i>lac</i> operon is switched on only when lactose is present and glucose is low, saving energy.'},    {n:'Mutation & genetic variation',c:'p-violet',d:'How DNA changes arise (copying errors, radiation, chemicals), the types (substitution, insertion, deletion) and their effects on proteins and health.',l:['Point mutations: silent, missense, nonsense.','Frameshifts from insertions or deletions not in multiples of three.'],e:'Cystic fibrosis is often caused by &Delta;F508, a deletion of three bases that removes one phenylalanine from the CFTR protein, which then misfolds.'},    {n:'Recombinant DNA & gene editing',c:'p-blue',d:'Cutting, joining and moving DNA between organisms, and now editing genomes directly.',l:['Restriction enzymes, ligase, plasmid vectors, transformation.','CRISPR-Cas9 and base editing.'],e:'The human insulin gene was placed in bacteria, which then produce insulin on an industrial scale for people with diabetes.'},    {n:'Genomics & omics',c:'p-teal',d:'Studying whole genomes and the full sets of RNAs (transcriptome) and proteins (proteome) using high-throughput sequencing and computing.',l:['Human Genome Project (completed 2003); gapless telomere-to-telomere assembly (2022).','Comparative and functional genomics.'],e:'Sequencing the tumour genome of a cancer patient can reveal the mutated gene driving growth and suggest a matching targeted drug.'},    {n:'Molecular evolution',c:'p-rose',d:'Using sequence differences to measure how closely species are related and how genes evolve.',l:['Molecular clocks and phylogenetic trees.','Conserved genes such as rRNA and cytochrome c.'],e:'Mitochondrial DNA comparisons placed humans and chimpanzees as close relatives, and ancient DNA revealed interbreeding with Neanderthals.'}  ];  var tb=$('mgl-tabs'),pn=$('mgl-panels');  topics.forEach(function(tp,i){    var b=document.createElement('button');b.className='tab';b.setAttribute('role','tab');b.setAttribute('aria-selected',i===0?'true':'false');b.textContent=(i+1)+'. '+tp.n.replace(/&amp;/g,'&');    b.onclick=function(){sel(i);};tb.appendChild(b);    var p=document.createElement('div');p.className='panel'+(i===0?' on':'');p.setAttribute('role','tabpanel');    p.innerHTML='<h3><span class="pill '+tp.c+'">Topic '+(i+1)+'</span> '+tp.n.replace(/&/g,'&amp;')+'</h3><p>'+tp.d+'</p><ul class="tight"><li>'+tp.l.join('</li><li>')+'</li></ul><div class="example"><b class="t">Example</b>'+tp.e+'</div>';    pn.appendChild(p);  });  function sel(k){    var bs=tb.children,ps=pn.children;    for(var i=0;i<bs.length;i++){bs[i].setAttribute('aria-selected',i===k?'true':'false');ps[i].classList.toggle('on',i===k);}  }
  /* ---------- translation simulator ---------- */  var AA='FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG',BS='TCAG';  var N3={F:'Phe',L:'Leu',S:'Ser',Y:'Tyr','*':'Stop',C:'Cys',W:'Trp',P:'Pro',H:'His',Q:'Gln',R:'Arg',I:'Ile',M:'Met',T:'Thr',N:'Asn',K:'Lys',V:'Val',A:'Ala',D:'Asp',E:'Glu',G:'Gly'};  var COL={F:'#7c3aed',L:'#7c3aed',I:'#7c3aed',M:'#16a34a',V:'#7c3aed',A:'#7c3aed',G:'#64748b',P:'#64748b',W:'#7c3aed',S:'#0d9488',T:'#0d9488',C:'#0d9488',Y:'#0d9488',N:'#0d9488',Q:'#0d9488',D:'#e11d48',E:'#e11d48',K:'#2563eb',R:'#2563eb',H:'#2563eb','*':'#334155'};  var NORMAL='ATGGTGCATCTGACTCCTGAGGAGAAGTCTGCCGTTACTGCCCTGTGGGGCAAG';  function aaOf(c){return AA.charAt(BS.indexOf(c[0])*16+BS.indexOf(c[1])*4+BS.indexOf(c[2]));}  function colorize(s){return s.replace(/[ACGTU]/g,function(m){return '<span class="base-'+m+'">'+m+'</span>';});}  function comp(s){var m={A:'T',T:'A',G:'C',C:'G'};return s.split('').map(function(x){return m[x];}).join('');}  function codonsFrom(seq){    var st=seq.indexOf('ATG');if(st<0)return {start:-1,list:[]};    var out=[];for(var i=st;i+3<=seq.length;i+=3){var c=seq.substr(i,3),a=aaOf(c);out.push({c:c,a:a});if(a==='*')break;}    return {start:st,list:out};  }  var refCod=codonsFrom(NORMAL).list;  function run(){    var raw=$('mgl-in').value.toUpperCase().replace(/U/g,'T').replace(/[^ACGT]/g,'');    var o=$('mgl-out');    if(raw.length<3){o.innerHTML='<p>Please enter at least 3 bases (A, T, G, C).</p>';return;}    var r=codonsFrom(raw);    if(r.start<0){o.innerHTML='<p>No ATG start codon found in this sequence. Add an ATG to begin translation.</p>';return;}    var gene=raw.substr(r.start,r.list.length*3);    var mrna=gene.replace(/T/g,'U');    var html='';    html+='<div class="seqlbl">DNA coding strand 5′&rarr;3′</div><div class="seqline">'+colorize(gene)+'</div>';    html+='<div class="seqlbl">DNA template strand 3′&rarr;5′ (what RNA polymerase reads)</div><div class="seqline">'+colorize(comp(gene))+'</div>';    html+='<div class="seqlbl">mRNA 5′&rarr;3′ (same as coding strand with U for T)</div><div class="seqline">'+colorize(mrna)+'</div>';    html+='<div class="seqlbl">Codons &rarr; amino acids</div><div class="codons">';    var prot=[],muts=0;    r.list.forEach(function(k,i){      var isMut=(raw===gene||true)&&i<refCod.length&&refCod[i].c!==k.c&&gene.length>=NORMAL.length*0.4&&hasRefLike(gene);      if(isMut)muts++;      if(k.a!=='*')prot.push(N3[k.a]);      html+='<div class="cod'+(k.a==='*'?' stop':'')+(isMut?' mut':'')+'" style="animation-delay:'+(i*(reduce?0:140))+'ms"><div class="c">'+k.c.replace(/T/g,'U')+'</div><div class="a" style="background:'+COL[k.a]+'">'+N3[k.a]+'</div></div>';    });    html+='</div>';    html+='<p style="margin-top:12px"><b>Protein (N&rarr;C):</b> '+(prot.join(' &ndash; ')||'(none)')+'</p>';    if(muts>0)html+='<p><b>Mutation detected:</b> '+muts+' codon(s) differ from the normal &beta;-globin sequence (outlined in red). Compare the amino acids to see whether the change alters the protein.</p>';    o.innerHTML=html;  }  function hasRefLike(g){ // only compare when the sequence resembles the beta-globin teaching sequence    var d=0,n=Math.min(g.length,NORMAL.length);for(var i=0;i<n;i++)if(g[i]!==NORMAL[i])d++;    return d<=4;  }  $('mgl-go').onclick=run;  $('mgl-in').addEventListener('keydown',function(e){if(e.key==='Enter')run();});  $('mgl-norm').onclick=function(){$('mgl-in').value=NORMAL;run();};  $('mgl-sick').onclick=function(){$('mgl-in').value=NORMAL.replace('GAG','GTG');run();};  $('mgl-rand').onclick=function(){    var b='ACGT',s='ATG',L=7+Math.floor(Math.random()*6);    for(var i=0;i<L*3;i++)s+=b[Math.floor(Math.random()*4)];    $('mgl-in').value=s+'TAA';run();  };  $('mgl-in').value=NORMAL.substr(0,27);run();
  /* ---------- quiz ---------- */  var Q=[    {q:'Which statement best defines molecular genetics?',o:['The study of how traits are distributed in populations only','The study of the structure, function, expression and regulation of genes at the DNA, RNA and protein level','The study of cell organelles under the microscope','The study of animal breeding records'],a:1,e:'Molecular genetics explains heredity in terms of molecules: DNA, RNA and proteins.'},    {q:'What is the normal direction of information flow in the central dogma?',o:['Protein → RNA → DNA','RNA → protein → DNA','DNA → RNA → protein','DNA → protein → RNA'],a:2,e:'DNA is transcribed into RNA, which is translated into protein. Reverse transcription is a special case in retroviruses.'},    {q:'In sickle cell disease, which single change in the β-globin gene is responsible?',o:['GAG changes to GTG, replacing Glu with Val','A whole chromosome is lost','A stop codon is deleted','The gene is copied twice'],a:0,e:'A single-base substitution (GAG→GTG) causes a Glu→Val change at position 6.'},    {q:'Which technique makes millions of copies of a selected DNA segment?',o:['Gel electrophoresis','Polymerase chain reaction (PCR)','Microscopy','Centrifugation'],a:1,e:'PCR amplifies a target sequence using primers and a heat-stable DNA polymerase.'},    {q:'Which is a direct application of molecular genetics in forensics?',o:['Blood pressure measurement','Radiocarbon dating','DNA fingerprinting','X-ray imaging'],a:2,e:'DNA fingerprinting compares highly variable repeat patterns between samples.'},    {q:'How many of the 64 codons code for amino acids, and how many are stop signals?',o:['64 amino acids, 0 stops','61 amino acids, 3 stops','60 amino acids, 4 stops','20 amino acids, 44 stops'],a:1,e:'61 codons are sense codons (for 20 amino acids, so the code is degenerate) and 3 are stop codons.'}  ];  var qs=$('mgl-qs'),sc=$('mgl-score'),done,right;  function build(){    qs.innerHTML='';done=0;right=0;sc.textContent='';    Q.forEach(function(it,qi){      var d=document.createElement('div');d.className='q';      d.innerHTML='<b>'+(qi+1)+'. '+it.q+'</b>';      var ex=document.createElement('div');ex.className='exp';ex.textContent=it.e;      var btns=[];      it.o.forEach(function(t,oi){        var b=document.createElement('button');b.className='opt';b.textContent=t;        b.onclick=function(){          if(d.getAttribute('data-done'))return;d.setAttribute('data-done','1');done++;          btns.forEach(function(x,k){if(k===it.a)x.classList.add('ok');});          if(oi===it.a)right++;else b.classList.add('bad');          ex.classList.add('on');          if(done===Q.length)sc.textContent='Score: '+right+' / '+Q.length;        };        btns.push(b);d.appendChild(b);      });      d.appendChild(ex);qs.appendChild(d);    });  }  $('mgl-qreset').onclick=build;build();})();</script><!-- ===================== END EMBED ===================== -->
CHAPTER 2

Chemical Basis of Genetic Information

CHAPTER 3

DNA Structure and Genome Organization

CHAPTER 4

Chromosomes and Chromatin

CHAPTER 5

DNA Replication

CHAPTER 6

DNA Damage and Repair

CHAPTER 7

Genetic Recombination

CHAPTER 8

Transcription and RNA Biology

CHAPTER 9

Translation and Protein Synthesis

CHAPTER 10

Gene Regulation