Update updog2vcf#63
Merged
Merged
Conversation
Replaced separate with extract to parse SNP ID into CHROM and POS. Updated POS formatting to handle leading zeros.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates BIGr to v0.8.0 and revises updog2vcf() SNP-ID parsing to more robustly derive VCF CHROM/POS from SNP IDs.
Changes:
- Bump package version from 0.7.0 to 0.8.0.
- Update
updog2vcf()to parse SNP IDs using a regex-based split on the last underscore and normalize position formatting (leading zeros / empty position).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| R/updog2vcf.R | Changes SNP ID parsing logic for deriving VCF CHROM and POS. |
| DESCRIPTION | Bumps BIGr package version to 0.8.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+134
to
+137
| mutate( | ||
| POS = sub("^0+", "", POS), | ||
| POS = if_else(POS == "", "0", POS) | ||
| ) %>% |
Comment on lines
+129
to
+133
| extract( | ||
| snp, | ||
| into = c("CHROM", "POS"), | ||
| regex = "^(.*)_([^_]*)$" | ||
| ) %>% |
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 updates the
BIGrpackage to version 0.8.0 and improves the extraction and formatting of chromosome and position information from SNP IDs in theupdog2vcffunction. The most important changes are:Version update:
DESCRIPTIONfile to reflect new changes.VCF conversion improvements:
updog2vcf(R/updog2vcf.R) to useextract()with a regex for more robust separation of chromosome and position, and added logic to remove leading zeros from the position and handle empty positions by setting them to "0".