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

two methods for Genotype: HasRefAllele HasAltAllele #1678

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

lindenb
Copy link
Contributor

@lindenb lindenb commented Aug 4, 2023

Description

I wrote two new functions for Genotype : hasAltAllele and testHasRefAllele because I often need to detect whether an ALT allele (or a REF) is present in a Genotype whatever is the genotype ploidy

I also copied a javadoc from SimpleAllele to Allele.

Things to think about before submitting:

  • Make sure your changes compile and new tests pass locally.
  • Add new tests or update existing ones:
    • A bug fix should include a test that previously would have failed and passes now.
    • New features should come with new tests that exercise and validate the new functionality.
  • Extended the README / documentation, if necessary
  • Check your code style.
  • Write a clear commit title and message
    • The commit message should describe what changed and is targeted at htsjdk developers
    • Breaking changes should be mentioned in the commit message.

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

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

@lindenb This looks good to me. Thank you.

@@ -431,5 +431,8 @@ static boolean oneIsPrefixOfOther(final Allele a1, final Allele a2) {

int length();

/**
* @return true if Allele is either {@code <NON_REF>} or {@code <*>}
*/
boolean isNonRefAllele();
Copy link
Member

Choose a reason for hiding this comment

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

Good call. This method is very confusingly named.

@lbergelson lbergelson merged commit 1e5ec5a into samtools:master Aug 8, 2023
4 checks passed
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