imported BIGr files to keep#1
Closed
josuechinchilla wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR appears to import and reintroduce a set of BIGr-style genomic/pedigree utilities into the popreviewR R package, including new parentage/pedigree validation functions, associated documentation, bundled example datasets, and testthat coverage.
Changes:
- Added new exported analysis functions (
validate_pedigree(),find_parentage(),check_ped(), BreedTools polyploid helpers) plus utilities. - Added extensive
testthatcoverage and test fixtures underinst/. - Added/updated package scaffolding (README, NAMESPACE, man pages, NEWS, licensing, CRAN artifacts).
Reviewed changes
Copilot reviewed 41 out of 52 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test-validate_pedigree.R | Adds test coverage for validate_pedigree() across statuses/outputs. |
| tests/testthat/test-find_parentage.R | Adds test coverage for find_parentage() methods and edge cases. |
| tests/testthat/test-check_ped.R | Adds test coverage for check_ped() using an included pedigree fixture. |
| tests/testthat/test-breedtools_poly.R | Adds test coverage for allele_freq_poly() / solve_composition_poly() using included fixtures. |
| tests/testthat/.gitignore | Ignores corrected_pedigree.txt generated during tests. |
| tests/testthat.R | Registers test runner for the package. |
| README.md | Adds badges and installation/citation guidance. |
| R/validate_pedigree.R | Implements trio validation + correction recommendations and corrected pedigree output. |
| R/utils.R | Adds globalVariables(), vmsg(), and url_exists() helpers. |
| R/find_parentage.R | Implements parentage assignment methods (best pair / best match). |
| R/check_ped.R | Implements pedigree QC/correction checks (duplicates, missing parents, cycles, etc.). |
| R/breedtools_functions.R | Adds BreedTools-derived polyploid frequency/composition utilities. |
| popreviewR.Rproj | Adds RStudio project file. |
| NEWS.md | Adds changelog content (currently BIGr-branded). |
| NAMESPACE | Exports/imports for newly added functions. |
| man/validate_pedigree.Rd | Generated docs for validate_pedigree(). |
| man/solve_composition_poly.Rd | Generated docs for solve_composition_poly(). |
| man/find_parentage.Rd | Generated docs for find_parentage(). |
| man/check_ped.Rd | Generated docs for check_ped(). |
| man/allele_freq_poly.Rd | Generated docs for allele_freq_poly(). |
| LICENSE | Adds Apache 2.0 license text. |
| inst/WORDLIST | Adds spelling whitelist for package spell checks. |
| inst/test_test.txt | Adds BreedTools validation genotype fixture. |
| inst/test_ref.txt | Adds BreedTools reference genotype fixture. |
| inst/REFERENCES.bib | Adds bibliography file (currently invalid RTF export). |
| inst/ref_ids.txt | Adds BreedTools reference IDs fixture. |
| inst/iris_DArT_Counts_small.csv | Adds DArT counts example fixture. |
| inst/iris_DArT_Allele_Dose_Report_small.csv | Adds DArT allele dose report example fixture. |
| inst/imputation_test.txt | Adds imputation test genotype fixture. |
| inst/imputation_reference.txt | Adds imputation reference genotype fixture. |
| inst/imputation_ignore.txt | Adds imputation ignore list fixture. |
| inst/example_SNPs_DArTag-probe-design_f180bp.botloci | Adds botloci example fixture. |
| inst/example_MADC_to_merge.csv | Adds MADC merge example fixture. |
| inst/example_MADC_FixedAlleleID.csv | Adds fixed AlleleID MADC example fixture. |
| inst/CITATION | Adds package citation metadata (currently BIGr-branded). |
| inst/check_ped_test.txt | Adds check_ped() test pedigree fixture. |
| dev/dev_history.R | Adds CRAN/release workflow notes. |
| DESCRIPTION | Adds package metadata and dependencies (currently BIGr-branded in several fields). |
| CRAN-SUBMISSION | Adds CRAN submission metadata (version currently mismatched). |
| cran-comments.md | Adds CRAN comments (currently references BIGr resubmission context). |
| .gitignore | Adds common R/RStudio ignores. |
Comments suppressed due to low confidence (1)
cran-comments.md:12
cran-comments.mddescribes a resubmission/update release related to Unicode punctuation in Rd output, but the package metadata here indicates a newpopreviewRpackage at version0.1.0. If this repo is no longer the BIGr resubmission, these CRAN comments are likely stale/misleading.
## Resubmission
This is a resubmission. I replaced Unicode punctuation in Rd-generated
documentation, including the Unicode minus sign (U+2212) that caused the CRAN
PDF manual build failure.
* This is an update release.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+4
| library(testthat) | ||
| library(BIGr) | ||
|
|
||
| test_check("BIGr") |
Comment on lines
+5
to
+8
| #Input variables | ||
| ped_file <- system.file("check_ped_test.txt", package="BIGr") | ||
| temp_ped <- tempfile("check_ped_test_", fileext = ".txt") | ||
| file.copy(ped_file, temp_ped) |
Comment on lines
+5
to
+9
| #Input variables | ||
| ref_file <- system.file("test_ref.txt", package="BIGr") | ||
| val_file <- system.file("test_test.txt", package="BIGr") | ||
| ref_ids <- system.file("ref_ids.txt", package="BIGr") | ||
|
|
Comment on lines
+29
to
+31
| License: Apache License (>= 2) | ||
| URL: https://github.com/Breeding-Insight/BIGr | ||
| BugReports: https://github.com/Breeding-Insight/BIGr/issues |
Comment on lines
+18
to
+23
| Description: Functions developed within Breeding Insight to analyze | ||
| diploid and polyploid breeding and genetic data. 'BIGr' provides the | ||
| ability to filter variant call format (VCF) files, extract single nucleotide polymorphisms (SNPs) | ||
| from diversity arrays technology missing allele discovery count (DArT MADC) files, | ||
| and manipulate genotype data for both diploid and polyploid species. It | ||
| also serves as the core dependency for the 'BIGapp' 'Shiny' app, which |
Comment on lines
+145
to
+147
| best_idx <- base::which.min(errors) | ||
| base::list(id = candidates[best_idx], | ||
| error_pct = base::round(errors[best_idx], 2)) |
Comment on lines
+357
to
+360
| tryCatch({ | ||
| data.table::fwrite(corrected_pedigree, file = "corrected_pedigree.txt", | ||
| sep = "\t", quote = FALSE) | ||
| if (verbose) base::cat("Corrected pedigree written to: corrected_pedigree.txt\n") |
Comment on lines
+10
to
+17
| make_files <- function(genos, parents, progeny, dir = tempdir()) { | ||
| geno_file <- file.path(dir, paste0("genos_", sample(1e6,1), ".txt")) | ||
| parent_file <- file.path(dir, paste0("parents_", sample(1e6,1), ".txt")) | ||
| progeny_file <- file.path(dir, paste0("progeny_", sample(1e6,1), ".txt")) | ||
| data.table::fwrite(genos, geno_file, sep = "\t") | ||
| data.table::fwrite(parents, parent_file, sep = "\t") | ||
| data.table::fwrite(progeny, progeny_file, sep = "\t") | ||
| list(g = geno_file, p = parent_file, pr = progeny_file) |
Comment on lines
+31
to
+34
| #' @examples | ||
| #' ped_file <- system.file("check_ped_test.txt", package = "BIGr") | ||
| #' ped_errors <- check_ped(ped.file = ped_file, seed = 101919, verbose = FALSE) | ||
| #' |
Comment on lines
+1
to
+8
| # BIGr 0.7.2 | ||
|
|
||
| - Fixed manual text errors | ||
|
|
||
| # BIGr 0.7.1 | ||
|
|
||
| - Updated `check_ped()` to return corrected pedigree data in the result list instead of assigning objects to the global environment | ||
| - Skipped long remote `madc2vcf_all` integration tests on CRAN while keeping them enabled in GitHub Actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.