Neoplasia essay
| Tissue of Origin | Benign | Malignant |
|---|---|---|
| Fibrous tissue | Fibroma | Fibrosarcoma |
| Adipose | Lipoma | Liposarcoma |
| Cartilage | Chondroma | Chondrosarcoma |
| Bone | Osteoma | Osteosarcoma |
| Blood vessels | Hemangioma | Angiosarcoma |
| Epithelium (glandular) | Adenoma | Adenocarcinoma |
| Epithelium (squamous) | Squamous papilloma | Squamous cell carcinoma |
| Category | Example | Associated Cancer |
|---|---|---|
| Chemical carcinogens | Tobacco smoke (polycyclic hydrocarbons, nitrosamines) | Lung, oral, bladder |
| Radiation | UV light | Melanoma, squamous cell carcinoma |
| Ionizing radiation | X-rays, nuclear fallout | Leukemia, thyroid, breast |
| Viral (oncogenic) | HPV (strains 16, 18) | Cervical, oropharyngeal |
| EBV | Burkitt lymphoma, Hodgkin lymphoma, NPC | |
| HBV / HCV | Hepatocellular carcinoma | |
| HTLV-1 | Adult T-cell leukemia/lymphoma | |
| Bacterial | H. pylori | Gastric adenocarcinoma, MALT lymphoma |
| Chronic inflammation | IBD | Colorectal carcinoma |
| Asbestosis | Mesothelioma | |
| Hepatitis | Hepatocellular carcinoma |
| Oncogene | Product | Cancer |
|---|---|---|
| RAS | Signal transducer (GTPase) | Colon, lung, pancreas |
| ERBB2 (HER2) | Growth factor receptor (TK) | Breast, gastric |
| BCR-ABL | Fusion TK | CML |
| C-MYC | Transcription factor | Burkitt lymphoma |
| NMYC | Transcription factor | Neuroblastoma |
| CDK4 | Cell cycle kinase | Melanoma, glioblastoma |
| TSG | Product/Function | Associated Cancer |
|---|---|---|
| RB | Governor of G1/S checkpoint; hypophosphorylated RB inhibits E2F | Retinoblastoma, osteosarcoma |
| TP53 | "Guardian of the genome"; triggers cell cycle arrest, DNA repair, or apoptosis after DNA damage | Most human cancers (~50%) |
| APC | Degrades β-catenin; inhibits WNT signaling | Familial adenomatous polyposis, colorectal cancer |
| BRCA1/2 | DNA repair (homologous recombination) | Familial breast and ovarian cancer |
| NF1 | Ras-GAP; inactivates RAS | Neurofibromatosis type 1 |
| PTEN | Phosphatase; suppresses PI3K/AKT pathway | Prostate, endometrial, glioblastoma |
| CDKN2A (p16) | CDK inhibitor; maintains RB in hypophosphorylated state | Melanoma, glioma, many carcinomas |
| VHL | Ubiquitin ligase; degrades HIF-1α | Renal cell carcinoma |
| Syndrome | Mechanism | Associated Tumor |
|---|---|---|
| Hypercalcemia | PTHrP secretion | Squamous cell carcinoma of lung, renal cell carcinoma |
| SIADH (hyponatremia) | Ectopic ADH | Small cell lung carcinoma |
| Cushing syndrome | Ectopic ACTH | Small cell lung carcinoma |
| Polycythemia | Ectopic EPO | Renal cell carcinoma, hepatocellular carcinoma |
| Trousseau sign (migratory thrombophlebitis) | Hypercoagulable state | Pancreatic carcinoma |
| Acanthosis nigricans | Possibly TGF-α | Gastric, lung carcinoma |
| Hypertrophic osteoarthropathy | Unknown | Lung carcinoma |
| Lambert-Eaton myasthenic syndrome | Anti-VGCC antibodies | Small cell lung carcinoma |
| Carcinoid syndrome | 5-HT, histamine | Carcinoid tumors (ileum, appendix) |
| Marker | Associated Tumor |
|---|---|
| PSA (prostate-specific antigen) | Prostate carcinoma |
| AFP (alpha-fetoprotein) | Hepatocellular carcinoma, germ cell tumors (yolk sac) |
| β-hCG | Choriocarcinoma, germ cell tumors |
| CEA (carcinoembryonic antigen) | Colorectal, gastric, pancreatic, lung carcinomas |
| CA-125 | Ovarian carcinoma |
| CA 19-9 | Pancreatic carcinoma |
| Calcitonin | Medullary thyroid carcinoma |
| S100 | Melanoma, neural tumors |
Generate in word document
ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && ls -la /tmp/workspace/
mkdir -p /tmp/workspace/neoplasia-essay
~/neoplasia-essay/build_neoplasia.py
from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy
doc = Document()
# ── Page margins ──────────────────────────────────────────────────────────────
for section in doc.sections:
section.top_margin = Inches(1.0)
section.bottom_margin = Inches(1.0)
section.left_margin = Inches(1.2)
section.right_margin = Inches(1.2)
# ── Default body font ─────────────────────────────────────────────────────────
normal = doc.styles["Normal"]
normal.font.name = "Arial"
normal.font.size = Pt(11)
# ── Heading styles ────────────────────────────────────────────────────────────
def style_heading(doc, level, size, color_hex, bold=True):
h = doc.styles[f"Heading {level}"]
h.font.name = "Arial"
h.font.size = Pt(size)
h.font.bold = bold
r, g, b = int(color_hex[0:2],16), int(color_hex[2:4],16), int(color_hex[4:6],16)
h.font.color.rgb = RGBColor(r, g, b)
style_heading(doc, 1, 18, "1B3A6B") # deep navy – main title
style_heading(doc, 2, 14, "1B3A6B") # section headers
style_heading(doc, 3, 12, "2E6CA4") # sub-section headers
style_heading(doc, 4, 11, "2E6CA4") # minor headers
# ── Helper: add styled paragraph ─────────────────────────────────────────────
def body(doc, text, bold=False, italic=False, size=11):
p = doc.add_paragraph()
run = p.add_run(text)
run.bold = bold
run.italic = italic
run.font.size = Pt(size)
return p
def bullet(doc, text, level=0):
p = doc.add_paragraph(style="List Bullet")
p.paragraph_format.left_indent = Inches(0.25 * (level + 1))
run = p.add_run(text)
run.font.size = Pt(11)
return p
def sub_bullet(doc, text):
return bullet(doc, text, level=1)
def add_table(doc, headers, rows, col_widths=None):
t = doc.add_table(rows=1 + len(rows), cols=len(headers))
t.style = "Table Grid"
# Header row
hdr = t.rows[0]
for i, h in enumerate(headers):
c = hdr.cells[i]
c.text = h
run = c.paragraphs[0].runs[0]
run.bold = True
run.font.size = Pt(10)
run.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)
shading = OxmlElement("w:shd")
shading.set(qn("w:fill"), "1B3A6B")
shading.set(qn("w:val"), "clear")
c._tc.get_or_add_tcPr().append(shading)
# Data rows
for ri, row_data in enumerate(rows):
row = t.rows[ri + 1]
for ci, cell_text in enumerate(row_data):
c = row.cells[ci]
c.text = str(cell_text)
for run in c.paragraphs[0].runs:
run.font.size = Pt(10)
# Alternating row shading
if ri % 2 == 0:
for ci in range(len(headers)):
shading = OxmlElement("w:shd")
shading.set(qn("w:fill"), "EDF2FA")
shading.set(qn("w:val"), "clear")
t.rows[ri+1].cells[ci]._tc.get_or_add_tcPr().append(shading)
# Column widths
if col_widths:
for ci, w in enumerate(col_widths):
for row in t.rows:
row.cells[ci].width = Inches(w)
doc.add_paragraph() # spacing after table
# ─────────────────────────────────────────────────────────────────────────────
# COVER / TITLE
# ─────────────────────────────────────────────────────────────────────────────
title_para = doc.add_heading("NEOPLASIA", level=1)
title_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
sub = doc.add_paragraph()
sub.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = sub.add_run("Comprehensive Exam-Style Essay — MBBS Level")
run.font.size = Pt(13)
run.font.italic = True
run.font.color.rgb = RGBColor(0x2E, 0x6C, 0xA4)
sub2 = doc.add_paragraph()
sub2.alignment = WD_ALIGN_PARAGRAPH.CENTER
r2 = sub2.add_run("Based on Robbins & Kumar Basic Pathology, 10th Edition")
r2.font.size = Pt(10)
r2.font.italic = True
r2.font.color.rgb = RGBColor(0x55, 0x55, 0x55)
doc.add_paragraph()
# ─────────────────────────────────────────────────────────────────────────────
# 1. DEFINITION
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("1. Definition", level=2)
body(doc,
"Neoplasia literally means \"new growth.\" A neoplasm is an abnormal mass of tissue, the "
"growth of which exceeds and is uncoordinated with that of normal tissues, and persists "
"even after the initiating stimuli are removed. This persistence distinguishes neoplasms "
"from normal tissue responses such as wound healing or physiological hyperplasia.")
# ─────────────────────────────────────────────────────────────────────────────
# 2. NOMENCLATURE AND CLASSIFICATION
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("2. Nomenclature and Classification", level=2)
body(doc,
"Tumors are classified as benign or malignant based on their biological behavior.")
doc.add_heading("Benign Tumors", level=3)
body(doc, "Named by attaching the suffix -oma to the cell of origin:")
for item in [
"Fibroma (fibrous tissue), Lipoma (adipose), Chondroma (cartilage), Osteoma (bone)",
"Hemangioma (blood vessels), Leiomyoma (smooth muscle)",
"Adenoma = benign epithelial tumor forming glands",
"Papilloma = benign epithelial tumor forming finger-like projections",
]:
bullet(doc, item)
doc.add_heading("Malignant Tumors", level=3)
for item in [
"Carcinoma - malignant tumor of epithelial origin (e.g., adenocarcinoma, squamous cell carcinoma)",
"Sarcoma - malignant tumor of mesenchymal origin (e.g., fibrosarcoma, liposarcoma, osteosarcoma, angiosarcoma)",
"Mixed tumors - contain more than one neoplastic cell type (e.g., pleomorphic adenoma of salivary gland)",
"Teratoma - contains elements from all three germ layers (e.g., mature cystic teratoma/dermoid cyst of ovary)",
"Blastomas - tumors of embryonic origin (e.g., retinoblastoma, nephroblastoma/Wilms tumor)",
]:
bullet(doc, item)
doc.add_heading("Nomenclature of Selected Tumors", level=3)
add_table(doc,
headers=["Tissue of Origin", "Benign", "Malignant"],
rows=[
["Fibrous tissue", "Fibroma", "Fibrosarcoma"],
["Adipose", "Lipoma", "Liposarcoma"],
["Cartilage", "Chondroma", "Chondrosarcoma"],
["Bone", "Osteoma", "Osteosarcoma"],
["Blood vessels", "Hemangioma", "Angiosarcoma"],
["Epithelium (glandular)","Adenoma", "Adenocarcinoma"],
["Epithelium (squamous)","Squamous papilloma","Squamous cell carcinoma"],
],
col_widths=[2.3, 1.8, 1.8]
)
# ─────────────────────────────────────────────────────────────────────────────
# 3. CHARACTERISTICS
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("3. Characteristics of Benign vs. Malignant Neoplasms", level=2)
body(doc, "The distinction rests on four major criteria:")
doc.add_heading("3.1 Differentiation and Anaplasia", level=3)
bullet(doc, "Benign tumors are well-differentiated - cells closely resemble the cell of origin.")
bullet(doc, "Malignant tumors range from well-differentiated to completely undifferentiated (anaplastic).")
bullet(doc, "Anaplasia ('backward formation') is a reliable indicator of malignancy.")
body(doc, "Morphological hallmarks of anaplasia:", bold=True)
for item in [
"Pleomorphism - variation in size and shape of cells and nuclei",
"Abnormal nuclear morphology - hyperchromatic nuclei, high N:C ratio (up to 1:1 vs. normal 1:4-6)",
"Atypical mitoses - tripolar, quadripolar, or other bizarre mitotic figures",
"Loss of polarity - disturbance of orientation of cells",
"Tumor giant cells - large cells containing large or multiple nuclei",
"Necrosis - due to rapidly outstripping blood supply",
]:
bullet(doc, item)
doc.add_heading("3.2 Rate of Growth", level=3)
body(doc, "Benign tumors generally grow slowly; malignant tumors grow faster. Growth rate correlates with "
"the level of differentiation. Mitotic index is a measure of proliferative activity.")
doc.add_heading("3.3 Local Invasion", level=3)
bullet(doc, "Benign tumors grow as cohesive, expansile masses that do NOT invade or infiltrate surrounding tissue. They are often encapsulated.")
bullet(doc, "Malignant tumors infiltrate, invade, and destroy surrounding tissue. They lack a true capsule (may have a pseudocapsule).")
bullet(doc, "Exception: locally invasive benign tumors include basal cell carcinomas and aggressive fibromatosis.")
doc.add_heading("3.4 Metastasis", level=3)
body(doc, "Metastasis is the single most important feature distinguishing benign from malignant neoplasms.", bold=True)
bullet(doc, "Benign tumors do NOT metastasize.")
bullet(doc, "Malignant tumors have the capacity to spread to distant sites.")
# ─────────────────────────────────────────────────────────────────────────────
# 4. METASTASIS
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("4. Metastasis", level=2)
body(doc, "Metastasis is the development of secondary tumor deposits discontinuous from the primary tumor. "
"It occurs by three main pathways:")
doc.add_heading("4.1 Pathways of Metastasis", level=3)
for item in [
"Lymphatic spread - most common for carcinomas. Sentinel lymph node biopsy exploits this.",
"Haematogenous spread - more typical of sarcomas. Venous drainage determines target organ:\n"
" - Portal vein -> liver (GI tumors)\n"
" - Caval veins -> lung (most tumors)\n"
" - Vertebral (Batson's) plexus -> vertebrae (prostate, breast, thyroid, lung, kidney)",
"Seeding of body cavities - e.g., peritoneal seeding by ovarian carcinoma ('pseudomyxoma peritonei')",
]:
bullet(doc, item)
doc.add_heading("4.2 Invasion-Metastasis Cascade", level=3)
for i, step in enumerate([
"Local invasion of basement membrane and ECM",
"Intravasation into blood or lymphatic vessels",
"Survival in circulation (evade immune attack, form tumor emboli)",
"Extravasation at distant site",
"Formation of micrometastases",
"Growth into macrometastases (requires angiogenesis)",
], 1):
bullet(doc, f"{i}. {step}")
body(doc, "Key molecular mechanisms of ECM invasion:", bold=True)
for item in [
"Detachment from neighboring cells - downregulation of E-cadherin",
"Degradation of ECM by matrix metalloproteinases (MMPs) and plasminogen activators",
"Epithelial-mesenchymal transition (EMT) - reduced E-cadherin, increased vimentin, N-cadherin",
]:
bullet(doc, item)
doc.add_heading("4.3 Organ Tropism ('Seed and Soil' Hypothesis - Paget, 1889)", level=3)
for item in [
"Breast cancer -> bone, lung, liver, brain",
"Prostate cancer -> bone (osteoblastic metastases)",
"Lung cancer -> adrenal glands, brain",
]:
bullet(doc, item)
# ─────────────────────────────────────────────────────────────────────────────
# 5. EPIDEMIOLOGY AND RISK FACTORS
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("5. Epidemiology and Risk Factors", level=2)
doc.add_heading("5.1 Environmental and Acquired Risk Factors", level=3)
add_table(doc,
headers=["Category", "Example", "Associated Cancer"],
rows=[
["Chemical carcinogens", "Tobacco smoke (PAHs, nitrosamines)", "Lung, oral, bladder"],
["UV radiation", "Sunlight", "Melanoma, squamous cell carcinoma"],
["Ionizing radiation", "X-rays, nuclear fallout", "Leukemia, thyroid, breast"],
["Viral - HPV (16,18)", "Cervical, anal, oropharyngeal carcinoma", ""],
["Viral - EBV", "Burkitt lymphoma, Hodgkin lymphoma, NPC", ""],
["Viral - HBV/HCV", "Hepatocellular carcinoma", ""],
["Viral - HTLV-1", "Adult T-cell leukemia/lymphoma (ATLL)", ""],
["Bacterial - H. pylori", "Chronic gastritis", "Gastric adenocarcinoma, MALT lymphoma"],
["Chronic inflammation - IBD", "", "Colorectal carcinoma"],
["Asbestosis", "", "Mesothelioma, lung cancer"],
],
col_widths=[2.0, 2.2, 1.7]
)
doc.add_heading("5.2 Age", level=3)
bullet(doc, "Cancer incidence rises sharply with age (peak 55-75 years).")
bullet(doc, "Reason: accumulation of somatic mutations; declining immune surveillance.")
bullet(doc, "Childhood cancers: leukemias, nephroblastoma, retinoblastoma, neuroblastoma.")
doc.add_heading("5.3 Precancerous Lesions", level=3)
for item in [
"Squamous metaplasia/dysplasia of bronchial mucosa (smokers) -> lung carcinoma",
"Endometrial hyperplasia -> endometrial carcinoma",
"Leukoplakia of oral cavity, vulva -> squamous cell carcinoma",
"Villous adenoma of colon -> colorectal carcinoma (up to 50% transform)",
"Barrett esophagus -> esophageal adenocarcinoma",
]:
bullet(doc, item)
# ─────────────────────────────────────────────────────────────────────────────
# 6. MOLECULAR BASIS OF CANCER
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("6. Molecular Basis of Cancer (Carcinogenesis)", level=2)
doc.add_heading("6.1 Fundamental Principles", level=3)
for item in [
"Non-lethal genetic damage lies at the heart of carcinogenesis.",
"A tumor is derived from a single progenitor cell (monoclonal origin).",
"Genetic lesions are acquired through environmental insults OR inherited in the germline.",
"Carcinogenesis is a multistep process - multiple mutations accumulate over time "
"(e.g., colon cancer: APC -> KRAS -> SMAD4 -> TP53, Vogelstein model).",
]:
bullet(doc, item)
doc.add_heading("6.2 Types of Cancer Genes", level=3)
doc.add_heading("A. Proto-oncogenes and Oncogenes", level=4)
body(doc, "Oncogenes are mutant, gain-of-function versions of proto-oncogenes. Only ONE allele "
"needs to be mutated (dominant).")
body(doc, "Mechanisms of proto-oncogene activation:", bold=True)
for item in [
"Point mutations - RAS mutations in ~30% of all cancers; constitutively active RAS-GTP",
"Gene amplification - ERBB2 (HER2) in ~20% of breast cancers; NMYC in neuroblastoma",
"Chromosomal rearrangement - BCR-ABL fusion (Philadelphia chromosome, t(9;22)) in CML; "
"C-MYC overexpression in Burkitt lymphoma t(8;14)",
]:
bullet(doc, item)
add_table(doc,
headers=["Oncogene", "Product", "Associated Cancer"],
rows=[
["RAS", "Signal transducer (GTPase)", "Colon, lung, pancreas"],
["ERBB2/HER2","Growth factor receptor (TK)", "Breast, gastric"],
["BCR-ABL", "Fusion tyrosine kinase", "CML"],
["C-MYC", "Transcription factor", "Burkitt lymphoma"],
["NMYC", "Transcription factor", "Neuroblastoma"],
["CDK4", "Cell cycle kinase", "Melanoma, glioblastoma"],
],
col_widths=[1.5, 2.2, 2.2]
)
doc.add_heading("B. Tumor Suppressor Genes (TSGs)", level=4)
body(doc, "Encode proteins that restrain cell proliferation. Loss of function is typically "
"recessive - both alleles must be lost ('two-hit hypothesis,' Knudson 1971).")
body(doc, "Two-hit hypothesis - Retinoblastoma example:", bold=True)
bullet(doc, "Familial: first hit inherited in germline; second somatic mutation -> early onset, bilateral tumor.")
bullet(doc, "Sporadic: both hits must occur somatically in the same cell -> later onset, unilateral.")
add_table(doc,
headers=["TSG", "Function", "Associated Cancer"],
rows=[
["RB", "Governor of G1/S checkpoint; hypophos-RB inhibits E2F", "Retinoblastoma, osteosarcoma"],
["TP53", "'Guardian of the genome'; triggers arrest, repair, or apoptosis", "~50% of all human cancers"],
["APC", "Degrades beta-catenin; inhibits WNT signaling", "FAP, colorectal cancer"],
["BRCA1/2", "DNA repair (homologous recombination)", "Familial breast & ovarian cancer"],
["NF1", "Ras-GAP; inactivates RAS", "Neurofibromatosis type 1"],
["PTEN", "Phosphatase; suppresses PI3K/AKT pathway", "Prostate, endometrial, GBM"],
["CDKN2A (p16)","CDK inhibitor; maintains RB hypophosphorylated", "Melanoma, glioma, carcinomas"],
["VHL", "Ubiquitin ligase; degrades HIF-1alpha", "Renal cell carcinoma"],
],
col_widths=[1.5, 2.4, 2.0]
)
doc.add_heading("C. DNA Repair Genes", level=4)
body(doc, "Mutations in DNA repair genes cause genomic instability, accelerating accumulation "
"of mutations in proto-oncogenes and TSGs.")
for item in [
"BRCA1/2 - homologous recombination repair",
"MLH1/MSH2 - mismatch repair (MMR); germline mutations -> Lynch syndrome/HNPCC (microsatellite instability)",
"Nucleotide excision repair - defect in xeroderma pigmentosum -> high risk of UV-induced skin cancers",
]:
bullet(doc, item)
doc.add_heading("D. Genes Regulating Apoptosis", level=4)
bullet(doc, "BCL2 overexpression: t(14;18) in follicular lymphoma -> inhibits apoptosis -> cell survival")
bullet(doc, "Loss of BAX, BID (pro-apoptotic proteins) promotes cancer cell survival")
# ─────────────────────────────────────────────────────────────────────────────
# 7. HALLMARKS OF CANCER
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("7. Hallmarks of Cancer (Hanahan & Weinberg)", level=2)
body(doc, "These are the acquired capabilities that allow cancer cells to grow, survive, and spread:")
hallmarks = [
("Self-sufficiency in growth signals",
"Autocrine growth factor loops (e.g., glioblastoma secretes PDGF + expresses PDGF receptor); constitutively active RAS"),
("Insensitivity to growth-inhibitory signals",
"Loss of TSGs: RB, TP53, APC, SMAD4 (TGF-beta pathway)"),
("Evasion of apoptosis",
"BCL2 overexpression; TP53 mutation; survival signals from BCR-ABL"),
("Limitless replicative potential (immortality)",
"Reactivation of telomerase in >90% of cancers; prevents telomere shortening and replicative senescence"),
("Sustained angiogenesis",
"VEGF upregulation (driven by hypoxia via HIF-1alpha); tumors cannot grow beyond 1-2 mm without new blood supply"),
("Tissue invasion and metastasis",
"EMT, MMP secretion, loss of E-cadherin"),
("Reprogrammed cellular metabolism (Warburg effect)",
"Preferential aerobic glycolysis even in normoxia; upregulation of GLUT1"),
("Evasion of immune surveillance",
"Downregulation of MHC class I; expression of immune checkpoints (PD-L1) blocking T cells"),
]
for title, desc in hallmarks:
p = doc.add_paragraph(style="List Bullet")
run_title = p.add_run(title + ": ")
run_title.bold = True
run_title.font.size = Pt(11)
run_desc = p.add_run(desc)
run_desc.font.size = Pt(11)
# ─────────────────────────────────────────────────────────────────────────────
# 8. CARCINOGENESIS - MULTISTEP
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("8. Carcinogenesis as a Multistep Process", level=2)
for item in [
"Initiation: irreversible DNA mutation by a carcinogen (e.g., tobacco PAH causing TP53/KRAS mutation). Initiated cells gain a growth advantage.",
"Promotion: clonal expansion by a promoting agent (e.g., estrogen, phorbol esters). Promoters are NOT mutagenic; they stimulate proliferation.",
"Progression: additional mutations conferring malignant properties (invasiveness, metastatic potential, drug resistance).",
]:
bullet(doc, item)
# ─────────────────────────────────────────────────────────────────────────────
# 9. CARCINOGENS
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("9. Carcinogens", level=2)
doc.add_heading("9.1 Chemical Carcinogens", level=3)
bullet(doc, "Direct-acting (no metabolic activation): alkylating agents (cyclophosphamide), acylating agents.")
bullet(doc, "Indirect-acting (procarcinogens) - require CYP450 activation:")
for item in [
"Polycyclic aromatic hydrocarbons (tobacco smoke) -> lung, oral cancer",
"Aflatoxin B1 (Aspergillus on stored grains) -> hepatocellular carcinoma; characteristic TP53 codon 249 mutation",
"Azo dyes (beta-naphthylamine) -> bladder cancer",
"Nitrosamines -> gastric cancer",
"Asbestos -> mesothelioma, lung cancer",
"Vinyl chloride -> hepatic angiosarcoma",
"Benzene -> AML",
]:
sub_bullet(doc, item)
doc.add_heading("9.2 Radiation Carcinogenesis", level=3)
bullet(doc, "Ionizing radiation: DNA double-strand breaks, chromosomal rearrangements. "
"7+ year latent period for leukemia (Hiroshima/Nagasaki data).")
bullet(doc, "UV radiation: pyrimidine dimer formation repaired by nucleotide excision repair. "
"Failure -> skin cancers. Xeroderma pigmentosum (AR) = defective NER -> greatly increased skin cancer risk.")
doc.add_heading("9.3 Viral Oncogenesis", level=3)
body(doc, "DNA Oncogenic Viruses:", bold=True)
for item in [
"HPV (types 16, 18): E6 degrades p53; E7 inactivates RB -> cervical, anal, oropharyngeal carcinomas",
"EBV: LMP-1 acts as constitutively active CD40, activates NF-kB and BCL2 -> Burkitt lymphoma, Hodgkin lymphoma, NPC",
"HBV/HCV: chronic necroinflammation -> cirrhosis -> hepatocellular carcinoma",
"KSHV/HHV-8 -> Kaposi sarcoma",
]:
bullet(doc, item)
body(doc, "RNA Oncogenic Viruses:", bold=True)
bullet(doc, "HTLV-1: infects CD4+ T cells; Tax protein transactivates cytokine genes. "
"Endemic in Japan, Caribbean, South America. Causes ATLL after 40-60 year latent period (3-5% of infected individuals).")
doc.add_heading("9.4 Bacterial Carcinogenesis", level=3)
bullet(doc, "H. pylori -> chronic gastritis -> gastric adenocarcinoma and MALT lymphoma (extranodal marginal zone B-cell lymphoma)")
# ─────────────────────────────────────────────────────────────────────────────
# 10. LOCAL AND SYSTEMIC EFFECTS / PARANEOPLASTIC SYNDROMES
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("10. Local and Systemic Effects of Neoplasms", level=2)
doc.add_heading("10.1 Local Effects", level=3)
for item in ["Obstruction (e.g., carcinoma of colon causing bowel obstruction)",
"Pressure effects (e.g., intracranial tumors causing raised ICP)",
"Ulceration and bleeding",
"Destruction of adjacent structures"]:
bullet(doc, item)
doc.add_heading("10.2 Paraneoplastic Syndromes", level=3)
body(doc, "Symptoms not explained by the mass or metastasis; caused by ectopic hormone secretion "
"or immune-mediated mechanisms:")
add_table(doc,
headers=["Syndrome", "Mechanism", "Associated Tumor"],
rows=[
["Hypercalcemia", "PTHrP secretion", "Squamous cell carcinoma of lung, RCC"],
["SIADH (hyponatremia)", "Ectopic ADH", "Small cell lung carcinoma (SCLC)"],
["Cushing syndrome", "Ectopic ACTH", "SCLC"],
["Polycythemia", "Ectopic EPO", "RCC, hepatocellular carcinoma"],
["Trousseau sign (migratory thrombophlebitis)", "Hypercoagulable state", "Pancreatic carcinoma"],
["Acanthosis nigricans", "Possibly TGF-alpha", "Gastric, lung carcinoma"],
["Lambert-Eaton syndrome", "Anti-VGCC antibodies", "SCLC"],
["Carcinoid syndrome", "5-HT, histamine", "Carcinoid tumors (ileum, appendix)"],
],
col_widths=[2.0, 1.9, 2.0]
)
# ─────────────────────────────────────────────────────────────────────────────
# 11. GRADING AND STAGING
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("11. Grading and Staging", level=2)
doc.add_heading("11.1 Grading (Histological - Degree of Differentiation)", level=3)
add_table(doc,
headers=["Grade", "Description"],
rows=[
["Grade I", "Well-differentiated"],
["Grade II", "Moderately differentiated"],
["Grade III", "Poorly differentiated"],
["Grade IV", "Undifferentiated / anaplastic"],
],
col_widths=[1.5, 4.4]
)
doc.add_heading("11.2 Staging - TNM System", level=3)
add_table(doc,
headers=["Component", "Meaning"],
rows=[
["T (T0-T4)", "Size and extent of primary tumor"],
["N (N0-N3)", "Regional lymph node involvement"],
["M (M0/M1)", "Presence of distant metastases"],
],
col_widths=[1.5, 4.4]
)
body(doc, "Groupings: Stage I (localized, small) -> Stage IV (distant metastases).")
body(doc, "Staging provides a more reliable prognosis than grading and directly guides treatment decisions.")
# ─────────────────────────────────────────────────────────────────────────────
# 12. TUMOR MARKERS
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("12. Tumor Markers", level=2)
body(doc, "Useful for monitoring treatment response and detecting recurrence. Not diagnostic alone.")
add_table(doc,
headers=["Marker", "Associated Tumor"],
rows=[
["PSA (prostate-specific antigen)", "Prostate carcinoma"],
["AFP (alpha-fetoprotein)", "Hepatocellular carcinoma, germ cell tumors (yolk sac)"],
["beta-hCG", "Choriocarcinoma, germ cell tumors"],
["CEA (carcinoembryonic antigen)", "Colorectal, gastric, pancreatic, lung carcinomas"],
["CA-125", "Ovarian carcinoma"],
["CA 19-9", "Pancreatic carcinoma"],
["Calcitonin", "Medullary thyroid carcinoma"],
["S100", "Melanoma, neural tumors"],
],
col_widths=[2.5, 3.4]
)
# ─────────────────────────────────────────────────────────────────────────────
# 13. TREATMENT PRINCIPLES
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("13. Principles of Cancer Treatment", level=2)
treatments = [
("Surgery", "Curative for localized tumors; sentinel lymph node biopsy; palliative debulking."),
("Radiotherapy", "Ionizing radiation damages DNA; rapidly dividing cells are more sensitive (therapeutic window)."),
("Chemotherapy", "Targets DNA synthesis, division, and survival. Combination regimens reduce resistance. "
"Cell-cycle specific (vinca alkaloids, taxanes) vs. non-specific (alkylating agents)."),
("Targeted Therapy",
"Imatinib (Gleevec) - BCR-ABL inhibitor for CML; "
"Trastuzumab (Herceptin) - anti-HER2 for HER2+ breast cancer; "
"Erlotinib/Gefitinib - EGFR TK inhibitors for NSCLC; "
"Vemurafenib - BRAF V600E inhibitor for melanoma."),
("Immunotherapy",
"Checkpoint inhibitors: anti-PD-1 (pembrolizumab, nivolumab), anti-CTLA-4 (ipilimumab). "
"CAR-T cells: engineered T cells targeting CD19 for B-cell lymphomas. "
"HPV vaccine (Gardasil) prevents HPV-related cancers."),
]
for title, desc in treatments:
p = doc.add_paragraph(style="List Bullet")
rt = p.add_run(title + ": ")
rt.bold = True
rt.font.size = Pt(11)
rd = p.add_run(desc)
rd.font.size = Pt(11)
# ─────────────────────────────────────────────────────────────────────────────
# CONCLUSION
# ─────────────────────────────────────────────────────────────────────────────
doc.add_heading("Conclusion", level=2)
body(doc,
"Neoplasia is a fundamental pathological process underpinned by the progressive accumulation "
"of genetic and epigenetic alterations that confer a growth advantage on a single progenitor "
"cell. The key distinction between benign and malignant tumors rests on metastatic potential "
"and invasive behavior. The hallmarks of cancer - self-sufficient growth signaling, evasion "
"of cell death, immortality, angiogenesis, immune evasion, and invasion - represent the final "
"common outcome of diverse molecular disruptions including oncogene activation, tumor suppressor "
"gene inactivation, and DNA repair failure. Understanding these mechanisms has directly "
"translated into targeted therapies and immunotherapies that are transforming cancer treatment.")
doc.add_paragraph()
body(doc, "Primary source: Robbins & Kumar Basic Pathology (10th ed.), Chapter 6: Neoplasia, pp. 186-280.",
italic=True)
# ─────────────────────────────────────────────────────────────────────────────
# SAVE
# ─────────────────────────────────────────────────────────────────────────────
out = "/tmp/workspace/neoplasia-essay/Neoplasia_Essay.docx"
doc.save(out)
print(f"Saved: {out}")
python3 /tmp/workspace/neoplasia-essay/build_neoplasia.py
python3 -c " from docx import Document doc = Document('/tmp/workspace/neoplasia-essay/Neoplasia_Essay.docx') headings = [p.text for p in doc.paragraphs if p.style.name.startswith('Heading')] print('Headings found:', len(headings)) for h in headings: print(' -', h) tables = len(doc.tables) print(f'Tables: {tables}') "
Neoplasia Essay
Word Document · DOCX