Schematex

Pedigree

About pedigrees

A pedigree chart is a standardized diagram used in clinical genetics to trace a single condition — or a small set of related conditions — through a family across multiple generations. Unlike a genogram, which records emotional and social texture, a pedigree is purely structural: who is affected, who is a carrier, who has been tested, and who the index case is. Genetic counselors, clinical geneticists, and referring physicians use it to judge inheritance pattern, recurrence risk, and who else in the family should be offered testing.

Schematex follows the Bennett et al. (2022) NSGC recommendations — the most recent update from the National Society of Genetic Counselors — which supersedes the 1995 and 2008 revisions. For background see Wikipedia: Pedigree chart. This page documents what the parser accepts today.

pedigree·§ ISCN / Bennett
↘ preview
100%
BRCA1 — Hereditary Breast/Ovarian Cancer Pedigree chart with 12 individuals across 3 generations I II III I-1 I-2 (affected) II-4 II-1 (affected) II-6 II-3 (carrier) II-2 III-1 (affected) P III-2 III-3 (presymptomatic) III-6 (carrier) III-7 I-1 I-2 II-4 II-1 II-6 II-3 II-2 III-1 III-2 III-3 III-6 III-7 GENETIC STATUS Affected Carrier Presymptomatic SYMBOLS Deceased P Proband (P) — first affected case identified
UTF-8 · LF · 14 lines · 408 chars✓ parsed·6.6 ms·13.3 KB SVG

1. Your first pedigree

The smallest clinically useful pedigree: two parents and their affected child.

pedigree·§ ISCN / Bennett
↘ preview
100%
Pedigree Pedigree chart with 4 individuals across 2 generations I II I-1 (carrier) I-2 (carrier) II-1 (affected) P II-2 I-1 I-2 II-1 II-2 GENETIC STATUS Affected Carrier SYMBOLS P Proband (P) — first affected case identified
UTF-8 · LF · 6 lines · 122 chars✓ parsed·1.0 ms·7.5 KB SVG

Four rules cover 80% of usage:

  1. Start with the keyword pedigree, optionally followed by a quoted title.
  2. Declare each individual on their own line: id [attributes]. Conventionally IDs are I-1, II-3, etc. — Roman-numeral generation, dash, position within the generation.
  3. Connect two individuals with a couple operator-- (mated), == (consanguineous), -/- (separated), ~ (no offspring). See §4.
  4. Indent under the couple line to add their children. Any deeper indent works; two spaces is conventional.

Comments must be on their own line, starting with #, //, or Mermaid-style %%. Inline trailing comments will break the parser.


2. Individuals

An individual line is id [attr1, attr2, …]. Attributes are comma-separated, order-independent, all optional.

ID rules. Must match [a-zA-Z][a-zA-Z0-9_-]*. IDs are case-insensitive internally but preserve their original casing as the display label (override with label:"…").

Attributes accepted by the parser today:

AttributeValuesEffect
Sexmale, female, unknown, amab, afab, uaabShape: square, circle, diamond (see §3)
Genetic statusunaffected, affected, carrier, carrier-x, obligate-carrier, presymptomaticFill / inner marker (see §3)
Markerproband, consultand, evaluatedArrow + letter annotation (see §3.3)
Life statusdeceased, stillborn, pregnancy, sab, tab, ectopicVisual modifier
Birth year4-digit number, e.g. 1958Shown below shape
label:"…"any quoted stringDisplay label override
affected: trait1+trait2see §5Multi-trait quadrant fill
pedigree·§ ISCN / Bennett
↘ preview
100%
Pedigree Pedigree chart with 5 individuals across 1 generations I I-1 I-2 (affected) Jane (42) (affected) P II-2 E II-3 (presymptomatic) I-1 I-2 Jane (42) II-2 II-3 GENETIC STATUS Affected Presymptomatic SYMBOLS Deceased P Proband (P) — first affected case identified
UTF-8 · LF · 6 lines · 180 chars✓ parsed·0.9 ms·6.9 KB SVG

3. Shapes, status, markers

3.1 Shapes (Bennett 2022)

VisualSex valueMeaning
☐ Squaremale or amabAssigned male at birth
○ Circlefemale or afabAssigned female at birth
◇ Diamondunknown, uaab, or omittedUnknown / DSD / not disclosed / in utero

Bennett 2022 formalized that square and circle represent assigned sex at birth, not gender identity. If gender identity differs, record it in the label ([female, label: "Trans man (AFAB)"]) — do not change the shape.

3.2 Genetic status (fill)

StatusMeaning
(default, no status token)Unaffected — empty shape
unaffectedExplicit unaffected
affectedFully filled shape
carrierHalf-filled — autosomal carrier
carrier-xCenter dot — X-linked carrier female
obligate-carrierCenter dot — inferred from pedigree structure
presymptomaticVertical line through shape — tested positive, no clinical signs yet
pedigree·§ ISCN / Bennett
↘ preview
100%
Pedigree Pedigree chart with 6 individuals across 1 generations I I-1 I-2 (affected) I-3 (carrier) I-4 (carrier-x) I-5 (obligate-carrier) I-6 (presymptomatic) I-1 I-2 I-3 I-4 I-5 I-6 GENETIC STATUS Affected Carrier X-linked carrier Obligate carrier Presymptomatic
UTF-8 · LF · 7 lines · 158 chars✓ parsed·0.8 ms·7.3 KB SVG

3.3 Markers

MarkerMeaning
probandArrow + "P" — the index case who triggered the referral
consultandArrow + "C" — the person who sought genetic counseling
evaluated"E" — evaluated but no positive finding recorded

3.4 Life status

ValueMeaning
deceasedDiagonal slash across the shape
stillbornSmall shape + "SB" label
pregnancyShape + "P" label, or diamond if sex unknown
sabSmall triangle — spontaneous abortion
tabSmall triangle with bar — terminated pregnancy
ectopicSmall triangle + "ECT" label

Multiple tokens combine: [female, affected, deceased], [male, sab], [unknown, pregnancy, presymptomatic].


4. Couples and children

4.1 Couple operators

The parser tries these in order. The first match wins — so -/- beats --.

OperatorTypeExampleMeaning
-/-separateda -/- bMated pair, no longer together
==consanguineousa == bBlood-related union (clinically critical)
--marrieda -- bMated pair with offspring
~cohabitinga ~ bPartners without offspring

4.2 Inline individual on the right side

If the right-hand individual has not been declared yet, declare them in place:

pedigree·§ ISCN / Bennett
↘ preview
100%
Pedigree Pedigree chart with 4 individuals across 2 generations I II I-2 I-1 (carrier) II-1 (affected) P II-2 (carrier) I-2 I-1 II-1 II-2 GENETIC STATUS Affected Carrier SYMBOLS P Proband (P) — first affected case identified
UTF-8 · LF · 5 lines · 118 chars✓ parsed·0.7 ms·7.4 KB SVG

4.3 Children (indented under a couple)

Indentation under a couple line = "these are the children of this couple." Any indent greater than the couple's indent works; two spaces is conventional.

pedigree·§ ISCN / Bennett
↘ preview
100%
Cystic Fibrosis — autosomal recessive Pedigree chart with 5 individuals across 2 generations I II I-1 (carrier) I-2 (carrier) II-1 (affected) P II-2 (carrier) II-3 I-1 I-2 II-1 II-2 II-3 GENETIC STATUS Affected Carrier SYMBOLS P Proband (P) — first affected case identified
UTF-8 · LF · 7 lines · 185 chars✓ parsed·0.7 ms·8.1 KB SVG

4.4 Consanguineous unions

Consanguinity is rendered as a double line and must be made visible — it is the single most load-bearing piece of information on many pedigrees.

pedigree·§ ISCN / Bennett
↘ preview
100%
Consanguineous union Pedigree chart with 7 individuals across 3 generations I II III I-1 (carrier) I-2 I-3 I-4 (carrier) II-1 (carrier) II-3 (carrier) III-1 (affected) P I-1 I-2 I-3 I-4 II-1 II-3 III-1 GENETIC STATUS Affected Carrier SYMBOLS P Proband (P) — first affected case identified
UTF-8 · LF · 11 lines · 238 chars✓ parsed·0.7 ms·9.7 KB SVG

5. Multi-trait pedigrees

For families that carry more than one heritable condition, use legend: lines to define which quadrant of the shape represents which trait, then tag individuals with affected: trait1+trait2.

pedigree "Cancer Family Syndrome"
  legend: breast = "Breast cancer" (fill: quad-tl)
  legend: ovarian = "Ovarian cancer" (fill: quad-tr)
  legend: prostate = "Prostate cancer" (fill: quad-bl)
  legend: colon = "Colon cancer" (fill: quad-br)

  I-1 [male, affected: prostate, deceased]
  I-2 [female, affected: breast, deceased]
  I-1 -- I-2
    II-1 [female, affected: breast+ovarian]
    II-2 [male, unaffected]

Legend syntax: legend: id = "Human label" (fill: POSITION).

fill positionRegion
fullEntire shape (default if (fill: …) omitted)
quad-tl / quad-tr / quad-bl / quad-brTop-left / top-right / bottom-left / bottom-right quadrant
half-left / half-right / half-top / half-bottomA half of the shape

Individuals use the legend trait IDs: [affected: breast], [affected: breast+ovarian]. The + joins traits; quadrants fill cumulatively.


6. Labels & comments

  • Title: pedigree "BRCA1 Family" — first line only.
  • Individual label override: II-1 [female, affected, label: "Jane Smith (42)"].
  • Legend entry: legend: id = "Label" (fill: POSITION) — see §5.
  • Mode suffix: pedigree:autosomal-dominant "Family X" is accepted. The suffix is stored as metadata.mode; current renderers ignore it.
  • Comments: #, //, or %% at the start of a line (after leading whitespace). Inline trailing comments are not supported.

7. Reserved words & escaping

Reserved at line start: pedigree (header), legend: (legend entry).

Reserved operator tokens inside a line — avoid using these sequences in IDs: --, ==, -/-, ~.

Reserved attribute tokens inside […] — the parser will interpret these regardless of position: sex tokens (male, female, unknown, amab, afab, uaab), genetic statuses (affected, carrier, carrier-x, obligate-carrier, presymptomatic, unaffected), markers (proband, consultand, evaluated), and life statuses (deceased, stillborn, pregnancy, sab, tab, ectopic).

Strings with spaces must be double-quoted. Single quotes and backticks are not recognized.


8. Common mistakes

Real parser errors, what triggers them, and how to fix.

You wroteParser saysFix
II-1 -- II-4 where II-4 was never declaredUnknown individual 'II-4'Declare II-4 above, or use inline form: II-1 -- II-4 [male, unaffected]
II-1 [nonbinary]Silently stored as a custom property; shape stays diamondBennett 2022 distinguishes assigned sex from gender — use amab/afab/uaab and record identity in label:
II-3 [twin-mz]Stored as a custom property; no twin line renderedTwin notation is §10 Roadmap
I-1 -- I-2 followed by II-1 [male] at the same indentChild parsed as a new top-level individual, not as offspringIndent the child line deeper than the couple line
I-1 [affected: breast] with no matching legend:Trait ID stored but no legend-keyed fill is renderedAdd legend: breast = "…" (fill: quad-tl) above
II-1[affected] (no space, no attrs split)Works for a single token; breaks when a second attribute is addedAlways separate id and […] with a space
Line 1 is I-1 [male] with no pedigree headerExpected "pedigree" headerStart with pedigree or pedigree "Title"

9. Grammar (EBNF)

document       = header (blank | comment | legend | individual | couple-block)*

header         = "pedigree" ( ":" mode )? ( WS quoted-string )? NEWLINE
mode           = [A-Za-z] [A-Za-z0-9_-]*
quoted-string  = '"' any-char-but-quote* '"'

legend         = INDENT "legend:" WS id WS "=" WS quoted-string
                   ( WS "(" "fill:" fill-value ")" )? NEWLINE

individual     = INDENT id ( "[" attrs "]" )? NEWLINE
couple-block   = INDENT id WS coupleOp WS right-side NEWLINE
                   ( deeper-indent child )*
child          = INDENT id ( "[" attrs "]" )? NEWLINE
right-side     = id ( "[" attrs "]" )?

coupleOp       = "-/-" | "==" | "--" | "~"

id             = [a-zA-Z] [a-zA-Z0-9_-]*
attrs          = attr ("," attr)*
attr           = sex
               | genetic-status
               | marker
               | life-status
               | digit digit digit digit                         // birth year
               | "label" ":" quoted-string
               | "affected" ":" trait-id ( "+" trait-id )*
               | key ":" value                                    // custom

sex            = "male" | "female" | "unknown" | "amab" | "afab" | "uaab"
genetic-status = "unaffected" | "affected" | "carrier" | "carrier-x"
               | "obligate-carrier" | "presymptomatic"
marker         = "proband" | "consultand" | "evaluated"
life-status    = "deceased" | "stillborn" | "pregnancy"
               | "sab" | "tab" | "ectopic"
fill-value     = "full" | "half-left" | "half-right" | "half-top" | "half-bottom"
               | "quad-tl" | "quad-tr" | "quad-bl" | "quad-br"

comment        = INDENT ( "#" | "//" | "%%" ) any NEWLINE

Authoritative source: src/diagrams/pedigree/parser.ts. If this diverges from the parser, the parser wins — please open an issue.


10. Standard compliance

Schematex pedigrees follow Bennett, R.L. et al. (2022), The evolving pedigree: Updating to reflect modern family structures, sex, and gender for shape semantics, status fills, and the proband/consultand conventions. Earlier revisions (Bennett 1995, 2008) remain a valid reference for the classical subset.

What is implemented today vs. the standard:

  • ✅ Core shapes (square / circle / diamond) with Bennett 2022 AMAB/AFAB/UAAB semantics
  • ✅ Full genetic-status set (affected / carrier / carrier-x / obligate-carrier / presymptomatic / unaffected)
  • ✅ Proband, consultand, evaluated markers
  • ✅ Life-status modifiers (deceased, stillborn, pregnancy, SAB, TAB, ectopic)
  • ✅ Couple operators: mated / separated / consanguineous / no-offspring
  • ✅ Multi-trait quadrant fills with legend: entries
  • ⏳ Twin notation (monozygotic / dizygotic / unknown zygosity)
  • ⏳ Adopted-in / adopted-out bracket notation
  • ⏳ Assisted reproduction (donor egg/sperm/embryo, surrogate, IVF)
  • ⏳ No-offspring-by-choice and infertility markers

References:

  • Bennett, R.L., French, K.S., Resta, R.G., & Austin, J. (2022). Practice resource-focused revision: Standardized pedigree nomenclature update centered on sex and gender inclusivity. Journal of Genetic Counseling, 31(6), 1238–1249.
  • Bennett, R.L., Steinhaus French, K., Resta, R.G., & Doyle, D.L. (2008). Standardized human pedigree nomenclature: Update and assessment. J Genet Couns, 17(5), 424–433.
  • Bennett, R.L. et al. (1995). Recommendations for standardized human pedigree nomenclature. Am J Hum Genet, 56(3), 745–752.

Ready-to-use scenarios from the examples gallery:

pedigree·§ NSGC
BRCA1 Family — Hereditary Breast/Ovarian Cancer Pedigree chart with 12 individuals across 3 generations I II III I-1 I-2 (affected) II-4 II-1 (affected) II-6 II-3 (carrier) II-2 III-1 (affected) P III-2 III-3 (presymptomatic) III-6 (carrier) III-7 I-1 I-2 II-4 II-1 II-6 II-3 II-2 III-1 III-2 III-3 III-6 III-7 GENETIC STATUS Affected Carrier Presymptomatic SYMBOLS Deceased P Proband (P) — first affected case identified
BRCA1 hereditary cancer (four-generation)
Four-generation BRCA1 pedigree distinguishing affected, carrier, and presymptomatic individuals — per NSGC standard for cascade testing and insurance pre-authorization.
healthcare & social
pedigree·§ NSGC
CF family — autosomal recessive Pedigree chart with 8 individuals across 3 generations I II III I-1 (carrier) I-2 (carrier) II-4 (carrier) II-2 (carrier) II-1 (affected) P II-3 III-1 (affected) III-2 I-1 I-2 II-4 II-2 II-1 II-3 III-1 III-2 GENETIC STATUS Affected Carrier SYMBOLS P Proband (P) — first affected case identified
Cystic fibrosis (autosomal recessive)
Classic autosomal recessive cystic fibrosis pedigree with two carrier parents — illustrates the 25% recurrence risk for genetic counseling and patient education.
healthcare & social
pedigree·§ NSGC
Hemophilia A Pedigree chart with 10 individuals across 3 generations I II III I-1 I-2 (carrier-x) II-5 II-2 (carrier-x) II-1 (affected) II-3 II-4 III-1 (affected) III-2 (carrier-x) III-3 I-1 I-2 II-5 II-2 II-1 II-3 II-4 III-1 III-2 III-3 GENETIC STATUS Affected X-linked carrier
Hemophilia A (X-linked recessive)
Three-generation hemophilia A pedigree showing X-linked recessive inheritance with carrier females and affected males per NSGC clinical notation.
healthcare & social

12. Roadmap

Planned — not yet parseable. Do not use these in generated DSL today; the parser will reject them or store them as unused custom properties.

  • Twin notationtwin-mz (monozygotic), twin-dz (dizygotic), twin-unknown.
  • Adoption bracketsadopted-in, adopted-out (bracketed shape, dashed line to biological parents).
  • Assisted reproductiondonor-egg, donor-sperm, donor-embryo, surrogate, and an ivf annotation on the couple line.
  • No-offspring markersno-children (by choice) and infertile drop-line annotations.
  • Gender-identity annotation — a structured attribute distinct from sex, rather than stuffing it into label:.
  • Triplets and higher-order birthstriplet-mz, triplet-dz.

Track in the GitHub issues if you need any of these sooner.