Skip to content

CRAN Updates - #35

Merged
alex-sandercock merged 53 commits into
mainfrom
development
May 19, 2025
Merged

CRAN Updates#35
alex-sandercock merged 53 commits into
mainfrom
development

Conversation

@alex-sandercock

Copy link
Copy Markdown
Collaborator

Function updates and bug fixes in preparation for submission to CRAN

@alex-sandercockalex-sandercock self-assigned this May 15, 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 PR focuses on function updates, documentation improvements, and bug fixes in preparation for the CRAN submission. Key changes include improved messaging in functions (using message() in place of cat()), enhanced error handling (especially in functions recovering reference/alternative alleles), and updates to documentation and examples.

  • Updated function documentation and examples across several R scripts.
  • Replaced cat() calls with message() for consistency in user feedback.
  • Refactored error handling in functions such as add_ref_alt and check_ped.

Reviewed Changes

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

Show a summary per file
FileDescription
R/relationship_qc.RUpdated documentation and messaging style in trio relationship QC functions.
R/merge_MADCs.REnhanced function documentation with added return details.
R/madc2vcf_targets.RRenamed function and added necessary parameter validation for botloci file.
R/madc2vcf_all.RExtended examples, added alignment_score_thr parameter, and updated warnings.
R/imputation_concordance.RReplaced cat() with message() for improved console output.
R/get_countsMADC.RUpdated messaging for missing data ratio while enhancing code clarity.
R/filterVCF.RReplaced cat() with message() and standardized filtering feedback.
R/dosage_ratios.RAdded a basic check to ensure expected column names for dosage percentage data.
R/dosage2vcf.RUpdated messaging and file handling in VCF creation function.
R/check_ped.RAdded optional seed and verbose option; updated error reporting in pedigree check.
NAMESPACE, DESCRIPTION, NEWS.md, .Rbuildignore, CRAN-SUBMISSIONUpdated version details and CRAN submission metadata.

Comment threadR/madc2vcf_all.R
new_rows[[length(new_rows) + 1]] <- empty_allele
} else {
if (verbose) {
warning("Ref_0001 sequence not found in hap_seq and not present in one_tag. Removing tag:", cloneID)

CopilotAIMay 15, 2025

Copy link

Choose a reason for hiding this comment

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

Warning messages in the add_ref_alt function are currently constructed by passing multiple arguments to warning(). To ensure the warning output is a single string, consider using paste() or paste0() to concatenate the message and the tag identifier.

Suggested change
warning("Ref_0001 sequence not found in hap_seq and not present in one_tag. Removing tag:", cloneID)
warning(paste0("Ref_0001 sequence not found in hap_seq and not present in one_tag. Removing tag:", cloneID))

Copilot uses AI. Check for mistakes.
Comment threadR/check_ped.R
cat("Dependencies found:\n")
for (error in unique(errors)) {
cat(error, "\n")
if (nrow(errors) > 0) {

CopilotAIMay 15, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Ensure that the variable 'errors' is always defined and consistently converted to a data.frame before using nrow() for dependency checks. This will improve clarity and avoid potential type mismatches in future modifications.

Suggested change
if (nrow(errors) >0) {
if (nrow(as.data.frame(errors))>0) {# Ensure errors is treated as a data.frame

Copilot uses AI. Check for mistakes.
@codecov

codecovBot commented May 15, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 63.52201% with 58 lines in your changes missing coverage. Please review.

Project coverage is 84.13%. Comparing base (e0fe2b8) to head (297f058).

Files with missing linesPatch %Lines
R/check_ped.R36.00%16 Missing ⚠️
R/madc2vcf_all.R72.72%15 Missing ⚠️
R/utils.R11.76%15 Missing ⚠️
R/filterVCF.R69.23%4 Missing ⚠️
R/updog2vcf.R75.00%4 Missing ⚠️
R/madc2vcf_targets.R85.00%3 Missing ⚠️
R/imputation_concordance.R0.00%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #35 +/- ##
==========================================
+ Coverage 83.36% 84.13% +0.77% 
==========================================
Files 17 16 -1 Lines 1148 1147 -1 ==========================================
+ Hits 957 965 +8 + Misses 191 182 -9 

☔ 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-sandercock
alex-sandercock merged commit 904ec45 into mainMay 19, 2025
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