bug in relatedness matrix computation when parents are referenced but missing from the pedigree#155
Merged
Conversation
Apply code-style and whitespace cleanups across multiple R files: reflow long expressions, unify spacing, remove extra blank lines, and re-indent commented blocks. In readGedcom.R, improve the parse_dates branch by ensuring date columns are only parsed when present (avoids modifying non-existent columns) and clarify a message when date qualifiers are found. Minor signature and test whitespace tweaks and non-functional reformatting in data-raw/df_royal92.R and simulatePedigreeBetween.R.
…rser Add extractGedcomLevel, extractEventSubBlock, extractInfoFromLines, and extractCoordFromSubBlock helpers so processEventLine looks up fields by tag name rather than fixed line offsets, correctly handling missing or reordered GEDCOM event sub-fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…arify extractEventSubBlock guard assumption
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dge case; add tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…blican calendar escape; fix pkgdown catch-all
Potential fix for pull request finding Potential fix for pull request finding Potential fix for pull request finding Potential fix for pull request finding Potential fix for pull request finding Potential fix for pull request finding Co-Authored-By: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Extendedgedcom
Adds a `runmodel` argument to `fitPedigreeModel()` so callers can optionally return the assembled OpenMx model without fitting it. The new parameter is wired into the function logic and documented in the Rd file. Also adds a warning in `ped2com()` when `iss`/`jss` are NULL or empty before building the `isPar` sparse matrix, improving visibility into invalid matrix-construction inputs.
Closed
Up to standards ✅🟢 Issues
|
rowless parent fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces new functionality for tracing and flagging unilineal parental chains (maternal and paternal) within pedigrees, and fixes a subtle bug in relatedness matrix computation when parents are referenced but missing from the pedigree. The most important changes are grouped below.
New features for parental chain analysis:
addParentalChain(),addPaternalChain(), andaddMaternalChain()functions to compute and add ordered parental ancestor chains (maternal or paternal) for each individual in a pedigree, along with readable string representations. These chains allow easy tracing of direct maternal or paternal lines.addParentalLineFlag(),addPaternalLineFlag(), andaddMaternalLineFlag()functions to flag whether a specified ancestor appears in an individual's maternal or paternal chain, supporting efficient filtering or grouping by lineage.Bug fix and enhancements for relatedness matrix computation:
ped2com()and related functions where parents referenced inmomID/dadIDbut missing from the pedigree led to understated diagonal relatedness and missing covariance between siblings. Now, a warning is issued when this is detected, and two solutions are available via a newrepair_rowless_parentsargument: adding placeholder founder rows ("rows"method, default) or applying a Schur complement update ("schur"method, for additive component only). [1] [2] [3] [4] [5]Documentation and dependency updates:
1.8.0.9and documented all new features and fixes inNEWS.mdandDESCRIPTION. [1] [2]igraphimports required for the chain functions.