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

Use htsjdk getAttributeAsList for VCF INFO ANN key #1348

Merged
merged 2 commits into from
Jan 16, 2017

Conversation

heuermh
Copy link
Member

@heuermh heuermh commented Jan 10, 2017

Fixes #1347

For review; I'll push additional commit(s) to this pull request with more unit tests later.

@heuermh heuermh modified the milestones: 0.21.1, 0.22.0 Jan 10, 2017
@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1727/
Test PASSed.

Copy link
Member

@fnothaft fnothaft left a 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])))
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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!

Copy link
Member

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?

Copy link
Member Author

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

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1728/
Test PASSed.

@heuermh
Copy link
Member Author

heuermh commented Jan 16, 2017

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.

Copy link
Member

@fnothaft fnothaft left a 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

@fnothaft
Copy link
Member

I'm going to merge this; if we find any problems on ExAC on GRCh38, we can revise in a later PR.

@fnothaft fnothaft merged commit 938f62a into bigdatagenomics:master Jan 16, 2017
@fnothaft
Copy link
Member

Merged! Thanks @heuermh!

Copy link

@majkiw majkiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, sorry, I didn't know I had reviewer rights :)
It looks great - thank you @heuermh and @fnothaft
I am leaving a nitpicking comment as a proof I read it.

@@ -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] = {
Copy link

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)

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.

4 participants