-
Notifications
You must be signed in to change notification settings - Fork 309
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
Use htsjdk getAttributeAsList for VCF INFO ANN key #1348
Conversation
Test PASSed. |
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.
1 small nit, otherwise LGTM!
try { | ||
attrOpt.flatMap(attr => parseAndFilter(attr)) | ||
attrOpt.flatMap(attr => parseAndFilter(attr.asScala.map(_.asInstanceOf[java.lang.String]))) |
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.
You shouldn't need the _.asInstanceOf
here, as scala's String
== java.lang.String
.
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 list wrapped by the option is java.util.List[Object]
because fuck you, htsjdk
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.
Oh, that's right. HOT DIGGITY DOG!
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.
Well, I guess we're good here then. You said you've got more tests coming, right?
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.
Yeah I will have higher level ones that read from SnpEff-annotated VCF files, need to get back to the other laptop
Test PASSed. |
Ping @majkiw @jpdna @fnothaft for review, merge. I'd like to use ExAC lifted over to GRCh38 for further testing and this is a blocker. |
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.
LGTM; thanks for ping @heuermh
I'm going to merge this; if we find any problems on ExAC on GRCh38, we can revise in a later PR. |
Merged! Thanks @heuermh! |
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.
@@ -310,4 +389,10 @@ class TranscriptEffectConverterSuite extends ADAMFunSuite { | |||
// when ValidationStringency is made available for --> VCF, test STRICT throws exception | |||
assert(!TranscriptEffectConverter.convertToVcfInfoAnnValue(Seq(te)).contains("2")) | |||
} | |||
|
|||
def toObjectList(values: String*): java.util.List[Object] = { |
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 think this could be replaced with java.util.Arrays.asList[Object](values)
Fixes #1347
For review; I'll push additional commit(s) to this pull request with more unit tests later.