Skip to content

two methods for Genotype: HasRefAllele HasAltAllele#1678

Merged
lbergelson merged 1 commit intosamtools:masterfrom
lindenb:pl_genotype
Aug 8, 2023
Merged

two methods for Genotype: HasRefAllele HasAltAllele#1678
lbergelson merged 1 commit intosamtools:masterfrom
lindenb:pl_genotype

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.

/**
* @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
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