-
Notifications
You must be signed in to change notification settings - Fork 596
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
Making ingest work on gvcfs without allele specific annotations #6934
Conversation
ff0868c
to
c4a740a
Compare
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 changes
if(!out.endsWith("|0.00")) { | ||
logger.warn("Expected AS_RAW_MQ value to end in |0.00. value is: " + out + " for variant " + variant.toString()); | ||
} | ||
out = out.substring(0, out.length() - 5); |
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.
we need to replace the line above with this since we might have actual data in the last field:
out = out.substring(0, out.lastIndexOf("|"));
String out = getAttribute(variant, GATKVCFConstants.AS_RAW_READ_POS_RANK_SUM_KEY, ""); | ||
if (out.contentEquals("||") || out.contentEquals("|||") ) { | ||
String out = getAttribute(variant, GATKVCFConstants.AS_RAW_READ_POS_RANK_SUM_KEY, null); | ||
if (out == null || out.contentEquals("||") || out.contentEquals("|||") ) { | ||
out = " "; // TODO is this better than 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 didn't notice before that we were setting this to a space (here and for MQRankSum). for PTG and PID we use the empty string if we don't have a value. can we change these to the empty string too?
String[] outValues = out.split("\\|"); | ||
out = Arrays | ||
.stream(outValues) | ||
.map(val -> val.endsWith(".00") ? val.substring(0, val.length() - 3) : val) |
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.
formatting nit - the 5 lines above should be tabbed out one level
This is a first pass, but at the very least hopefully won't blow up on older data (that has been reblocked). I'm currently leaving the raw rank sum values blank if they don't exist in the input. This means the data will look smaller than a real allele specific gvcf, but I didn't know how to fake those values from the data we have in the non-allele specific gvcf.