Skip to content

Clarify sex encoding in Pedigree/Sex docs and Sex enum#442

Open
amcim wants to merge 2 commits into
ga4gh:masterfrom
amcim:docs/sex-encoding
Open

Clarify sex encoding in Pedigree/Sex docs and Sex enum#442
amcim wants to merge 2 commits into
ga4gh:masterfrom
amcim:docs/sex-encoding

Conversation

@amcim

@amcim amcim commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Clarifies how sex is encoded in Phenopackets to resolve recurring confusion between the Phenopackets Sex enum ordinals (FEMALE=1, MALE=2) and the PLINK/PED convention (1=male, 2=female). This update is purely documentation and code comment clarification. See #438 for the rationale behind the text of the written comments

  • individual.proto : Added a comment above the Sex enum that explains the integers are internal, do not match PED/PLINK encodings, and that Phenopackets should always use the string values (MALE, FEMALE) rather than integers.
  • docs/sex.rst: Added a prominent warning stating that integers must not be used to encode sex, and that string values are required
  • docs/pedigree.rst : Added the same warning. Clarified at the example that the sex column uses the Sex encoding rather than PLINK convention. Removed a now-redundant statement that duplicated this note under the AffectedStatus section.

Fixes #438
Fixes #391
Fixes #321 (Note that this issue is stale and was looking at an old version of the docs. The example is present and now displays correctly)

Additionally, I followed the conclusion in #391 which states that the PED example given should use phenopackets encoding for sex, it just needs to be clearly specified in the docs.

@amcim amcim requested a review from julesjacobsen July 1, 2026 18:57
@amcim amcim self-assigned this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant