Fixing the direction of the nodes and checking them#112
Merged
smasongarrison merged 6 commits intomainfrom Jan 30, 2026
Merged
Conversation
Introduces helper functions addIfAny and dropIdenticalDuplicateIDs to streamline pedigree validation and repair logic. Refactors checkIDs and checkParents to use these helpers, improving code clarity and modularity. Enhances restorePedColnames to be more robust and adds documentation for new helpers.
Corrects the direction of edges in the ped2graph function to be parent-to-child for igraph compatibility. Also updates documentation for dropIdenticalDuplicateIDs and restorePedColnames to reflect new or clarified arguments.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
==========================================
- Coverage 84.38% 84.32% -0.07%
==========================================
Files 27 28 +1
Lines 4240 4281 +41
==========================================
+ Hits 3578 3610 +32
- Misses 662 671 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updated the package version in DESCRIPTION to 1.6.0.1 and added a corresponding entry in NEWS.md to reflect recent changes and improvements.
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 several improvements and bug fixes related to pedigree data handling, especially around helper functions, ID validation/repair, and graph construction. The most significant changes include new utility functions for duplicate handling and list updates, a fix to ensure parent-child direction in pedigree graphs, and enhancements to column name restoration and validation logic.
New helper functions and utilities:
dropIdenticalDuplicateIDsto efficiently remove identical duplicate rows by ID in pedigree data frames, along with a log of changes. [1] [2]addIfAny, a utility to conditionally add elements to a list, improving code clarity and reducing redundancy. [1] [2]Pedigree graph construction and validation fixes:
ped2graphso parents point to children, aligning with igraph conventions and biological relationships. This is verified by new tests. [1] [2] [3] [4]Pedigree data validation and repair enhancements:
checkIDsto use the newdropIdenticalDuplicateIDshelper, simplifying logic and improving maintainability.checkParentIDsby usingaddIfAnyand clarifying the logic for detecting single parents.restorePedColnamesfunction, ensuring user-supplied names are preserved. [1] [2] [3]Documentation and housekeeping:
NEWS.mdfile to reflect these changes and improvements.Exports and minor code cleanups:
These changes collectively improve the reliability, maintainability, and clarity of pedigree data processing and graphing in the package.