Skip to content

Added MADC Functions#36

Merged
alex-sandercock merged 13 commits intodevelopmentfrom
madc_filtering
May 21, 2025
Merged

Added MADC Functions#36
alex-sandercock merged 13 commits intodevelopmentfrom
madc_filtering

Conversation

@alex-sandercock
Copy link
Collaborator

New functions to filter and convert MADC files

  • filterMADC: Filter MADC files to remove low-quality microhaplotypes
  • madc2gmat: convert an MADC file to an additive relationship matrix using rrBLUP

@alex-sandercock alex-sandercock requested a review from Copilot May 16, 2025 15:45
@alex-sandercock alex-sandercock self-assigned this May 16, 2025
@alex-sandercock alex-sandercock added enhancement New feature or request in_progress not ready to merge labels May 16, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds two new functions—madc2gmat and filterMADC—for processing MADC files. The changes include adding comprehensive roxygen2 documentation, implementing the conversion of MADC files into an additive genomic relationship matrix (via madc2gmat), and providing filtering functionality for MADC files (via filterMADC).

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
man/madc2gmat.Rd Added documentation for the madc2gmat function.
man/filterMADC.Rd Added documentation for the filterMADC function.
R/madc2gmat.R Implemented the madc2gmat function including file parsing, scaling, and matrix conversion.
R/filterMADC.R Implemented the filterMADC function with configurable filtering on MADC files.
NAMESPACE Updated exports and imports to support the new functions.
Comments suppressed due to low confidence (2)

R/madc2gmat.R:52

  • [nitpick] Consider using a broader regex pattern (e.g., "|Ref_.*") for removing suffixes to ensure consistency and handle potential variations in the allele ID suffix.
filtered_df$AlleleID <- sub("\|Ref_001", "|Ref", filtered_df$AlleleID)

R/madc2gmat.R:53

  • The regex "|Alt_002*" may not reliably match the intended pattern; consider using a consistent and precise pattern such as "|Alt_.*" to correctly remove all extra characters.
filtered_df$AlleleID <- sub("\|Alt_002*", "|Alt", filtered_df$AlleleID)

@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 94.50549% with 5 lines in your changes missing coverage. Please review.

Project coverage is 84.90%. Comparing base (73ec035) to head (0594201).
Report is 14 commits behind head on development.

Files with missing lines Patch % Lines
R/filterMADC.R 95.23% 3 Missing ⚠️
R/madc2gmat.R 92.85% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development      #36      +/-   ##
===============================================
+ Coverage        84.14%   84.90%   +0.76%     
===============================================
  Files               16       18       +2     
  Lines             1148     1239      +91     
===============================================
+ Hits               966     1052      +86     
- Misses             182      187       +5     

☔ 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.

@alex-sandercock alex-sandercock removed the in_progress not ready to merge label May 19, 2025
@alex-sandercock alex-sandercock merged commit 1277f7a into development May 21, 2025
6 checks passed
@alex-sandercock alex-sandercock deleted the madc_filtering branch May 21, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants