Skip to content

Fall back to unaligned pedigree plot when kinship2 alignment fails#1147

Open
labkey-martyp wants to merge 1 commit into
release26.3-SNAPSHOTfrom
26.3_fb_pedigree_align_fallback
Open

Fall back to unaligned pedigree plot when kinship2 alignment fails#1147
labkey-martyp wants to merge 1 commit into
release26.3-SNAPSHOTfrom
26.3_fb_pedigree_align_fallback

Conversation

@labkey-martyp

Copy link
Copy Markdown
Contributor

Rationale

kinship2's QP-based alignment (align=TRUE) can fail with "constraints are inconsistent, no solution!" on deep or looped pedigrees, which aborts the entire Pedigree report so no image renders at all.

Related Pull Requests

None.

Changes

  • Wrap the kinship2 plot() call in the Pedigree report in tryCatch, retrying once with align=FALSE when the alignment error is detected so the report still renders. Any other error is re-raised unchanged.

kinship2's QP-based alignment (align=TRUE) can fail with "constraints are inconsistent, no solution!" on deep or looped pedigrees, which aborts the entire Pedigree report. Wrap the plot call in tryCatch so that this specific alignment failure is caught and retried with align=FALSE, letting the report render rather than error out. Any other error is re-raised unchanged.
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