-
Notifications
You must be signed in to change notification settings - Fork 242
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
Simple sv alt allele #1192
Simple sv alt allele #1192
Conversation
@droazen please review. |
@SHuang-Broad Yes, I just needed the constants. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Back to @SHuang-Broad with a couple of comments.
@@ -200,6 +200,11 @@ protected Allele(final Allele allele, final boolean ignoreRefState) { | |||
public final static Allele NO_CALL = new Allele(NO_CALL_STRING, false); | |||
public final static Allele NON_REF_ALLELE = new Allele(NON_REF_STRING, false); | |||
|
|||
public final static Allele SV_SIMPLE_DEL = new Allele(createBracketedSymbAlleleString(StructuralVariantType.DEL), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just call toSymbolicAltAllele()
on the enum values directly, and get rid of createBracketedSymbAlleleString()
?
public final static Allele SV_SIMPLE_INS = new Allele(createBracketedSymbAlleleString(StructuralVariantType.INS), false); | ||
public final static Allele SV_SIMPLE_INV = new Allele(createBracketedSymbAlleleString(StructuralVariantType.INV), false); | ||
public final static Allele SV_SIMPLE_CNV = new Allele(createBracketedSymbAlleleString(StructuralVariantType.CNV), false); | ||
public final static Allele SV_SIMPLE_DUP = new Allele(createBracketedSymbAlleleString(StructuralVariantType.DUP), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment above each SV allele declaration, describing what kind of variant it represents?
Codecov Report
@@ Coverage Diff @@
## master #1192 +/- ##
===============================================
+ Coverage 68.406% 68.408% +0.002%
- Complexity 8017 8018 +1
===============================================
Files 542 542
Lines 32693 32701 +8
Branches 5530 5530
===============================================
+ Hits 22364 22370 +6
- Misses 8126 8127 +1
- Partials 2203 2204 +1
|
@droazen please review again. |
@@ -200,6 +199,16 @@ protected Allele(final Allele allele, final boolean ignoreRefState) { | |||
public final static Allele NO_CALL = new Allele(NO_CALL_STRING, false); | |||
public final static Allele NON_REF_ALLELE = new Allele(NON_REF_STRING, false); | |||
|
|||
// for simple deletion, e.g. "ALT==<DEL>" (not that the spec allows, for now at least, alt alleles like <DEL:ME>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for myself: "not" -> "note"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SHuang-Broad Back to you with a few more comments.
@@ -200,6 +199,16 @@ protected Allele(final Allele allele, final boolean ignoreRefState) { | |||
public final static Allele NO_CALL = new Allele(NO_CALL_STRING, false); | |||
public final static Allele NON_REF_ALLELE = new Allele(NON_REF_STRING, false); | |||
|
|||
// for simple deletion, e.g. "ALT==<DEL>" (not that the spec allows, for now at least, alt alleles like <DEL:ME>) | |||
public final static Allele SV_SIMPLE_DEL = new Allele(StructuralVariantType.DEL.toSymbolicAltAllele(), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just write public final static Allele SV_SIMPLE_DEL = StructuralVariantType.DEL.toSymbolicAltAllele();
here? (and similarly below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opps. Went to quick at that. Yes you are right!
* @throws UnsupportedOperationException if this is invoked on a {@link #BND} object | ||
*/ | ||
Allele toSymbolicAltAllele() { | ||
if (this.equals(StructuralVariantType.BND)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add curly braces around if statement body.
c697223
to
7397272
Compare
@droazen I've squashed all commits into a single one. |
👍 looks good to me -- @lbergelson can you merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine.
Description
Simple alt allele constants for SV.
Two implementations, not sure which one is preferred.
Checklist