Uh oh!
There was an error while loading. Please reload this page.
CRAN Prep - #31
Conversation
There was a problem hiding this comment.
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
| File | Description |
|---|---|
| tests/testthat/test-capture_diversity.Gmat.R | Entire test file removed; potential impact on test coverage. |
| man/*.Rd | Removal and update of manual documents and corrections in spelling. |
| R/updog2vcf.R | Adjusted data.frame calls with added check.names parameters. |
| NAMESPACE | Removed exports for several functions to mark them as internal. |
| DESCRIPTION, README, dev/dev_history.R | Version 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)
| 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) |
There was a problem hiding this comment.
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).
Codecov ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
| File | Description |
|---|---|
| tests/testthat/test-capture_diversity.Gmat.R | Entire 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.R | Minor code and documentation adjustments (e.g., added check.names=FALSE). |
| NAMESPACE, DESCRIPTION | Updated export status and version; review naming consistency. |
| README.md, dev/dev_history.R | Adjusted links, version bump, and added CRAN-related content. |
| WORDLIST | Added 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)
There was a problem hiding this comment.
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
| File | Description |
|---|---|
| inst/WORDLIST | Added marker identifiers; note potential case and naming issues |
| dev/dev_history.R | New CRAN-prep script commands for dependency, testing, and checks |
| cran-comments.md | Added CRAN check summary comments |
| README.md | Updated badge URLs and citation details |
| R/updog2vcf.R | Enhanced examples and file writing implementation |
| R/madc2vcf.R | Minor update: added utils::write.table import |
| R/get_countsMADC.R | Expanded examples for clarity |
| R/get_OffTargets.R | Corrected parameter descriptions |
| R/flip_dosage.R | Added practical examples for dosage flipping |
| R/filterVCF.R | Updated example usage for improved usability |
| R/dosage_ratios.R | Added examples and basic column check in ratio computation |
| R/dosage2vcf.R | Revised example with temporary file usage |
| R/check_ped.R | Fixed spelling in comments and updated examples |
| R/capture_diversity.Gmat.R | Removed from export (deletion appears intentional) |
| R/calculate_MAF.R | Added detailed examples |
| R/calculate_Het.R | Added detailed examples |
| R/breedtools_functions.R | Changed export tags to @nord to mark internal usage |
| NAMESPACE | Updated exports and imports to match revised function statuses |
| DESCRIPTION | Updated 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
| 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 |
There was a problem hiding this comment.
[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.
| 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).") |
Formatting BIGr for submission to CRAN: