Skip to content

CRAN Prep - #31

Merged
alex-sandercock merged 28 commits into
developmentfrom
Updates
May 12, 2025
Merged

CRAN Prep#31
alex-sandercock merged 28 commits into
developmentfrom
Updates

Conversation

@alex-sandercock

Copy link
Copy Markdown
Collaborator

Formatting BIGr for submission to CRAN:

  • Update function examples
  • address check() notes
  • update function names

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 PR prepares BIGr for CRAN submission by updating function examples, addressing check() notes, and internalizing some function names. Key changes include removal of autogenerated manual files, adjustments in documentation and function export settings, and updates to code for consistency with CRAN standards.

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
tests/testthat/test-capture_diversity.Gmat.REntire test file removed; potential impact on test coverage.
man/*.RdRemoval and update of manual documents and corrections in spelling.
R/updog2vcf.RAdjusted data.frame calls with added check.names parameters.
NAMESPACERemoved exports for several functions to mark them as internal.
DESCRIPTION, README, dev/dev_history.RVersion and metadata updates for CRAN compliance.
Comments suppressed due to low confidence (2)

tests/testthat/test-capture_diversity.Gmat.R:1

  • Removing the test file may reduce test coverage for capture_diversity.Gmat functionality. Please ensure equivalent tests exist elsewhere if this removal is intentional.
Entire file removed

NAMESPACE:2

  • [nitpick] Ensure that the removal of these exported functions is intentional for internal API design. If these functions are meant to be used externally, update their export settings and accompanying documentation accordingly.
Removed exports: export(allele_freq_poly), export(capture_diversity.Gmat), export(solve_composition_poly)

Comment threadR/updog2vcf.R Outdated
Comment on lines +69 to +72
return(data.frame(ref = x[2], size = x[3]), check.names = FALSE)
else if(grepl("p2", x[7]))
return(data.frame(ref = x[4], size = x[5]))
else return(data.frame(ref = NA, size = NA))
return(data.frame(ref = x[4], size = x[5]), check.names = FALSE)
else return(data.frame(ref = NA, size = NA), check.names=FALSE)

CopilotAIMay 9, 2025

Copy link

Choose a reason for hiding this comment

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

The argument 'check.names = FALSE' is passed outside the data.frame() call. To properly disable name checking, include it inside the data.frame() call like data.frame(ref = x[2], size = x[3], check.names = FALSE).

Copilot uses AI. Check for mistakes.
@codecov

codecovBot commented May 9, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 67.61905% with 34 lines in your changes missing coverage. Please review.

Project coverage is 85.03%. Comparing base (262b701) to head (b4830a6).
Report is 40 commits behind head on development.

Files with missing linesPatch %Lines
R/utils.R11.76%15 Missing ⚠️
R/madc2vcf_all.R75.00%12 Missing ⚠️
R/updog2vcf.R75.00%4 Missing ⚠️
R/madc2vcf_targets.R85.00%3 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## development #31 +/- ##
================================================
+ Coverage 54.26% 85.03% +30.76% 
================================================
Files 17 16 -1 Lines 1148 1136 -12 ================================================
+ Hits 623 966 +343 + Misses 525 170 -355 

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

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 PR prepares the package for CRAN submission by updating documentation, examples, and function annotations. Key changes include:

  • Removal and updates of several Rd documentation files and test files.
  • Minor text and typographical corrections in documentation (e.g., “nnumerical” → “numerical”, “granchild” → “grandchild”).
  • Changes to export status and version bumps in DESCRIPTION and NAMESPACE.

Reviewed Changes

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

Show a summary per file
FileDescription
tests/testthat/test-capture_diversity.Gmat.REntire removal of a test file; verify if test coverage is maintained.
man/*Removal of specific Rd documentation files to streamline CRAN review.
R/updog2vcf.R, R/madc2vcf.R, R/get_OffTargets.RMinor code and documentation adjustments (e.g., added check.names=FALSE).
NAMESPACE, DESCRIPTIONUpdated export status and version; review naming consistency.
README.md, dev/dev_history.RAdjusted links, version bump, and added CRAN-related content.
WORDLISTAdded new keywords.
Comments suppressed due to low confidence (3)

tests/testthat/test-capture_diversity.Gmat.R:1

  • The removal of this test file may reduce test coverage for the capture_diversity.Gmat functionality. Please confirm that this is intentional or that the tests have been migrated accordingly.
Entire file removal

DESCRIPTION:1

  • [nitpick] Ensure consistent spelling for 'polyploid' across the package; consider changing 'Polypoid' in the title to 'Polyploid' if that is the standard usage.
Title: Breeding Insight Genomics Functions for Polypoid and Diploid Species

NAMESPACE:1

  • Changing the export status of these key functions may break the API for users who rely on them. Please confirm that these functions are intended for internal use only.
Removed export(allele_freq_poly) and export(solve_composition_poly)

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 PR prepares the BIGr package for CRAN submission by updating function examples, addressing check() notes, and standardizing function names.

  • Updated examples and documentation in several R scripts to improve clarity.
  • Revised internal function exports and dependency declarations, and updated package metadata for CRAN.
  • Added and modified files such as WORDLIST, dev history, README, and multiple R source files to support these changes.

Reviewed Changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
inst/WORDLISTAdded marker identifiers; note potential case and naming issues
dev/dev_history.RNew CRAN-prep script commands for dependency, testing, and checks
cran-comments.mdAdded CRAN check summary comments
README.mdUpdated badge URLs and citation details
R/updog2vcf.REnhanced examples and file writing implementation
R/madc2vcf.RMinor update: added utils::write.table import
R/get_countsMADC.RExpanded examples for clarity
R/get_OffTargets.RCorrected parameter descriptions
R/flip_dosage.RAdded practical examples for dosage flipping
R/filterVCF.RUpdated example usage for improved usability
R/dosage_ratios.RAdded examples and basic column check in ratio computation
R/dosage2vcf.RRevised example with temporary file usage
R/check_ped.RFixed spelling in comments and updated examples
R/capture_diversity.Gmat.RRemoved from export (deletion appears intentional)
R/calculate_MAF.RAdded detailed examples
R/calculate_Het.RAdded detailed examples
R/breedtools_functions.RChanged export tags to @nord to mark internal usage
NAMESPACEUpdated exports and imports to match revised function statuses
DESCRIPTIONUpdated title, version, and description to reflect recent changes
Comments suppressed due to low confidence (4)

inst/WORDLIST:26

  • [nitpick] There are marker names with different cases (e.g., 'Heterozygosity' on line 9 and 'heterozygosity' on line 26). Consider standardizing the case to avoid potential confusion.
26 +heterozygosity

inst/WORDLIST:11

  • [nitpick] The identifier 'MADCs' conflicts with the singular 'MADC' listed on the previous line. Use consistent naming conventions for marker identifiers.
11 +MADCs

R/updog2vcf.R:220

  • [nitpick] Verify that 'overwrite = FALSE' is the intended behavior for bgzip, as it may prevent file updates if the destination file already exists.
220 + Rsamtools::bgzip(temp_loc, dest = paste0(output.file,".gz"), overwrite = FALSE)

R/breedtools_functions.R:35

  • [nitpick] Marking functions as internal with @nord is appropriate; ensure that these internal functions include sufficient inline comments for maintainability within the package.
35 +#' @noRd

Comment threadR/dosage_ratios.R
percentages_df <- as.data.frame(t(percentages))
expected_colnames <- as.character(0:ploidy)
if(ncol(percentages_df) == length(expected_colnames)) { # Basic check
colnames(percentages_df) <- expected_colnames

CopilotAIMay 9, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] When renaming columns with expected_colnames in the dosage_ratios function, consider adding an else branch or warning to handle cases where the number of columns does not match ploidy + 1.

Suggested change
colnames(percentages_df) <-expected_colnames
colnames(percentages_df) <-expected_colnames
} else {
warning("The number of columns in the percentages data frame does not match the expected number (ploidy + 1).")

Copilot uses AI. Check for mistakes.
@alex-sandercock
alex-sandercock merged commit 60088c4 into developmentMay 12, 2025
@alex-sandercock
alex-sandercock deleted the Updates branch May 12, 2025 15:42
Sign up for freeto 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.

3 participants

@alex-sandercock@Cristianetaniguti