Skip to content
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

Merged
merged 3 commits into from
Nov 3, 2020

Conversation

meganshand
Copy link
Contributor

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.

Copy link
Contributor

@ahaessly ahaessly left a 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);
Copy link
Contributor

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?
Copy link
Contributor

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)
Copy link
Contributor

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

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