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

Bugfix for field with TYPE=CHARACTER. #158

Closed
wants to merge 1 commit into from

Conversation

kunalbhutani
Copy link

@kunalbhutani kunalbhutani commented Jul 7, 2017

Simple bug fix for TYPE=Character in the VCF.

Note that VCF Spec v4.3 lists a TYPE=Character on p.4 https://samtools.github.io/hts-specs/VCFv4.3.pdf

Relevant Text:
1.3 Data types
Data types supported by VCF are: Integer (32-bit, signed), Float (32-bit, formatted to match the regular expression
^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?$, NaN, or +/-Inf), Flag, Character, and String.

Closes #159

@alimanfoo
Copy link
Contributor

Thanks @kunalbhutani. Just to check, the "Character" type means the expected value is a single character, whereas the "String" type means a variable number of characters, is that right? Sounds like it should be obvious but it's not explicitly stated in the spec.

@alimanfoo alimanfoo mentioned this pull request Jul 12, 2017
@alimanfoo
Copy link
Contributor

Thanks Kunal, I have manually merged with a slight modification to use 'S1' dtype for Character fields, which should be more efficient than using variable length strings ('object') given we know values should be a single character long. Will be included in 1.1.9 release.

@alimanfoo alimanfoo closed this Jul 12, 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

Successfully merging this pull request may close these issues.

TYPE=Character Not Supported for VCF
2 participants