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

[write_vcf] CHROM is "MTB_anc" #262

Closed
jameshadfield opened this issue Nov 29, 2023 · 0 comments
Closed

[write_vcf] CHROM is "MTB_anc" #262

jameshadfield opened this issue Nov 29, 2023 · 0 comments

Comments

@jameshadfield
Copy link
Contributor

jameshadfield commented Nov 29, 2023

The VCF chromosome is hardcoded as "MTB_anc":

output = ["MTB_anc", str(pos), ".", refb, ",".join(uniques), ".", "PASS", ".", "GT"] + calls

In lieu of knowing the actual chromosome name, I think using '1' seems to be convention.

In augur's case, a VCF is read upstream of this so we should be able to use the chromsome name provided there, either by making TreeTime aware of it and exposing it within get_tree_dict, or as another argument to write_vcf.

I'm happy to implement this, but any suggestions on the best solution are welcome!

jameshadfield added a commit that referenced this issue Dec 12, 2023
This is only used if provided, otherwise we fall back to the default
ploidy of haploid (unchanged) and chromosome name of "1" (changed from
the previously hardcoded "MTB_anc"). Note that the spec states that
no-call genotypes should be encoded to reflect the ploidy (e.g. "./."
for diploid and "." only for haploid) which is a change from previous
behaviour.

Closes #262
@rneher rneher closed this as completed in 0a835e7 Jan 22, 2024
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

1 participant