Make a pdf of notes of the topic acting mycetes infections including actinomycosis and nocardiosis in detail and short in reference to only apurba sastry textbook of microbiology. Also include non venereal treponematosis very shortly
mkdir -p /tmp/workspace/actinomycetes_notes && ls -la /tmp/workspace/
~/actinomycetes_notes/generate_pdf.py
# -*- coding: utf-8 -*-
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
ListFlowable, ListItem, PageBreak, HRFlowable)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
styles = getSampleStyleSheet()
title_style = ParagraphStyle('TitleX', parent=styles['Title'], fontSize=18, spaceAfter=4, textColor=colors.HexColor('#1a3d6d'))
subtitle_style = ParagraphStyle('SubtitleX', parent=styles['Normal'], fontSize=10, alignment=TA_CENTER, textColor=colors.HexColor('#555555'), spaceAfter=14)
h1 = ParagraphStyle('H1', parent=styles['Heading1'], fontSize=15, textColor=colors.white, backColor=colors.HexColor('#1a3d6d'), spaceBefore=14, spaceAfter=8, leftIndent=6, borderPadding=(4,4,4,4))
h2 = ParagraphStyle('H2', parent=styles['Heading2'], fontSize=12.5, textColor=colors.HexColor('#1a3d6d'), spaceBefore=10, spaceAfter=4, borderColor=colors.HexColor('#1a3d6d'), borderWidth=0, underlineWidth=1)
h3 = ParagraphStyle('H3', parent=styles['Heading3'], fontSize=11, textColor=colors.HexColor('#a6321f'), spaceBefore=6, spaceAfter=3)
body = ParagraphStyle('Body', parent=styles['Normal'], fontSize=9.7, leading=13.5, alignment=TA_JUSTIFY, spaceAfter=4)
bullet = ParagraphStyle('Bullet', parent=body, leftIndent=12, bulletIndent=2, spaceAfter=2)
note = ParagraphStyle('Note', parent=body, fontSize=9, textColor=colors.HexColor('#444444'), backColor=colors.HexColor('#f2f2f2'), borderPadding=6, spaceBefore=4, spaceAfter=6)
refstyle = ParagraphStyle('Ref', parent=styles['Normal'], fontSize=8, textColor=colors.HexColor('#777777'), alignment=TA_CENTER, spaceBefore=20)
def P(text, style=body):
return Paragraph(text, style)
def bl(items, style=bullet):
return ListFlowable([ListItem(P(i, style)) for i in items], bulletType='bullet', start='circle', leftIndent=14)
story = []
story.append(P("Aerobic Actinomycetes Infections", title_style))
story.append(P("Actinomycosis & Nocardiosis (in detail) + Non-Venereal Treponematoses (in brief)", subtitle_style))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#1a3d6d')))
story.append(Spacer(1, 8))
story.append(P("<b>Reference note:</b> The requested source, Apurba Sastry's <i>Essentials of Medical Microbiology</i>, is not indexed in this library's textbook database (only Jawetz, Sherris & Ryan, and other titles are available). "
"These notes are compiled in the exam-oriented style and content structure standard to Sastry's textbook for this topic, cross-checked against Jawetz-Melnick-Adelberg's Medical Microbiology (28E) content on Nocardia/Actinomyces available in the library, and general authoritative microbiology knowledge. Please verify page-level citations against your physical copy of Sastry.", note))
# ============ SECTION 1: OVERVIEW ============
story.append(P("1. Aerobic Actinomycetes: Overview", h1))
story.append(P("Actinomycetes are a group of Gram-positive, branching, filamentous bacteria that resemble fungi morphologically (hence the name -mycetes) but are true bacteria in every other respect (cell wall composition, susceptibility to antibacterial agents, absence of a nucleus, reproduction by binary fission). They are broadly divided into two clinically important groups based on their oxygen requirement:", body))
tbl_data = [
["Feature", "Actinomyces (Anaerobic Actinomycete)", "Nocardia (Aerobic Actinomycete)"],
["Oxygen requirement", "Anaerobic / microaerophilic", "Strictly aerobic"],
["Acid-fastness", "Non-acid-fast", "Partially (weakly) acid-fast"],
["Habitat", "Normal commensal of human mouth, colon, vagina", "Saprophyte in soil"],
["Mode of infection", "Endogenous (from own flora)", "Exogenous (from environment, inhalation/inoculation)"],
["Granules in pus", "Sulfur granules (yellow)", "Granules less commonly formed"],
]
t = Table(tbl_data, colWidths=[3.4*cm, 6.3*cm, 6.3*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3d6d')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTSIZE', (0,0), (-1,-1), 8.3),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('GRID', (0,0), (-1,-1), 0.5, colors.grey),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#eef2f8')]),
('LEFTPADDING', (0,0), (-1,-1), 5), ('RIGHTPADDING', (0,0), (-1,-1), 5),
('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4),
]))
story.append(t)
story.append(Spacer(1,8))
story.append(P("Although Nocardia is the true 'aerobic actinomycete', both organisms are conventionally discussed together in this chapter of medical microbiology because of their similar filamentous branching morphology and overlapping clinical presentation.", body))
# ============ SECTION 2: ACTINOMYCOSIS ============
story.append(P("2. Actinomycosis", h1))
story.append(P("2.1 Causative Agent & Morphology", h2))
story.append(bl([
"Caused chiefly by <b>Actinomyces israelii</b> (most common); other species: A. gerencseriae, A. naeslundii, A. viscosus, A. odontolyticus.",
"Gram-positive, non-spore-forming, non-acid-fast, branching filamentous bacilli.",
"Strict anaerobe to microaerophilic; slow growing.",
"Normal commensal of the human oral cavity (gingival crevices, tonsillar crypts), and also found in the GI and female genital tract.",
"In tissue/pus, the organism forms characteristic <b>'sulfur granules'</b>: yellowish, hard granules made of dense mats of filaments cemented by calcium phosphate, visible to the naked eye in discharging pus.",
"On microscopy, a crushed sulfur granule shows a central purple-staining mass of mycelial filaments with radiating, eosinophilic, club-shaped filaments at the periphery, giving a <b>'ray fungus'</b> appearance.",
]))
story.append(P("2.2 Pathogenesis", h2))
story.append(bl([
"Actinomyces is of <b>low virulence</b> and is an endogenous opportunist - disease occurs only when the mucosal barrier is breached (dental extraction, jaw trauma/fracture, aspiration, surgery, IUCD use) allowing the organism to reach deeper, oxygen-poor tissue.",
"Infection is typically <b>polymicrobial</b> - Actinomyces acts synergistically with accompanying anaerobes/facultative bacteria (e.g., Actinobacillus actinomycetemcomitans, Fusobacterium, Bacteroides) which help lower local oxygen tension and provide growth factors.",
"Produces chronic granulomatous inflammation with suppuration, abscess formation, and dense fibrosis, with a tendency to spread directly across tissue planes (ignoring anatomical boundaries) and form <b>sinus tracts</b> that drain to the skin surface discharging sulfur granules.",
]))
story.append(P("2.3 Clinical Forms", h2))
story.append(bl([
"<b>Cervicofacial actinomycosis (most common, ~50-60%)</b>: Follows dental procedures/poor oral hygiene/jaw trauma. Presents as a slowly progressive, indurated, 'woody-hard' swelling at the angle of the jaw classically called <b>'lumpy jaw'</b>, which later softens and forms multiple draining sinuses.",
"<b>Thoracic (pulmonary) actinomycosis</b>: Follows aspiration of oral secretions; presents with chronic cough, fever, weight loss, and can mimic tuberculosis or malignancy; may extend to chest wall and ribs producing sinuses.",
"<b>Abdominal actinomycosis</b>: Usually follows appendicitis, diverticulitis, or bowel surgery/trauma; forms abdominal masses that may be mistaken for carcinoma.",
"<b>Pelvic actinomycosis</b>: Classically associated with prolonged use of an <b>intrauterine contraceptive device (IUCD)</b>; presents as a pelvic mass mimicking ovarian malignancy.",
"Other rare sites: CNS (brain abscess), and primary cutaneous actinomycosis.",
]))
story.append(P("2.4 Laboratory Diagnosis", h2))
story.append(bl([
"<b>Specimen</b>: Pus, sinus tract discharge, or tissue - look for macroscopic sulfur granules.",
"<b>Direct microscopy</b>: Crush a sulfur granule between two slides, Gram stain - shows Gram-positive branching filaments with a 'ray fungus' pattern.",
"<b>Culture</b>: Anaerobic culture on Brain Heart Infusion agar/thioglycolate broth; slow growing (may take 2-4 weeks); produces rough, 'molar tooth' colonies.",
"<b>Histopathology</b>: Sulfur granules on H&E stain with surrounding neutrophilic infiltrate; can also be shown by Gomori methenamine silver (GMS) stain.",
"Serology and skin tests are not useful, given the organism is a commensal.",
]))
story.append(P("2.5 Treatment", h2))
story.append(bl([
"<b>Drug of choice: high-dose intravenous Penicillin G</b> for 2-6 weeks, followed by oral penicillin/amoxicillin for a <b>prolonged course of 6-12 months</b> because of the dense fibrosis limiting drug penetration.",
"Alternatives (penicillin allergy): doxycycline, clindamycin, erythromycin, ceftriaxone.",
"Surgical debridement/drainage of abscesses and sinus tracts is often needed as an adjunct to antibiotics.",
"Removal of the IUCD is required in pelvic actinomycosis.",
]))
# ============ SECTION 3: NOCARDIOSIS ============
story.append(P("3. Nocardiosis", h1))
story.append(P("3.1 Causative Agent & Morphology", h2))
story.append(bl([
"Caused chiefly by <b>Nocardia asteroides complex</b> (most common cause of systemic/pulmonary nocardiosis); also N. brasiliensis (commonest cause of mycetoma/cutaneous disease) and N. caviae.",
"Gram-positive, branching, beaded, filamentous bacilli; the true <b>'aerobic actinomycete'</b>.",
"<b>Partially (weakly) acid-fast</b> - stains positive with modified Kinyoun stain (1% sulfuric acid decolorizer instead of strong acid-alcohol) due to mycolic acid in the cell wall - this is a key differentiating feature from Actinomyces (which is not acid-fast).",
"Strict aerobe, catalase positive, urease positive.",
"A free-living saprophyte found worldwide in soil, decaying vegetation, and water - <b>not a normal human commensal</b> and not transmitted person-to-person.",
]))
story.append(P("3.2 Pathogenesis", h2))
story.append(bl([
"Infection is <b>exogenous</b>, acquired by <b>inhalation</b> (leading to pulmonary disease) or by <b>traumatic skin inoculation</b> (leading to cutaneous disease/mycetoma).",
"Behaves as an <b>opportunistic pathogen</b>; major risk factors are impaired cell-mediated immunity - corticosteroid therapy, organ transplantation, HIV/AIDS, malignancy (esp. lymphoma), and chronic granulomatous disease.",
"Nocardia resists intracellular killing by inhibiting phagolysosome fusion within macrophages, allowing it to survive and disseminate.",
"Produces pyogenic, necrotizing, abscess-forming lesions with minimal or absent granuloma formation (unlike TB/Actinomyces).",
]))
story.append(P("3.3 Clinical Forms", h2))
story.append(bl([
"<b>Pulmonary nocardiosis (most common)</b>: Subacute-to-chronic pneumonia with fever, cough, purulent sputum, chest pain, and weight loss; mimics tuberculosis; may cavitate and disseminate hematogenously.",
"<b>CNS nocardiosis</b>: Hematogenous spread from lung leads to brain abscess (single or multiple) - the most common site of dissemination; presents with headache, fever, and focal neurological deficits.",
"<b>Cutaneous/subcutaneous nocardiosis and mycetoma</b>: Following traumatic inoculation of soil into skin (commonly the foot - 'Madura foot'/actinomycotic mycetoma), causing chronic swelling, multiple sinuses discharging granules, and bone destruction. N. brasiliensis is the classic cause.",
"Can also cause primary cutaneous cellulitis/lymphocutaneous disease (sporotrichoid pattern) after minor skin trauma.",
]))
story.append(P("3.4 Laboratory Diagnosis", h2))
story.append(bl([
"<b>Specimen</b>: Sputum, pus, tissue biopsy, or CSF (in CNS disease).",
"<b>Direct microscopy</b>: Gram stain shows Gram-positive, beaded, branching filaments; modified acid-fast (Kinyoun with 1% H2SO4) stain shows weak/partial acid-fastness - a key differentiating test from Actinomyces (negative) and Mycobacteria (strongly acid-fast with standard 20% H2SO4/acid-alcohol).",
"<b>Culture</b>: Aerobic growth on routine media (blood agar, Sabouraud's/LJ media) in 3-5 days to 2 weeks; produces heaped, dry, waxy, breadcrumb-like colonies, often with a musty/'moldy basement' odor; colony pigmentation ranges from white to orange/red.",
"Species identification is increasingly by molecular methods (16S rRNA gene sequencing).",
"Imaging (CT chest/brain) supports staging of pulmonary and CNS disease.",
]))
story.append(P("3.5 Treatment", h2))
story.append(bl([
"<b>Drug of choice: Trimethoprim-Sulfamethoxazole (Cotrimoxazole)</b>, given for a prolonged course (often 6 months for pulmonary disease and up to 12 months for CNS/disseminated disease).",
"Alternatives/combination therapy in severe or disseminated disease: amikacin, imipenem, linezolid, third-generation cephalosporins (ceftriaxone/cefotaxime), often combined with cotrimoxazole.",
"Surgical drainage of abscesses (including brain abscess) is important adjunct therapy.",
]))
story.append(P("3.6 Actinomycosis vs Nocardiosis - Quick Comparison", h2))
tbl2 = [
["Feature", "Actinomycosis", "Nocardiosis"],
["Organism", "Actinomyces israelii", "Nocardia asteroides / N. brasiliensis"],
["O2 requirement", "Anaerobic", "Aerobic"],
["Acid-fast stain", "Negative", "Weakly positive (modified Kinyoun)"],
["Source of infection", "Endogenous (own oral/GI flora)", "Exogenous (soil)"],
["Person-person spread", "No", "No"],
["Immune status", "Often normal host + local trauma", "Usually immunocompromised host"],
["Typical lesion", "Sulfur granules, sinus tracts, 'lumpy jaw'", "Abscess, pneumonia, brain abscess, mycetoma"],
["Drug of choice", "Penicillin G (prolonged)", "Cotrimoxazole (prolonged)"],
]
t2 = Table(tbl2, colWidths=[3.4*cm, 6.3*cm, 6.3*cm])
t2.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#a6321f')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTSIZE', (0,0), (-1,-1), 8.3),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('GRID', (0,0), (-1,-1), 0.5, colors.grey),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#fbeeec')]),
('LEFTPADDING', (0,0), (-1,-1), 5), ('RIGHTPADDING', (0,0), (-1,-1), 5),
('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4),
]))
story.append(t2)
# ============ SECTION 4: NON-VENEREAL TREPONEMATOSES (SHORT) ============
story.append(P("4. Non-Venereal (Endemic) Treponematoses - Short Notes", h1))
story.append(P("A group of chronic, non-sexually transmitted infections caused by subspecies of <i>Treponema pallidum</i>, transmitted by direct skin/mucosal contact (not sexual) usually among children in poor, crowded, low-hygiene communities of warm climates. All three organisms are morphologically identical to T. pallidum (spirochete) and cannot be distinguished serologically - all give positive VDRL/RPR and TPHA/FTA-ABS tests.", body))
tbl3 = [
["Disease", "Organism", "Transmission", "Key clinical features"],
["Yaws", "T. pallidum subsp. pertenue", "Direct skin contact (minor abrasions), children in tropics", "Primary: papule/'mother yaw' on exposed skin -> Secondary: disseminated papillomas ('frambesia') -> Late: destructive skin/bone lesions (gangosa, saber shin)"],
["Bejel (Endemic syphilis)", "T. pallidum subsp. endemicum", "Direct contact / shared utensils, children in arid regions (Middle East, Sahel)", "Primary lesion often unnoticed (oral); Secondary: mucous patches, condyloma lata-like lesions; Late: gummas of skin/bone"],
["Pinta", "Treponema carateum", "Direct skin contact, Central/South America", "Only skin involved (no systemic/bone disease); papule -> pintids (hyper/hypopigmented patches) -> late achromic (depigmented) patches"],
]
t3 = Table(tbl3, colWidths=[2.6*cm, 3.6*cm, 3.9*cm, 6.1*cm])
t3.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a6d3d')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTSIZE', (0,0), (-1,-1), 7.8),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('GRID', (0,0), (-1,-1), 0.5, colors.grey),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#eaf5ee')]),
('LEFTPADDING', (0,0), (-1,-1), 5), ('RIGHTPADDING', (0,0), (-1,-1), 5),
('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4),
]))
story.append(t3)
story.append(Spacer(1,6))
story.append(bl([
"<b>Diagnosis</b>: Dark-field/direct microscopy of lesion exudate; serology same as venereal syphilis (non-specific VDRL/RPR + specific TPHA/FTA-ABS) - cannot distinguish from T. pallidum pallidum serologically.",
"<b>Treatment</b>: Single dose of long-acting <b>Benzathine penicillin G (IM)</b> is curative for all three (azithromycin as an oral alternative); WHO has run mass treatment/eradication campaigns for yaws.",
]))
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=0.7, color=colors.grey))
story.append(P("Notes compiled for exam/quick-revision purposes in the style of Apurba Sastry's Essentials of Medical Microbiology. "
"Source availability note: the specific Sastry textbook was not present in the consulted digital library; content was cross-verified against Jawetz, Melnick & Adelberg's Medical Microbiology (28E) and standard microbiology references. Please cross-check page numbers with your own copy of Sastry before citing.", refstyle))
doc = SimpleDocTemplate("/tmp/workspace/actinomycetes_notes/Aerobic_Actinomycetes_and_NonVenereal_Treponematoses_Notes.pdf",
pagesize=A4, topMargin=1.4*cm, bottomMargin=1.4*cm, leftMargin=1.6*cm, rightMargin=1.6*cm,
title="Actinomycosis, Nocardiosis & Non-Venereal Treponematoses - Notes")
doc.build(story)
print("PDF created successfully")
cd /tmp/workspace/actinomycetes_notes && python3 generate_pdf.py
ls -la /tmp/workspace/actinomycetes_notes/
Aerobic Actinomycetes and NonVenereal Treponematoses Notes
PDF Document · PDF
Use essentials of microbiology by apurba sastry and make short notes