-
Notifications
You must be signed in to change notification settings - Fork 593
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
Changed referenceBases to silently fail and emit a single warning if there is no reference #3299
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3299 +/- ##
===============================================
+ Coverage 80.366% 80.374% +0.008%
- Complexity 17666 17673 +7
===============================================
Files 1178 1179 +1
Lines 63864 63880 +16
Branches 9930 9930
===============================================
+ Hits 51325 51343 +18
+ Misses 8584 8582 -2
Partials 3955 3955
|
@Override | ||
public List<String> getKeyNames() { return Collections.singletonList(REFERENCE_BASES_KEY); } | ||
|
||
@Override | ||
public Map<String, Object> annotate(final ReferenceContext ref, | ||
final VariantContext vc, | ||
final ReadLikelihoods<Allele> likelihoods) { | ||
|
||
if (ref==null) { |
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 though that #2799 suggest to throw an UserException
, which actually makes sense if the user provides an annotation that couldn't be apply because the requirements are not met...
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.
The warning seems good for now, and consistent with existing behavior in the annotation classes -- we can open a separate ticket to discuss whether there should be a mode in which GATK throws in these cases.
…exsist and added a one time logger functionality
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.
One minor comment, then good to merge 👍
* A logger wrapper class which only outputs the first warning provided to it | ||
*/ | ||
public class OneShotLogger { | ||
Logger logger; |
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.
Mark as @VisibleForTesting
@Override | ||
public List<String> getKeyNames() { return Collections.singletonList(REFERENCE_BASES_KEY); } | ||
|
||
@Override | ||
public Map<String, Object> annotate(final ReferenceContext ref, | ||
final VariantContext vc, | ||
final ReadLikelihoods<Allele> likelihoods) { | ||
|
||
if (ref==null) { |
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.
The warning seems good for now, and consistent with existing behavior in the annotation classes -- we can open a separate ticket to discuss whether there should be a mode in which GATK throws in these cases.
cb96125
to
55f2208
Compare
No description provided.