Fixing the direction of the nodes and checking them #112
+283
−42
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.