Differentials of myasthenia gravis and their differentiating points
"myasthenia gravis" AND "differential diagnosis"
| Feature | Myasthenia Gravis | Lambert-Eaton Syndrome |
|---|---|---|
| Pathophysiology | Autoimmune attack on postsynaptic nicotinic AChR (or MuSK/LRP4) | Autoimmune attack on presynaptic P/Q-type voltage-gated calcium channels (VGCC) |
| Antibodies | Anti-AChR (~85%), anti-MuSK (~40% seronegative), anti-LRP4 | Anti-VGCC (>95%), SOX1 (paraneoplastic) |
| Weakness distribution | Ocular and bulbar > proximal limb | Proximal limb (especially legs) > ocular/bulbar |
| Ocular involvement | Ptosis and diplopia very prominent | Eye movements usually spared; pupillary reflexes may be sluggish |
| Effect of exercise | Weakness worsens with sustained activity | Weakness transiently improves with brief exercise (post-tetanic potentiation) |
| Deep tendon reflexes | Normal or mildly reduced | Reduced at rest but improve after exercise |
| Autonomic dysfunction | Absent | Prominent: dry mouth, hypohidrosis, impotence, orthostasis, constipation |
| Repetitive nerve stimulation (EMG) | Decremental response at low-frequency (2–3 Hz) stimulation (>10% decrease) | Incremental response (>100% increase) at high-frequency stimulation or after brief exercise |
| Association with malignancy | Thymoma (10–15%) | Small cell lung cancer (40–62%); may precede cancer by years |
| Treatment | Pyridostigmine, immunosuppression, thymectomy | 3,4-diaminopyridine (amifampridine) first-line; treat underlying cancer |
| Feature | Myasthenia Gravis | Botulism |
|---|---|---|
| Mechanism | Postsynaptic AChR blockade | Presynaptic blockade of ACh release by botulinum toxin |
| Onset | Chronic, fluctuating | Acute (hours to days) after ingestion of suspect food or wound infection |
| Paralysis direction | Variable; often starts ocular/bulbar | Descending flaccid paralysis (cranial nerves → limbs → respiratory) |
| Pupils | Normal | Dilated, poorly reactive (autonomic involvement) |
| GI symptoms | Absent | Nausea, vomiting, diarrhea early; constipation later |
| Response to anticholinesterases | Improves with pyridostigmine/edrophonium | No improvement |
| Sensory | Normal | Normal (cognition preserved) |
| DTRs | Normal | Diminished or absent |
| Diagnosis | Serology, EMG, edrophonium test | Botulinum toxin in serum/stool/food; culture |
| Treatment | Pyridostigmine, immunosuppression | Heptavalent antitoxin (early); supportive care |
| Feature | Myasthenia Gravis | Congenital Myasthenic Syndromes |
|---|---|---|
| Etiology | Acquired autoimmune | Genetic mutations of pre/synaptic/postsynaptic machinery |
| Age of onset | Any age (bimodal: young women, older men) | Birth or early childhood (severe forms); some (slow-channel) present in adulthood |
| Serology | AChR or MuSK antibodies often positive | Antibodies absent (seronegative) |
| Response to immunosuppression | Responds well | Does not respond — immunosuppression ineffective/harmful |
| Additional features | Thymoma association | May have intellectual disability, seizures (presynaptic mutations) |
| Key diagnostic test | Antibody serology + EMG | Genetic analysis (distinguishes from seronegative MG) |
| Treatment | Immunotherapy, thymectomy | Pyridostigmine, 3,4-DAP, salbutamol, fluoxetine (slow-channel); depends on genetic subtype |
| Condition | Key Differentiating Features |
|---|---|
| Stroke (brainstem/cortical) | Sudden onset; sensory deficits, UMN signs, abnormal imaging |
| Intracranial aneurysm (CN III palsy) | Painful, fixed dilated pupil; sudden onset; urgent imaging |
| Cavernous sinus syndrome | Multiple CN palsies (III, IV, V₁, VI, Horner); proptosis; imaging shows lesion |
| Basilar meningitis | Fever, meningismus, CSF pleocytosis; TB/fungal/sarcoid etiologies |
| Demyelinating disease (MS) | INO (internuclear ophthalmoplegia), sensory symptoms, white matter lesions on MRI, relapses |
| Horner syndrome | Ptosis + miosis + anhidrosis (partial); pupil involvement distinguishes from MG ptosis |
| Condition | Low-Frequency RNS | High-Frequency RNS |
|---|---|---|
| MG | Decremental (>10%) | Normalizes or further decrements |
| LEMS | Decremental (baseline CMAP reduced) | Incremental (>100%) |
| Botulism | Similar to LEMS (incremental at high frequency) | Incremental |
| Congenital MG | Variable decremental | Variable |
Motor neuron disease vs myasthenia
| Motor Neuron Disease (ALS) | Myasthenia Gravis (MG) | |
|---|---|---|
| Site of lesion | Upper and/or lower motor neurons (anterior horn cells, corticospinal tracts) | Neuromuscular junction — postsynaptic AChR (or MuSK/LRP4) |
| Mechanism | Progressive degeneration of motor neurons — neurogenic muscle loss | Autoimmune antibody-mediated AChR blockade → failed neuromuscular transmission |
| Sensory involvement | None (or trivial distal loss late) | Absent |
| Autonomic involvement | None | Absent |
| Prognosis | Relentlessly progressive; 50% die within 3 years, 90% within 6 years | Fluctuating; remissions possible; treatable |
| Feature | Motor Neuron Disease (ALS) | Myasthenia Gravis |
|---|---|---|
| Onset | Insidious, progressive, no remissions | Fluctuating; worsens with activity, improves with rest |
| Fatigability | Absent (weakness is constant, not fatigue-related) | Cardinal feature — fatigable weakness worsening through the day |
| Ocular involvement | Absent — eye movements are classically spared until very late (if at all) | Prominent — ptosis and diplopia are the most common presenting symptoms |
| Ptosis | Not a feature | Very common |
| Facial weakness | Can occur (bulbar/pseudobulbar palsy) | Can occur |
| Tongue | Atrophic, fasciculating — a hallmark finding | Normal in appearance |
| Dysarthria | Present (harsh, strained voice in ALS; nasal in bulbar palsy) | Nasal, fatigable dysarthria |
| Dysphagia | Present, progressive | Present, fluctuating |
| Limb weakness distribution | Variable: distal, proximal, or mixed; asymmetric | Predominantly proximal; symmetric |
| Muscle wasting / atrophy | Prominent (denervation atrophy) | Absent — no structural muscle loss |
| Fasciculations | Present — a hallmark of LMN disease | Absent |
| Muscle tone | Increased (UMN) and/or decreased (LMN) — combination | Normal |
| Deep tendon reflexes | Brisk/hyperreflexic (UMN component) despite wasted muscles — classic paradox; or depressed (pure LMN) | Normal |
| Babinski sign | Present (UMN involvement) | Absent |
| Jaw jerk | Hyperactive (pseudobulbar palsy) | Normal |
| Respiratory weakness | Occurs late; diaphragmatic involvement common | Myasthenic crisis can cause acute respiratory failure |
| Sensory exam | Normal (pure motor disease) | Normal |
| Cognition | Intact (5–20% may have frontotemporal dementia overlap) | Intact |
| Investigation | Motor Neuron Disease | Myasthenia Gravis |
|---|---|---|
| Serology | Negative (no disease-specific antibody) | Anti-AChR (~85%), anti-MuSK (~40% seronegative), anti-LRP4 |
| Repetitive nerve stimulation (EMG) | Normal NMJ transmission; fibrillations and fasciculations at rest; enlarged motor units (reinnervation) | Decremental response (>10%) at 2–3 Hz stimulation; no fibrillations |
| Single-fibre EMG | Abnormal (increased jitter due to reinnervation) — but different pattern | Markedly increased jitter — highly sensitive for MG |
| Nerve conduction velocity | Motor NCV normal or mildly slowed; amplitude reduced in LMN type | Normal |
| Edrophonium/neostigmine test | No response | Transient objective improvement in weakness |
| Ice test | No response | Improvement in ptosis |
| CT chest | Not specific (may show aspiration changes) | Screen for thymoma |
| MRI brain/spine | Can show corticospinal tract changes; useful to exclude cervical myelopathy/spondylosis | Normal |
| Muscle biopsy | Grouped angular atrophy (denervation pattern) | Normal |
| CSF | Normal (or mildly elevated protein) | Normal |
| ALS Bulbar Palsy | MG Bulbar Symptoms | |
|---|---|---|
| Tongue | Atrophic, fasciculating | Normal |
| Jaw jerk | Exaggerated (pseudobulbar component) | Normal |
| Voice quality | Harsh, strained + slurred (mixed UMN/LMN) | Nasal, fatigable |
| Ptosis/diplopia | Absent | Often present |
| Worsens through day | No | Yes |
| Emotional lability | Present (pseudobulbar affect) | Absent |
| Response to pyridostigmine | None | Improvement |
"Myasthenia with dysarthria and dysphagia but without ptosis or obvious strabismus may be confused with... motor neuron disease. Testing with an anticholinesterase inhibitor, single-fiber and repetitive stimulation recording, and measurement of antibodies usually clarifies the matter." — Adams & Victor's Principles of Neurology, 12e
| MG | ALS / MND | |
|---|---|---|
| Lesion site | NMJ (postsynaptic) | Upper + lower motor neurons |
| Hallmark | Fatigable weakness, ptosis, diplopia | UMN + LMN signs in same patient |
| Ocular signs | Prominent | Absent |
| Tongue | Normal | Atrophic + fasciculating |
| Reflexes | Normal | Brisk (or absent in pure LMN) |
| Babinski | Absent | Present (UMN type) |
| Fasciculations | Absent | Present |
| Wasting | Absent | Prominent |
| Fatigability | Yes | No |
| AChR antibodies | Yes (85%) | No |
| RNS EMG | Decremental | Normal NMJ; fibrillations |
| Response to neostigmine | Yes | No |
| Prognosis | Treatable, remissions possible | Uniformly progressive, fatal |
How to differentiate from GBS
| Guillain-Barré Syndrome (GBS) | Myasthenia Gravis (MG) | |
|---|---|---|
| Site of lesion | Peripheral nerve / nerve roots (demyelinating or axonal) | Neuromuscular junction (postsynaptic AChR) |
| Mechanism | Post-infectious molecular mimicry → autoimmune attack on peripheral nerve myelin or axons | IgG antibodies against AChR, MuSK, or LRP4 → impaired neuromuscular transmission |
| Trigger | Preceding infection (Campylobacter, CMV, EBV, Zika) 2–4 weeks before onset | No identifiable precipitant (may worsen with infection, surgery, medications) |
| Course | Monophasic — peaks at 2–4 weeks, then plateau, then recovery | Fluctuating — worsens with activity, improves with rest; exacerbations and remissions |
| Feature | GBS | Myasthenia Gravis |
|---|---|---|
| Onset pattern | Acute (days–weeks), ascending weakness | Usually subacute; fluctuating throughout the day |
| Direction of weakness | Ascending — legs → arms → bulbar → respiratory | No fixed direction; often starts ocular/bulbar |
| Fatigability | Absent — weakness is constant | Cardinal feature — worsens with sustained activity |
| Ocular signs (ptosis/diplopia) | Usually absent in classic GBS; present in Miller Fisher variant | Prominent — most common presenting symptom |
| Pupillary abnormalities | Can occur in Miller Fisher syndrome | Absent — pupils always spared in MG |
| Ataxia | Present in Miller Fisher variant (sensory/cerebellar) | Absent |
| Sensory symptoms | Present — paresthesias, tingling, back pain | Absent — purely motor disease |
| Deep tendon reflexes | Absent/areflexia — hallmark | Normal |
| Facial weakness | Complete, often asymmetric bilateral facial palsy | Can occur but typically with ptosis/diplopia |
| Autonomic dysfunction | Present in ~65% (tachycardia, BP swings, urinary retention, ileus) | Absent |
| Pain | Back pain, limb pain common | Absent |
| Preceding illness | Yes — URI or gastroenteritis 2–4 weeks prior | No |
| Jaw / hanging head | Not typical | Hanging jaw and head drop — suggestive of MG |
| Respiratory failure | Common (1/3 of patients) | Myasthenic crisis — occurs but less predictably |
"A hanging jaw and hanging head are indicative of myasthenia, whereas complete or asymmetric facial paresis is typical of GBS." — Adams & Victor's Principles of Neurology, 12e
| Feature | Miller Fisher Syndrome (GBS variant) | Ocular/Bulbar MG |
|---|---|---|
| Classic triad | Ophthalmoplegia + Ataxia + Areflexia | Ptosis + diplopia (no ataxia, reflexes normal) |
| Ptosis | May be present | Prominent |
| Pupils | May be abnormal | Normal |
| Ataxia | Present | Absent |
| Reflexes | Absent | Normal |
| Sensory symptoms | May have mild paresthesias | Absent |
| Fatigability | Absent | Present |
| Response to anticholinesterase | None | Improvement |
| Antibody | Anti-GQ1b (>85%) | Anti-AChR / anti-MuSK |
| NCV | Normal in MFS (unlike classic GBS) | Normal |
"The oculopharyngeal-brachial variants of GBS in the early stages have many features of myasthenia, including ptosis, that may be partially responsive to anticholinesterase drugs. The loss of tendon reflexes, acral paresthesias, and areflexia make the diagnosis of GBS at once apparent." — Adams & Victor, 12e
| Investigation | GBS | Myasthenia Gravis |
|---|---|---|
| CSF | Cytoalbuminologic (albuminocytologic) dissociation — high protein (>45 mg/dL), few cells (<5 WBC/mm³) | Normal |
| CSF cells | <10 (if >50, think HIV/Lyme/sarcoid) | Normal |
| Nerve conduction studies | Demyelinating pattern — slowed NCV, prolonged F-waves, conduction block (AIDP); reduced amplitudes (axonal) | Normal NCV and F-waves |
| EMG (repetitive nerve stimulation) | Normal NMJ transmission; fibrillations/positive waves (axonal type) | Decremental response (>10% at 2–3 Hz) |
| Serology | Anti-GQ1b (Miller Fisher); anti-GM1, anti-GD1a (axonal); no AChR antibodies | Anti-AChR (~85%), anti-MuSK (~40% of seronegative) |
| Edrophonium/neostigmine test | No response | Positive — objective improvement |
| MRI spine | May show nerve root enhancement | Normal |
| Anti-AChR antibodies | Negative | Positive (85%) |
| GBS | MG | |
|---|---|---|
| Lesion | Peripheral nerve | Neuromuscular junction |
| Trigger | Post-infectious | None specific |
| Course | Monophasic, ascending | Fluctuating, fatigable |
| Reflexes | Absent | Normal |
| Sensory loss | Present | Absent |
| Autonomic | Common | Absent |
| Ataxia | MFS variant | Never |
| Pupils | Abnormal (MFS) | Always normal |
| CSF | High protein, few cells | Normal |
| NCV | Slow (AIDP) / low amplitude (axonal) | Normal |
| RNS EMG | Normal NMJ | Decremental |
| Specific antibody | Anti-GQ1b (MFS) | Anti-AChR / MuSK |
| Neostigmine test | No response | Improves |
| Treatment | IVIg / plasmapheresis | Pyridostigmine, immunosuppression, thymectomy |
Make a chart of all these differentials with myasthenia
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"
mkdir -p /home/daytona/workspace/mg-differentials && cat > /home/daytona/workspa…
~/mg-differentials/make_chart.py
import openpyxl
from openpyxl.styles import PatternFill, Font, Alignment, Border, Side
from openpyxl.utils import get_column_letter
wb = openpyxl.Workbook()
ws = wb.active
ws.title = "MG Differentials"
# Colors
MG_HEADER = "1F4E79"
DIFF_HEADER = "2E75B6"
ROW_HEADER = "BDD7EE"
ALT_ROW1 = "FFFFFF"
ALT_ROW2 = "EBF3FB"
TITLE_BG = "1F4E79"
WHITE = "FFFFFF"
BLACK = "000000"
DARK_FONT = "1F4E79"
thin = Side(border_style="thin", color="A0A0A0")
border_thin = Border(left=thin, right=thin, top=thin, bottom=thin)
def fill(hex_color):
return PatternFill("solid", fgColor=hex_color)
def font(bold=False, color=BLACK, size=10, italic=False):
return Font(bold=bold, color=color, size=size, italic=italic, name="Calibri")
def align(wrap=True, h="center", v="center"):
return Alignment(horizontal=h, vertical=v, wrap_text=wrap)
columns = [
"Feature",
"Myasthenia Gravis",
"Lambert-Eaton\nSyndrome (LEMS)",
"Botulism",
"Congenital\nMyasthenic\nSyndromes",
"GBS (AIDP)",
"Miller Fisher\nSyndrome",
"ALS / Motor\nNeuron Disease",
"Thyroid\nOphthalmopathy",
"Oculopharyngeal\nMuscular Dystrophy",
"Mitochondrial\nMyopathy (CPEO)",
]
rows = [
("Pathophysiology",
"Autoimmune; postsynaptic AChR blockade at NMJ",
"Autoimmune; presynaptic VGCC blockade at NMJ",
"Botulinum toxin blocks presynaptic ACh release at NMJ",
"Genetic mutations of NMJ machinery (pre/syn/post-synaptic)",
"Post-infectious demyelination of peripheral nerve roots",
"Post-infectious; anti-GQ1b; cranial nerve variant of GBS",
"Progressive degeneration of upper and lower motor neurons",
"Autoimmune orbital inflammation; extraocular muscle infiltration",
"PABPN1 gene mutation; autosomal dominant myopathy",
"Mitochondrial DNA deletion; POLG1/Twinkle mutations"),
("Site of Lesion",
"NMJ (postsynaptic)",
"NMJ (presynaptic)",
"NMJ (presynaptic)",
"NMJ (pre/syn/post)",
"Peripheral nerve / nerve roots",
"Peripheral nerve (cranial nerves dominant)",
"Upper + lower motor neurons",
"Orbit / extraocular muscles",
"Skeletal muscle",
"Skeletal muscle (mitochondria)"),
("Onset / Course",
"Subacute; fluctuating; remissions possible",
"Subacute; progressive; less fluctuation than MG",
"Acute (hours to days) after contaminated food or wound",
"Birth or early childhood (severe forms); adulthood (slow-channel)",
"Acute ascending over days to weeks; monophasic",
"Acute; monophasic",
"Insidious; relentlessly progressive; no remissions",
"Chronic; slowly progressive",
"Chronic; slowly progressive; onset usually >50 yrs",
"Chronic; slowly progressive; symmetric bilateral"),
("Fatigability (Hallmark of MG)",
"YES - Cardinal feature; worsens with activity, improves with rest",
"NO - Less prominent; strength paradoxically improves briefly with exercise",
"NO - Absent",
"NO - Weakness is constant",
"NO - Weakness is constant",
"NO - Weakness is constant",
"NO - Weakness is constant",
"NO - Absent",
"NO - Absent",
"NO - Absent"),
("Ptosis",
"YES - Prominent; asymmetric; fatigable",
"NO - Uncommon; eye usually spared",
"YES - Present; fixed; non-fatigable; descending",
"YES - May be present",
"NO - Absent in classic GBS",
"YES - May be present",
"NO - Eye movements classically spared",
"YES - With proptosis and lid lag",
"YES - Slowly progressive bilateral",
"YES - Slowly progressive bilateral"),
("Diplopia / Ophthalmoplegia",
"YES - Common presenting symptom; fatigable",
"NO - Eye movements usually spared",
"YES - Fixed; non-fatigable; descending",
"YES - May occur",
"NO - Absent in classic GBS",
"YES - Ophthalmoplegia is a defining feature",
"NO - Eye movements classically spared",
"YES - Restricted (mechanical); inferior/medial rectus",
"YES - Slowly progressive",
"YES - Progressive external ophthalmoplegia is hallmark"),
("Pupils",
"Normal - always spared",
"Sluggish (autonomic involvement)",
"Dilated and poorly reactive - KEY differentiator",
"Normal",
"Normal",
"May be abnormal (autonomic)",
"Normal",
"Normal",
"Normal",
"Normal"),
("Deep Tendon Reflexes",
"Normal",
"Reduced at rest; improve after exercise",
"Diminished or absent",
"Variable",
"Absent / areflexia - HALLMARK",
"Absent / areflexia - HALLMARK",
"Brisk (UMN) despite wasting; or reduced (LMN) - pathognomonic paradox",
"Normal",
"Normal",
"Normal"),
("Muscle Wasting / Atrophy",
"Absent",
"Absent",
"Absent",
"Can occur (progressive forms)",
"Absent",
"Absent",
"Prominent - denervation atrophy",
"Absent",
"Temporalis and pharyngeal wasting",
"Absent"),
("Fasciculations",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Present - LMN hallmark",
"Absent",
"Absent",
"Absent"),
("Sensory Symptoms",
"Absent",
"Paresthesias; metallic taste (autonomic overlap)",
"Absent",
"Absent",
"Paresthesias and back pain - common",
"Mild paresthesias possible",
"Absent (trivial distal loss very late)",
"Absent",
"Absent",
"Absent"),
("Autonomic Dysfunction",
"Absent",
"Prominent - dry mouth, impotence, constipation, orthostasis, hypohidrosis",
"Prominent - dilated pupils, dry mouth, constipation, orthostatic hypotension",
"Absent",
"Present in ~65% - BP swings, tachycardia, urinary retention",
"Less prominent",
"Absent",
"Absent",
"Absent",
"Cardiac conduction defects in Kearns-Sayre"),
("Preceding Trigger",
"None specific",
"None (paraneoplastic: small cell lung cancer)",
"Contaminated food or wound (10 hrs to 5 days before)",
"Genetic / congenital",
"URI or gastroenteritis 2-4 weeks prior",
"Same as GBS - post-infectious",
"None",
"None",
"Genetic",
"Genetic / maternal inheritance"),
("Malignancy Association",
"Thymoma (10-15%)",
"Small cell lung cancer (40-62%); may precede cancer by years",
"None",
"None",
"None",
"None",
"None",
"None",
"None",
"None"),
("Proptosis",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Present - KEY feature",
"Absent",
"Absent"),
("Ataxia",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Present - defining feature of MFS triad",
"Absent",
"Absent",
"Absent",
"Gait ataxia in Kearns-Sayre syndrome"),
("Babinski Sign / UMN Signs",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Present (UMN component) - pathognomonic paradox with wasting",
"Absent",
"Absent",
"Absent"),
("Tongue Findings",
"Normal in appearance",
"Normal",
"Normal",
"Normal",
"Normal",
"Normal",
"Atrophic and fasciculating - hallmark of ALS",
"Normal",
"Pharyngeal involvement (dysphagia)",
"Normal"),
("CSF",
"Normal",
"Normal",
"Normal",
"Normal",
"High protein; normal cells (<5 WBC/mm3) - cytoalbuminologic dissociation",
"Normal (or mildly raised protein)",
"Normal (or mildly elevated protein late)",
"Normal",
"Normal",
"Raised lactate in Kearns-Sayre"),
("Nerve Conduction Studies",
"Normal",
"Normal NCV; reduced CMAP amplitude at baseline",
"Similar to LEMS",
"Variable",
"Slowed NCV; prolonged F-waves; conduction block (AIDP); reduced amplitude (axonal)",
"Normal NCV (unlike AIDP)",
"Normal or mildly slowed NCV; reduced amplitude (LMN)",
"Normal",
"Normal",
"Normal"),
("Repetitive Nerve Stimulation",
"Decremental response >10% at 2-3 Hz - HALLMARK",
"Incremental response >100% at high frequency or post-exercise - HALLMARK",
"Incremental (similar to LEMS)",
"Decremental (variable)",
"Normal NMJ; fibrillations in axonal type",
"Normal NMJ transmission",
"Fibrillations; fasciculations; enlarged motor units; normal NMJ",
"Normal",
"Myopathic pattern",
"Myopathic pattern"),
("Specific Antibodies / Genetics",
"Anti-AChR (85%); Anti-MuSK (~40% of seronegative); Anti-LRP4",
"Anti-VGCC P/Q-type (>95%); SOX1 (paraneoplastic form)",
"Botulinum toxin detected in serum, stool, or food",
"Genetic mutation - no antibodies (seronegative for AChR/MuSK)",
"Anti-ganglioside (GM1, GD1a); anti-GQ1b rare",
"Anti-GQ1b (>85%) - highly specific",
"None",
"Anti-TSH receptor antibody; thyroid function tests",
"PABPN1 gene mutation (GCG repeat expansion)",
"Mitochondrial DNA deletion; POLG1 mutation"),
("Response to Anticholinesterase\n(Pyridostigmine / Neostigmine)",
"YES - Objective improvement",
"Partial / minimal response",
"No response",
"Variable (some CMS subtypes improve)",
"No response",
"No response",
"No response",
"No response",
"No response",
"No response"),
("Ice Test / Rest Test",
"Positive - ptosis improves",
"Not applicable",
"Not applicable",
"Variable",
"Not applicable",
"Not applicable",
"Not applicable",
"Not applicable",
"Not applicable",
"Not applicable"),
("Forced Duction Test",
"Negative - no mechanical restriction",
"Negative",
"Negative",
"Negative",
"Negative",
"Negative",
"Negative",
"Positive - mechanical restriction of extraocular muscles",
"Negative",
"Negative"),
("Muscle Biopsy",
"Normal (mild fiber atrophy possible)",
"Normal",
"Normal",
"Abnormal NMJ on electron microscopy",
"Normal",
"Normal",
"Grouped angular atrophy (denervation pattern)",
"Normal",
"Rimmed vacuoles - characteristic",
"Ragged-red fibers on Gomori trichrome - HALLMARK"),
("Imaging",
"CT chest - screen for thymoma",
"CT/PET chest - screen for SCLC",
"Normal",
"Normal",
"MRI spine: nerve root enhancement and thickening",
"Normal",
"Normal (MRI may show corticospinal tract T2 changes late)",
"CT/MRI orbit: enlarged extraocular muscles; proptosis",
"Normal",
"MRI brain: white matter lesions in Kearns-Sayre"),
("Treatment",
"Pyridostigmine; immunosuppression (steroids, azathioprine); thymectomy; IVIg/PLEX",
"3,4-DAP (amifampridine) first-line; treat SCLC; IVIg/PLEX; immunosuppression",
"Heptavalent botulinum antitoxin; ventilatory support",
"Genetic-guided: pyridostigmine; 3,4-DAP; salbutamol; fluoxetine (slow-channel)",
"IVIg or plasmapheresis; respiratory monitoring and support",
"IVIg or plasmapheresis; supportive care",
"Riluzole / edaravone; respiratory support; multidisciplinary; palliative",
"Teprotumumab; steroids; orbital decompression; prism glasses",
"Supportive; ptosis surgery; cricopharyngeal myotomy for dysphagia",
"CoQ10; manage cardiac conduction defects; supportive"),
]
# Build sheet
# Row 1 - Title
ws.merge_cells(start_row=1, start_column=1, end_row=1, end_column=len(columns))
title_cell = ws.cell(row=1, column=1)
title_cell.value = "Differential Diagnosis of Myasthenia Gravis — Comprehensive Comparison Chart"
title_cell.font = Font(bold=True, color=WHITE, size=14, name="Calibri")
title_cell.fill = fill(TITLE_BG)
title_cell.alignment = align(h="center", v="center")
ws.row_dimensions[1].height = 32
# Row 2 - Column headers
for col_idx, col_name in enumerate(columns, start=1):
cell = ws.cell(row=2, column=col_idx, value=col_name)
if col_idx == 1:
cell.fill = fill(ROW_HEADER)
cell.font = font(bold=True, color=DARK_FONT, size=10)
elif col_idx == 2:
cell.fill = fill(MG_HEADER)
cell.font = font(bold=True, color=WHITE, size=10)
else:
cell.fill = fill(DIFF_HEADER)
cell.font = font(bold=True, color=WHITE, size=10)
cell.alignment = align(h="center", v="center")
cell.border = border_thin
ws.row_dimensions[2].height = 48
# Data rows
for row_idx, row_data in enumerate(rows, start=3):
bg = ALT_ROW1 if (row_idx % 2 == 0) else ALT_ROW2
for col_idx, value in enumerate(row_data, start=1):
cell = ws.cell(row=row_idx, column=col_idx, value=value)
if col_idx == 1:
cell.fill = fill(ROW_HEADER)
cell.font = font(bold=True, color=DARK_FONT, size=9)
cell.alignment = align(h="left", v="center")
else:
cell.fill = fill(bg)
v = str(value)
if v.startswith("YES"):
cell.font = Font(color="1F6B2E", size=9, name="Calibri", bold=False)
elif v.startswith("NO"):
cell.font = Font(color="C00000", size=9, name="Calibri", bold=False)
elif "HALLMARK" in v or "KEY" in v:
cell.font = Font(color="7030A0", size=9, name="Calibri", bold=True)
elif v.startswith("Absent"):
cell.font = Font(color="595959", size=9, name="Calibri")
elif v.startswith("Normal"):
cell.font = Font(color="595959", size=9, name="Calibri")
else:
cell.font = font(size=9, color=BLACK)
cell.alignment = align(h="left", v="center")
cell.border = border_thin
ws.row_dimensions[row_idx].height = 48
# Column widths
widths = [28, 30, 27, 27, 26, 26, 24, 28, 26, 27, 28]
for col_idx, w in enumerate(widths, start=1):
ws.column_dimensions[get_column_letter(col_idx)].width = w
# Freeze panes
ws.freeze_panes = "B3"
# Legend
legend_row = len(rows) + 4
ws.merge_cells(start_row=legend_row, start_column=1,
end_row=legend_row, end_column=len(columns))
leg = ws.cell(row=legend_row, column=1,
value="Legend: GREEN = Present/Positive RED = Absent/Negative PURPLE = Hallmark/Key feature NMJ = Neuromuscular Junction AChR = Acetylcholine Receptor VGCC = Voltage-Gated Calcium Channel CMAP = Compound Muscle Action Potential SCLC = Small Cell Lung Cancer CPEO = Chronic Progressive External Ophthalmoplegia CMS = Congenital Myasthenic Syndromes MFS = Miller Fisher Syndrome PLEX = Plasma Exchange IVIg = Intravenous Immunoglobulin 3,4-DAP = 3,4-Diaminopyridine")
leg.font = Font(italic=True, size=9, color="595959", name="Calibri")
leg.fill = fill("F2F2F2")
leg.alignment = Alignment(horizontal="left", vertical="center", wrap_text=True)
ws.row_dimensions[legend_row].height = 35
out = "/home/daytona/workspace/mg-differentials/MG_Differentials_Chart.xlsx"
wb.save(out)
print(f"Saved: {out}")
~/mg-differentials/make_chart.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mg-differentials/make_chart.py'
rm /home/daytona/workspace/mg-differentials/make_chart.py
~/mg-differentials/make_chart.py
import openpyxl
from openpyxl.styles import PatternFill, Font, Alignment, Border, Side
from openpyxl.utils import get_column_letter
wb = openpyxl.Workbook()
ws = wb.active
ws.title = "MG Differentials"
MG_HEADER = "1F4E79"
DIFF_HEADER = "2E75B6"
ROW_HEADER = "BDD7EE"
ALT_ROW1 = "FFFFFF"
ALT_ROW2 = "EBF3FB"
TITLE_BG = "1F4E79"
WHITE = "FFFFFF"
BLACK = "000000"
DARK_FONT = "1F4E79"
thin = Side(border_style="thin", color="A0A0A0")
border_thin = Border(left=thin, right=thin, top=thin, bottom=thin)
def fill(hex_color):
return PatternFill("solid", fgColor=hex_color)
def mkfont(bold=False, color="000000", size=10):
return Font(bold=bold, color=color, size=size, name="Calibri")
def align(wrap=True, h="center", v="center"):
return Alignment(horizontal=h, vertical=v, wrap_text=wrap)
columns = [
"Feature",
"Myasthenia Gravis",
"Lambert-Eaton\nSyndrome (LEMS)",
"Botulism",
"Congenital\nMyasthenic\nSyndromes",
"GBS (AIDP)",
"Miller Fisher\nSyndrome",
"ALS / Motor\nNeuron Disease",
"Thyroid\nOphthalmopathy",
"Oculopharyngeal\nMuscular Dystrophy",
"Mitochondrial\nMyopathy (CPEO)",
]
rows = [
("Pathophysiology",
"Autoimmune; postsynaptic AChR blockade at NMJ",
"Autoimmune; presynaptic VGCC blockade at NMJ",
"Botulinum toxin blocks presynaptic ACh release",
"Genetic mutations of NMJ machinery (pre/syn/post-synaptic)",
"Post-infectious demyelination of peripheral nerve roots",
"Post-infectious; anti-GQ1b; cranial nerve variant of GBS",
"Progressive degeneration of upper and lower motor neurons",
"Autoimmune orbital inflammation; extraocular muscle infiltration",
"PABPN1 gene mutation; autosomal dominant myopathy",
"Mitochondrial DNA deletion; POLG1/Twinkle mutations"),
("Site of Lesion",
"NMJ (postsynaptic)",
"NMJ (presynaptic)",
"NMJ (presynaptic)",
"NMJ (pre/syn/post)",
"Peripheral nerve / nerve roots",
"Peripheral nerve (cranial nerves dominant)",
"Upper + lower motor neurons",
"Orbit / extraocular muscles",
"Skeletal muscle",
"Skeletal muscle (mitochondria)"),
("Onset / Course",
"Subacute; fluctuating; remissions possible",
"Subacute; progressive; less fluctuation",
"Acute (hours to days) after contaminated food or wound",
"Birth or early childhood (severe); adulthood (slow-channel)",
"Acute ascending over days to weeks; monophasic",
"Acute; monophasic",
"Insidious; relentlessly progressive; no remissions",
"Chronic; slowly progressive",
"Chronic; slowly progressive; onset usually >50 yrs",
"Chronic; slowly progressive; symmetric bilateral"),
("Fatigability",
"YES - Cardinal feature; worsens with activity, improves with rest",
"NO - Paradoxically improves briefly with short exercise",
"NO - Absent; weakness is constant",
"NO - Weakness is constant",
"NO - Weakness is constant",
"NO - Weakness is constant",
"NO - Weakness is constant",
"NO - Absent",
"NO - Absent",
"NO - Absent"),
("Ptosis",
"YES - Prominent; asymmetric; fatigable",
"NO - Uncommon; eye usually spared",
"YES - Present; fixed; non-fatigable; descending",
"YES - May be present",
"NO - Absent in classic GBS",
"YES - May be present",
"NO - Eye movements classically spared",
"YES - With proptosis and lid lag",
"YES - Slowly progressive bilateral",
"YES - Slowly progressive bilateral"),
("Diplopia / Ophthalmoplegia",
"YES - Common presenting symptom; fatigable",
"NO - Eye movements usually spared",
"YES - Fixed; non-fatigable; descending",
"YES - May occur",
"NO - Absent in classic GBS",
"YES - HALLMARK of MFS; ophthalmoplegia is defining",
"NO - Eye movements classically spared until very late",
"YES - Restricted (mechanical); inferior/medial rectus",
"YES - Slowly progressive",
"YES - Progressive external ophthalmoplegia is HALLMARK"),
("Pupils",
"Normal - always spared in MG",
"Sluggish (autonomic involvement)",
"Dilated and poorly reactive - KEY differentiator from MG",
"Normal",
"Normal",
"May be abnormal",
"Normal",
"Normal",
"Normal",
"Normal"),
("Deep Tendon Reflexes",
"Normal",
"Reduced at rest; improve after exercise (post-tetanic)",
"Diminished or absent",
"Variable",
"Absent / areflexia - HALLMARK of GBS",
"Absent / areflexia - HALLMARK of MFS",
"Brisk (UMN) despite wasting or reduced (LMN) - paradox",
"Normal",
"Normal",
"Normal"),
("Muscle Wasting / Atrophy",
"Absent - no structural muscle loss",
"Absent",
"Absent",
"Can occur in progressive forms",
"Absent",
"Absent",
"Prominent - denervation atrophy",
"Absent",
"Temporalis and pharyngeal wasting",
"Absent"),
("Fasciculations",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Present - LMN HALLMARK",
"Absent",
"Absent",
"Absent"),
("Sensory Symptoms",
"Absent - purely motor",
"Paresthesias; metallic taste (autonomic overlap)",
"Absent",
"Absent",
"Paresthesias and back pain - common",
"Mild paresthesias possible",
"Absent (trivial distal loss very late)",
"Absent",
"Absent",
"Absent"),
("Autonomic Dysfunction",
"Absent",
"Prominent - dry mouth, impotence, constipation, orthostasis",
"Prominent - dry mouth, dilated pupils, constipation, orthostasis",
"Absent",
"Present in ~65% - BP swings, tachycardia, urinary retention",
"Less prominent than classic GBS",
"Absent",
"Absent",
"Absent",
"Cardiac conduction defects in Kearns-Sayre"),
("Preceding Trigger",
"None specific",
"None (paraneoplastic: small cell lung cancer)",
"Contaminated food or wound (10 hrs to 5 days prior)",
"Genetic / congenital - no trigger",
"URI or gastroenteritis 2-4 weeks prior",
"Same as GBS - post-infectious",
"None",
"None",
"Genetic",
"Genetic / maternal inheritance"),
("Malignancy Association",
"Thymoma (10-15%)",
"Small cell lung cancer (40-62%); may precede cancer by years",
"None",
"None",
"None",
"None",
"None",
"None",
"None",
"None"),
("Proptosis",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Present - KEY distinguishing feature",
"Absent",
"Absent"),
("Ataxia",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Present - HALLMARK of MFS triad (ophthalmoplegia + ataxia + areflexia)",
"Absent",
"Absent",
"Absent",
"Gait ataxia in Kearns-Sayre syndrome"),
("Babinski Sign / UMN Signs",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Absent",
"Present (UMN) - pathognomonic paradox with muscle wasting",
"Absent",
"Absent",
"Absent"),
("Tongue Findings",
"Normal in appearance",
"Normal",
"Normal",
"Normal",
"Normal",
"Normal",
"Atrophic and fasciculating - HALLMARK of ALS",
"Normal",
"Pharyngeal involvement causing dysphagia",
"Normal"),
("CSF",
"Normal",
"Normal",
"Normal",
"Normal",
"High protein; normal cells - cytoalbuminologic dissociation",
"Normal or mildly raised protein",
"Normal (or mildly elevated protein late)",
"Normal",
"Normal",
"Raised lactate in Kearns-Sayre"),
("Nerve Conduction Studies",
"Normal NCV and amplitudes",
"Normal NCV; reduced CMAP amplitude at baseline",
"Similar to LEMS pattern",
"Variable",
"Slowed NCV; prolonged F-waves; conduction block (AIDP)",
"Normal NCV - unlike classic AIDP",
"Normal or mildly slowed NCV; reduced amplitude (LMN type)",
"Normal",
"Normal",
"Normal"),
("Repetitive Nerve Stimulation",
"Decremental response >10% at 2-3 Hz - HALLMARK of MG",
"Incremental response >100% at high frequency/post-exercise - HALLMARK",
"Incremental at high frequency (similar to LEMS)",
"Decremental (variable by subtype)",
"Normal NMJ; fibrillations in axonal variant",
"Normal NMJ transmission",
"Fibrillations + fasciculations + enlarged motor units; normal NMJ",
"Normal",
"Myopathic pattern",
"Myopathic pattern"),
("Specific Antibodies / Genetics",
"Anti-AChR (85%); Anti-MuSK (~40% of seronegative); Anti-LRP4",
"Anti-VGCC P/Q-type (>95%); SOX1 antibody (paraneoplastic)",
"Botulinum toxin in serum, stool, or food",
"Genetic mutation identified; seronegative for AChR/MuSK",
"Anti-ganglioside GM1, GD1a (axonal); anti-GQ1b rare",
"Anti-GQ1b (>85%) - HIGHLY SPECIFIC",
"No disease-specific antibody",
"Anti-TSH receptor; thyroid function abnormalities",
"PABPN1 gene mutation (GCG repeat expansion)",
"Mitochondrial DNA deletion; POLG1 / Twinkle gene mutation"),
("Response to Anticholinesterase\n(Pyridostigmine / Neostigmine)",
"YES - Objective, measurable improvement",
"Partial / minimal",
"No response",
"Variable - depends on subtype",
"No response",
"No response",
"No response",
"No response",
"No response",
"No response"),
("Ice Test / Rest Test",
"Positive - ptosis measurably improves",
"Not applicable",
"Not applicable",
"Variable",
"Not applicable",
"Not applicable",
"Not applicable",
"Not applicable",
"Not applicable",
"Not applicable"),
("Forced Duction Test",
"Negative - no mechanical restriction",
"Negative",
"Negative",
"Negative",
"Negative",
"Negative",
"Negative",
"Positive - HALLMARK of mechanical restriction",
"Negative",
"Negative"),
("Muscle Biopsy",
"Normal (mild fiber atrophy possible)",
"Normal",
"Normal",
"Abnormal NMJ on electron microscopy",
"Normal",
"Normal",
"Grouped angular atrophy (denervation pattern)",
"Normal",
"Rimmed vacuoles - characteristic",
"Ragged-red fibers on Gomori trichrome - HALLMARK"),
("Imaging",
"CT chest - screen for thymoma",
"CT/PET chest - screen for SCLC",
"Normal",
"Normal",
"MRI spine: nerve root enhancement and thickening",
"Normal brain/spine imaging",
"Normal; MRI may show corticospinal tract T2 changes late",
"CT/MRI orbit: enlarged extraocular muscles; proptosis",
"Normal",
"MRI brain: white matter lesions in Kearns-Sayre"),
("Treatment",
"Pyridostigmine; immunosuppression (steroids, azathioprine); thymectomy; IVIg/PLEX",
"3,4-DAP (amifampridine) first-line; treat SCLC; immunosuppression; IVIg/PLEX",
"Heptavalent botulinum antitoxin; ventilatory support; do NOT delay for tests",
"Genetic-guided: pyridostigmine; 3,4-DAP; salbutamol; fluoxetine (slow-channel)",
"IVIg or plasmapheresis; respiratory monitoring and support",
"IVIg or plasmapheresis; supportive care",
"Riluzole / edaravone; multidisciplinary respiratory support; palliative care",
"Teprotumumab; steroids; orbital decompression; prism glasses",
"Supportive; ptosis surgery; cricopharyngeal myotomy for dysphagia",
"CoQ10; pacemaker for cardiac block in Kearns-Sayre; supportive"),
]
# Row 1 - Title
ws.merge_cells(start_row=1, start_column=1, end_row=1, end_column=len(columns))
tc = ws.cell(row=1, column=1)
tc.value = "Differential Diagnosis of Myasthenia Gravis — Comprehensive Comparison Chart"
tc.font = Font(bold=True, color=WHITE, size=14, name="Calibri")
tc.fill = fill(TITLE_BG)
tc.alignment = align(h="center", v="center")
ws.row_dimensions[1].height = 32
# Row 2 - Column headers
for ci, cn in enumerate(columns, start=1):
cell = ws.cell(row=2, column=ci, value=cn)
if ci == 1:
cell.fill = fill(ROW_HEADER)
cell.font = mkfont(bold=True, color=DARK_FONT, size=10)
elif ci == 2:
cell.fill = fill(MG_HEADER)
cell.font = mkfont(bold=True, color=WHITE, size=10)
else:
cell.fill = fill(DIFF_HEADER)
cell.font = mkfont(bold=True, color=WHITE, size=10)
cell.alignment = align(h="center", v="center")
cell.border = border_thin
ws.row_dimensions[2].height = 48
# Data rows
for ri, row_data in enumerate(rows, start=3):
bg = ALT_ROW1 if (ri % 2 == 0) else ALT_ROW2
for ci, value in enumerate(row_data, start=1):
cell = ws.cell(row=ri, column=ci, value=value)
if ci == 1:
cell.fill = fill(ROW_HEADER)
cell.font = mkfont(bold=True, color=DARK_FONT, size=9)
cell.alignment = align(h="left", v="center")
else:
cell.fill = fill(bg)
v = str(value)
if v.startswith("YES"):
cell.font = Font(color="1F6B2E", size=9, name="Calibri")
elif v.startswith("NO"):
cell.font = Font(color="C00000", size=9, name="Calibri")
elif "HALLMARK" in v or "KEY" in v or "HIGHLY SPECIFIC" in v:
cell.font = Font(color="7030A0", size=9, name="Calibri", bold=True)
elif v in ("Absent", "Normal", "Normal NCV and amplitudes", "Normal NMJ transmission", "Normal brain/spine imaging"):
cell.font = Font(color="595959", size=9, name="Calibri")
else:
cell.font = mkfont(size=9, color=BLACK)
cell.alignment = align(h="left", v="center")
cell.border = border_thin
ws.row_dimensions[ri].height = 48
# Column widths
widths = [28, 30, 27, 27, 26, 26, 24, 28, 26, 27, 28]
for ci, w in enumerate(widths, start=1):
ws.column_dimensions[get_column_letter(ci)].width = w
ws.freeze_panes = "B3"
# Legend
lr = len(rows) + 4
ws.merge_cells(start_row=lr, start_column=1, end_row=lr, end_column=len(columns))
leg = ws.cell(row=lr, column=1,
value=("Legend: GREEN = Present/Positive RED = Absent/Negative PURPLE = Hallmark/Key feature "
"NMJ = Neuromuscular Junction AChR = Acetylcholine Receptor VGCC = Voltage-Gated Calcium Channel "
"CMAP = Compound Muscle Action Potential SCLC = Small Cell Lung Cancer "
"CPEO = Chronic Progressive External Ophthalmoplegia CMS = Congenital Myasthenic Syndromes "
"MFS = Miller Fisher Syndrome PLEX = Plasma Exchange IVIg = Intravenous Immunoglobulin "
"3,4-DAP = 3,4-Diaminopyridine (Amifampridine)"))
leg.font = Font(italic=True, size=9, color="595959", name="Calibri")
leg.fill = fill("F2F2F2")
leg.alignment = Alignment(horizontal="left", vertical="center", wrap_text=True)
ws.row_dimensions[lr].height = 35
out = "/home/daytona/workspace/mg-differentials/MG_Differentials_Chart.xlsx"
wb.save(out)
print("Saved: " + out)
mkdir -p /home/daytona/workspace/mg-differentials && ls /home/daytona/workspace/…
ls /home/daytona/workspace/ && ls /home/daytona/workspace/mg-differentials/ 2>/d…
ls /home/daytona/ && mkdir -p /home/daytona/workspace && mkdir -p /home/daytona/…
ls -la /home/daytona/workspace && mkdir -p /home/daytona/workspace/mg-differenti…
python3 -c "import os; print(os.path.exists('/home/daytona/workspace')); print(o…
python3 -c "import os; p='/home/daytona/workspace'; print(type(os.stat(p)), os.s…
python3 -c "import os; print(os.readlink('/home/daytona/workspace'))"
python3 -c " import os, openpyxl from openpyxl.styles import PatternFill, Font, …
python3 -c " import os, shutil # find the actual workspace path home = '/home/da…
python3 -c " import openpyxl wb = openpyxl.load_workbook('/tmp/mg/MG_Differentia…
| # | Differential |
|---|---|
| 1 | Myasthenia Gravis (reference column) |
| 2 | Lambert-Eaton Myasthenic Syndrome (LEMS) |
| 3 | Botulism |
| 4 | Congenital Myasthenic Syndromes |
| 5 | GBS – AIDP |
| 6 | Miller Fisher Syndrome |
| 7 | ALS / Motor Neuron Disease |
| 8 | Thyroid Ophthalmopathy |
| 9 | Oculopharyngeal Muscular Dystrophy |
| 10 | Mitochondrial Myopathy (CPEO) |
Remove 9 and 10
python3 -c " import openpyxl from openpyxl.styles import PatternFill, Font, Alig…
python3 -c " import openpyxl from openpyxl.styles import PatternFill, Font, Alig…
Generate a quick reference PDF summary of MG vs differentials
python3 -c " from reportlab.lib import colors from reportlab.lib.pagesizes impor…
python3 -c " from pypdf import PdfReader r = PdfReader('/tmp/mg/MG_Quick_Referen…
python3 -c " from pypdf import PdfReader r = PdfReader('/tmp/mg/MG_Quick_Referen…