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 string (instead of int from PyVCF) as the "Number" fields in header #420

Open
arostamianfar opened this issue Nov 26, 2018 · 0 comments

Comments

@arostamianfar
Copy link
Contributor

We currently use PyVCF integers [1] for the Number field in VcfHeader. This has caused a lot of confusion in our code, so we should fix it to use a string instead (i.e. avoid the conversion from "A" to -1, etc). Nucleus also uses a string for this field, so it would make the transition smoother.

[1] PyVCF has some arbitrary semantics for special number values:

# Conversion between value in file and Python value
field_counts = {
    '.': None,  # Unknown number of values
    'A': -1,  # Equal to the number of alternate alleles in a given record
    'G': -2,  # Equal to the number of genotypes in a given record
    'R': -3,  # Equal to the number of alleles including reference in a given record
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant