Skip to content

Added MADC Functions - #36

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

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

Conversation

@alex-sandercock

Copy link
Copy Markdown
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-sandercockalex-sandercock self-assigned this May 16, 2025
@alex-sandercockalex-sandercock added enhancement New feature or request in_progress not ready to merge labels May 16, 2025

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
FileDescription
man/madc2gmat.RdAdded documentation for the madc2gmat function.
man/filterMADC.RdAdded documentation for the filterMADC function.
R/madc2gmat.RImplemented the madc2gmat function including file parsing, scaling, and matrix conversion.
R/filterMADC.RImplemented the filterMADC function with configurable filtering on MADC files.
NAMESPACEUpdated 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

codecovBot commented May 19, 2025

Copy link
Copy Markdown

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 linesPatch %Lines
R/filterMADC.R95.23%3 Missing ⚠️
R/madc2gmat.R92.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-sandercockalex-sandercock removed the in_progress not ready to merge label May 19, 2025
@alex-sandercock
alex-sandercock merged commit 1277f7a into developmentMay 21, 2025
@alex-sandercock
alex-sandercock deleted the madc_filtering branch May 21, 2025 21:13
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@alex-sandercock@Cristianetaniguti