Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small functionality patches to strand flip checks, dosage calculator, automated statistics #70

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

alkaZeltser
Copy link
Collaborator

@alkaZeltser alkaZeltser commented Feb 18, 2025

Updates to strand flip checker functionality when handling INDELs: mark INDEL effect switches as "effect _switch"
Updates to dosage calculator to handle hemizygous genotypes: single alleles added to allowed allele format list, single alleles evaluated with haploid dosage (+ unit tests).
Updates to apply.polygenic.score to more carefully filter data for statistical analyses.

Update version to 3.0.1 (no breaking changes)

  • I have read the code review guidelines and the code review best practice on GitHub check-list.

  • The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)-[brief_description_of_branch].

  • I have set up or verified the branch protection rule following the github standards before opening this pull request.

  • I have added the changes included in this pull request to NEWS under the next release version or unreleased, and updated the date.

  • I have updated the version number in metadata.yaml and DESCRIPTION.

  • Both R CMD build and R CMD check run successfully.

Closes #...

Testing Results

All unit tests pass.

@@ -31,12 +31,16 @@ convert.alleles.to.pgs.dosage <- function(called.alleles, risk.alleles) {
} else {
# check that called.alleles is a vector of genotypes in allelic notation or '.' separated by a slash or pipe
# "*" characters represent overlapping deletions from an upstream indel and are accepted VCF format
allowed.pattern <- '^((([A-Z]+|\\.|\\*)[/\\|]([A-Z]+|\\.|\\*))|\\.)$' # '|' are special chars in regular expressions
allowed.pattern <- '^((([A-Z]+|\\.|\\*)[/\\|]([A-Z]+|\\.|\\*))|\\.|[A-Z]+)$' # '|' are special chars in regular expressions

Choose a reason for hiding this comment

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

You have some comments here about what individual characters mean. Is it possible to include an entire example? I think it would be helpful for interpretation.

Copy link

@forbiddenpersimmon forbiddenpersimmon left a comment

Choose a reason for hiding this comment

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

Left a comment for you to think about, but otherwise LGTM!

Sign up for free to 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.

2 participants