Dosage2vcf update#60
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands dosage2vcf to support additional DArT genotype report formats while updating documentation and tests around SNP/INDEL handling.
Changes:
- Refactors
dosage2vcfparsing/validation for Allele Dose, SNP/INDEL 1-row, and SNP/INDEL 2-row reports. - Adds synthetic test fixtures and tests for SNP/INDEL conversion behavior.
- Updates documentation and exports
validate_pedigree.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
R/dosage2vcf.R |
Adds report/count parsing helpers, SNP/INDEL genotype conversion, validation, and VCF formatting updates. |
tests/testthat/test-dosage2vcf.R |
Adds fixture writers and tests for SNP/INDEL report conversion and ploidy validation. |
man/dosage2vcf.Rd |
Updates generated documentation for supported report formats. |
NAMESPACE |
Exports validate_pedigree. |
Files not reviewed (1)
- man/dosage2vcf.Rd: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+272
to
+274
| is_snp_1row <- all(c("MarkerName", "AlleleSequenceRef", "AlleleSequenceAlt", "Variant") %in% names(raw)) | ||
| is_snp_2row <- all(c("MarkerName", "AlleleSequence", "Variant") %in% names(raw)) && | ||
| anyDuplicated(raw$MarkerName) > 0 |
Comment on lines
+490
to
+492
| alleles_df$AltCountsSum <- rowSums(alt_counts) | ||
| alleles_df$RefCountsSum <- rowSums(ref_counts) | ||
| alleles_df$TotalCountSum <- alleles_df$AltCountsSum + alleles_df$RefCountsSum |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #60 +/- ##
===============================================
+ Coverage 81.53% 81.87% +0.34%
===============================================
Files 23 23
Lines 2616 2886 +270
===============================================
+ Hits 2133 2363 +230
- Misses 483 523 +40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This pull request improves the documentation and testing of the
dosage2vcffunction, clarifying its support for different DArT genotype report formats and ensuring correct handling of SNP/INDEL reports. It also adds comprehensive tests to verify the function's behavior with various input formats and edge cases.Documentation updates:
.Rddocumentation thatdosage2vcfsupports both Allele Dose Reports and SNP/INDEL genotype reports, and described how these formats are interpreted and mapped to VCF genotype codes. [1] [2]Testing improvements:
test-dosage2vcf.Rto generate synthetic DArT report and count fixtures for different scenarios, enabling robust and reusable test setups.Namespace update:
validate_pedigreefunction in theNAMESPACEfile.