Skip to content

Quad node summary names each member's zygosities like Trio/Duo (All Recessive too); one '--' for unfiltered members - #2934

Merged
davmlaw merged 2 commits into
masterfrom
2933_quad_method_summary
Nov 30, 2026
Merged

davmlaw merged 2 commits into
masterfrom
2933_quad_method_summary

Conversation

@davmlaw

@davmlaw davmlaw commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Results and testing notes: #2933 (comment)

For #2933.

Mostly a deletion: the Quad node had its own get_method that printed each member's zygosity set with Python's repr, while Trio and Duo use the shared formatter. This removes the Quad override so every Quad mode goes through the same code as the other two families.

Changes

  • analysis/models/nodes/sources/quad_node.py: SimpleQuadInheritance is gone. It was a SimpleFamilyInheritance subclass whose only job was the raw Mother:{...} Father:set() summary. QuadRecessive, QuadDominant, QuadDenovo and QuadXLinkedRecessive now inherit get_method from SimpleFamilyInheritance / XLinkedRecessiveInheritance, which call AbstractFamilyInheritance.get_zygosities_method. That method lists the proband first, then relatives in family order, uses zygosity display names, leaves out a member the mode doesn't filter, and applies each member's zygosity requirement (for example REF (called)), the same way the Trio and Duo do. The override was carried over unchanged by the Consolidate Duo / Trio / Quad node inheritance code onto one family-shape abstraction #2269 consolidation.
  • analysis/models/nodes/family_inheritance.py:AllRecessiveInheritance.get_method: All Recessive's AR and XLR branches were also printed as raw sets, for all three families, through _branch_method. They now use get_zygosities_method too, and _branch_method is removed. Trio and Duo All Recessive summaries change in the same way, for example AR (Proband: HOM_ALT, Mother: HET, Father: HET) OR XLR (Proband: HOM_ALT, Mother: HET; chrX only).
  • _zygosity_table_row: Any Affected wrote '—' for an unaffected member's cell, while Shared by all affected left it empty, which the Duo, Trio and Quad editors' memberZyg() / lookup() draw as --. Any Affected now leaves it empty as well, so both modes show --.

The Q objects are unchanged. Only the summary text and one editor table cell change.

Tests

  • analysis/tests/test_quad_node.py:test_method_summary_names_each_members_zygosities: the exact summary for every QuadInheritance mode on the affected-sibling quad. It fails on master.
  • test_zygosity_table_unfiltered_member_is_blank: Any Affected and Shared by all affected both leave an unfiltered member's cell blank. It fails on master.
  • Full suite (--keepdb --parallel 4, own test DB) passes.

… and Duo, and All Recessive's branches read the same way; Any Affected's unfiltered members show '--' in the editor like Shared by all affected #2933
…d the fix removed the overrides rather than adding logic #2933
@davmlaw
davmlaw merged commit 620315c into master Nov 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant