Skip to content

Conversation

@smasongarrison
Copy link
Member

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:

  • Added dropIdenticalDuplicateIDs to efficiently remove identical duplicate rows by ID in pedigree data frames, along with a log of changes. [1] [2]
  • Introduced addIfAny, a utility to conditionally add elements to a list, improving code clarity and reducing redundancy. [1] [2]

Pedigree graph construction and validation fixes:

  • Fixed the direction of edges in ped2graph so parents point to children, aligning with igraph conventions and biological relationships. This is verified by new tests. [1] [2] [3] [4]
  • Updated tests to ensure that all graph edges are correctly oriented from parent to child, preventing regression.

Pedigree data validation and repair enhancements:

  • Refactored duplicate ID repair in checkIDs to use the new dropIdenticalDuplicateIDs helper, simplifying logic and improving maintainability.
  • Improved parent ID validation in checkParentIDs by using addIfAny and clarifying the logic for detecting single parents.
  • Enhanced restoration of original column names after processing with the new restorePedColnames function, ensuring user-supplied names are preserved. [1] [2] [3]

Documentation and housekeeping:

  • Added and updated documentation for new helper functions and moved/renamed several files for better organization. [1] [2] [3] [4] [5]
  • Updated the NEWS.md file to reflect these changes and improvements.

Exports and minor code cleanups:

  • Cleaned up exports in the NAMESPACE, removing now-internal functions from the public API.
  • Minor improvements to logical checks and verbosity handling in validation functions.

These changes collectively improve the reliability, maintainability, and clarity of pedigree data processing and graphing in the package.

smasongarrison and others added 4 commits January 28, 2026 08:41
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
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 84.84848% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.32%. Comparing base (fd3b709) to head (a8ef38d).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
R/helpNames.R 77.77% 6 Missing ⚠️
R/helpChecks.R 76.47% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@smasongarrison smasongarrison linked an issue Jan 29, 2026 that may be closed by this pull request
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.
@smasongarrison smasongarrison merged commit 09fa620 into main Jan 30, 2026
10 checks passed
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.

[Bug] Mike's problem to fix the arrows

2 participants