Skip to content

Fix check ID error in helpGeneric.R#158

Open
smasongarrison wants to merge 11 commits into
mainfrom
dev_main
Open

Fix check ID error in helpGeneric.R#158
smasongarrison wants to merge 11 commits into
mainfrom
dev_main

Conversation

@smasongarrison

Copy link
Copy Markdown
Member

This pull request introduces utility functions for matrix handling and improves the clarity and robustness of parent ID validation output.

Matrix handling utilities:

  • Added as_numeric_matrix to coerce objects to numeric matrices, ensuring consistent numeric storage for downstream processing.
  • Added make_symmetric, which symmetrizes matrices (averages with their transpose) when needed, to guarantee exact symmetry as required by OpenMx.

Validation output improvements:

  • In checkParentIDs, improved handling of individuals appearing in both momID and dadID by filtering out NA values and formatting the output for better readability.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Updated the .pedigreeRelatednessMatrix function to ensure that the matrix is always coerced to a base dense matrix after symmetrization. Added error handling for matrix creation.
@smasongarrison smasongarrison force-pushed the dev_main branch 2 times, most recently from 5944299 to aebbafa Compare July 12, 2026 18:58
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