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

Allow +Inf and -Inf Float values when reading VCF #1512

Closed
heuermh opened this issue May 3, 2017 · 3 comments
Closed

Allow +Inf and -Inf Float values when reading VCF #1512

heuermh opened this issue May 3, 2017 · 3 comments
Milestone

Comments

@heuermh
Copy link
Member

heuermh commented May 3, 2017

Per the VCF 4.3 specification,

Float (32-bit, formatted to match the regular expression
^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$, NaN, or +/-Inf)

From what I can tell, Scala float parsing delegates to the implementation in java, which uses

...
"[+-]?(" + // Optional sign character
"NaN|" +           // "NaN" string
"Infinity|" +      // "Infinity" string
...

Thus we may need to special case +Inf and -Inf. Reported by @tangxuan_twitter on Gitter.

@heuermh heuermh changed the title Allow +Inf and -Inf Float values when reading VCF Allow +Inf and -Inf Float values when reading VCF May 3, 2017
@fnothaft
Copy link
Member

@heuermh This is an upstream issue in htsjdk, no?

@heuermh
Copy link
Member Author

heuermh commented Jun 22, 2017

In Scala number format parsing actually. I couldn't see a simple fix so I left it here.

@fnothaft
Copy link
Member

Oh, that's right. htsjdk just gives us Strings, that we then have to make sense of. LOVE IT.

fnothaft added a commit to fnothaft/adam that referenced this issue Sep 13, 2017
fnothaft added a commit to fnothaft/adam that referenced this issue Oct 8, 2017
heuermh pushed a commit that referenced this issue Oct 9, 2017
* [ADAM-1512] Support VCFs with +Inf/-Inf float values.

Resolves #1512.

* fix inf float values, add test file
@heuermh heuermh added this to the 0.23.0 milestone Dec 7, 2017
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

No branches or pull requests

2 participants