Skip to content

Grape#66

Merged
Cristianetaniguti merged 10 commits into
developmentfrom
grape
Jul 2, 2026
Merged

Grape#66
Cristianetaniguti merged 10 commits into
developmentfrom
grape

Conversation

@alex-sandercock

Copy link
Copy Markdown
Collaborator

This pull request makes significant changes to the BIGr package, primarily focused on cleaning up the codebase and dependencies by removing several unused or unnecessary functions and packages. It also updates the package metadata and dependencies for improved clarity and maintainability.

Key changes include:

Updated madc2vcf_all and madc2vcf_targets

  • It was possible for POS to be exported as scientific notation instead of integers, and for negative POS values to be present for off target SNPs.
  • POS are corrected to be integers, and SNPs with a negative POS value are removed.

Removal of unused functions and dependencies

  • Removed the functions allele_freq_poly, solve_composition_poly, and check_ped from the codebase and from the list of exported functions in the NAMESPACE file, as well as their associated documentation. These functions are no longer maintained or required in the package. [1] [2] [3] [4]
  • Removed all imports and references to the data.table, janitor, and quadprog packages from the NAMESPACE file, as they are no longer needed after the function removals. [1] [2]

Updates to package metadata and dependencies

  • Updated the DESCRIPTION file to increment the version to 0.8.1, clarify the package title and description, and clean up the list of imports and suggests to accurately reflect current dependencies. Also updated formatting and moved some entries for consistency.

These changes streamline the BIGr package by removing legacy or redundant code and ensuring that only necessary dependencies are included, which should improve maintainability and reduce potential conflicts.

alex-sandercock and others added 8 commits May 19, 2025 09:13
Updated funding source and note about BIGr development.
…atches

When add_others = TRUE, compare() computed other_ref_base/other_alt_base with
substring() before checking that any mismatch positions remained. If an off-target
("Other") allele aligns to the reference with its only mismatch at the target SNP
position, that position is removed and pos_ref_idx/pos_alt_idx become integer(0),
so substring() errors with "invalid substring arguments" and the whole run aborts.

Move the two substring() calls inside the existing 'if (length(pos_ref_idx) > 0)'
guard, mirroring how the off-target Match alleles are already handled. Behavior is
unchanged when mismatch positions remain; existing madc2vcf_all tests still pass.

Copilot AI 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 PR streamlines the BIGr R package by removing several legacy/public pedigree-parentage and polyploid breed-composition functions (and their tests/docs), cleaning up dependencies/metadata, and hardening VCF POS handling in madc2vcf_* outputs to avoid scientific notation and invalid/negative coordinates.

Changes:

  • Enforces integer, non-negative VCF POS values and drops records with invalid POS in madc2vcf_targets() and madc2vcf_all().
  • Removes unused/unmaintained exported functions (validate_pedigree, find_parentage, check_ped, allele_freq_poly, solve_composition_poly) plus associated tests and man pages.
  • Updates DESCRIPTION/NAMESPACE to reflect current dependencies/exports and bumps package version.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
DESCRIPTION Updates package metadata, dependency lists, and version.
NAMESPACE Removes exports/imports for deleted legacy functions and prunes unused imports.
R/madc2vcf_all.R Normalizes/sanitizes POS (numeric parse, drop invalid, stable sort, format as integer).
R/madc2vcf_targets.R Normalizes/sanitizes POS (numeric parse, drop invalid, stable sort, format as integer) and adds setNames import.
R/breedtools_functions.R Removes legacy breedTools polyploid composition utilities.
R/check_ped.R Removes legacy pedigree QC/correction utility.
R/find_parentage.R Removes legacy parentage assignment utility.
R/validate_pedigree.R Removes legacy trio validation utility.
dev/dev_history.R Adjusts dev workflow script (now executes attachment::att_amend_desc()).
man/allele_freq_poly.Rd Removes documentation for deleted exported function.
man/check_ped.Rd Removes documentation for deleted exported function.
man/find_parentage.Rd Removes documentation for deleted exported function.
man/solve_composition_poly.Rd Removes documentation for deleted exported function.
man/validate_pedigree.Rd Removes documentation for deleted exported function.
tests/testthat/test-breedtools_poly.R Removes tests for deleted breedTools functions.
tests/testthat/test-check_ped.R Removes tests for deleted check_ped().
tests/testthat/test-find_parentage.R Removes tests for deleted find_parentage().
tests/testthat/test-validate_pedigree.R Removes tests for deleted validate_pedigree().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread DESCRIPTION
comment = "Breeding Insight"))
Title: Breeding Insight Genomics Functions for Polyploid and Diploid
Species
Version: 0.8.1
Comment thread dev/dev_history.R
# Update dependencies in DESCRIPTION
# install.packages('attachment', repos = 'https://thinkr-open.r-universe.dev')
#attachment::att_amend_desc()
attachment::att_amend_desc()
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.11%. Comparing base (7ae6e3d) to head (82e1cb3).
⚠️ Report is 33 commits behind head on development.

Files with missing lines Patch % Lines
R/madc2vcf_all.R 54.54% 5 Missing ⚠️
R/madc2vcf_targets.R 66.66% 3 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development      #66      +/-   ##
===============================================
- Coverage        81.87%   81.11%   -0.77%     
===============================================
  Files               23       19       -4     
  Lines             2886     2277     -609     
===============================================
- Hits              2363     1847     -516     
+ Misses             523      430      -93     

☔ View full report in Codecov by Harness.
📢 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.

…tring

Fix madc2vcf_all() "invalid substring arguments" error on off-target alleles
@Cristianetaniguti Cristianetaniguti merged commit 4c9a725 into development Jul 2, 2026
4 of 6 checks passed
@Cristianetaniguti Cristianetaniguti removed the in_progress not ready to merge label Jul 2, 2026
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.

4 participants