-
Notifications
You must be signed in to change notification settings - Fork 597
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
Add warning message to add allele specific annotation group #3042
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3042 +/- ##
==============================================
+ Coverage 86.679% 87.089% +0.41%
- Complexity 29668 31524 +1856
==============================================
Files 1819 1930 +111
Lines 137383 145236 +7853
Branches 15166 16096 +930
==============================================
+ Hits 119082 126485 +7403
- Misses 12822 12898 +76
- Partials 5479 5853 +374
|
// nothing to do | ||
//TODO This comes directly from gatk3, we should determine if we should log this or if it happens so much it is not useful to log | ||
final String baseMsg = "Remaining (non-reducible) annotations are assumed to be ints or doubles, but " + value + " doesn't parse and will not be annotated in the final VC."; | ||
final String msg = value.toString().contains("|") ? baseMsg + " Add -G Standard -G AS_Standard to the command to annotate in the final VC." : baseMsg; |
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.
From @droazen This seems like a pretty brittle way of detecting whether AS annotations are present...
@lbergelson please review |
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.
After #3475, conflicts are expected in the test classes, because they are now extending GATKBaseTest
- a rebase should solve most of the problems without need of change of the code (except comments below)
b9e5e7d
to
90cf70a
Compare
@droazen I updated this branch to the new code. I think its good but just want someone to quickly look at it before t goes in. |
@lbergelson Could you take a quick look at this one? I just updated it to be in line with the changes I've made to our annotaiton framework. |
@@ -382,6 +385,7 @@ private void addReferenceConfidenceAttributes(final VCWithNewAlleles vcPair, fin | |||
values.add(parseNumber(value.toString())); | |||
} catch (final NumberFormatException e) { | |||
warning.warn(String.format("Detected invalid annotations: When trying to merge variant contexts at location %s:%d the annotation %s was not a numerical value and was ignored",vcPair.getVc().getContig(),vcPair.getVc().getStart(),p.toString())); | |||
if (key.startsWith("AS")) AS_warning.warn(String.format("Reducible annotation '%s' detected, add -G Standard -G AS_Standard to the command to annotate in the final VC with this annotation.",key)); |
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.
I always like {}
on if statements even for 1 liners...
@@ -255,4 +255,14 @@ public void testIntervalsAndOnlyOutputCallsStartingInIntervalsAreMutuallyRequire | |||
args.addArgument("L", "20:69512-69513"); | |||
runCommandLine(args); | |||
} | |||
|
|||
@Test | |||
public void testMissingAlleleSpecificAnnotationGroup() throws IOException { |
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 doesn't really test anything
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.
2 comments and then 👍 to go
90cf70a
to
731f80f
Compare
731f80f
to
3f7d9b8
Compare
@jamesemery Can you remove the non-functional test, and merge this once tests pass? |
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.
👍 merge once tests pass
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.
👍
Implements #2983.