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

vcztools query: support looping over samples #83

Closed
Will-Tyler opened this issue Sep 26, 2024 · 1 comment · Fixed by #88
Closed

vcztools query: support looping over samples #83

Will-Tyler opened this issue Sep 26, 2024 · 1 comment · Fixed by #88

Comments

@Will-Tyler
Copy link
Contributor

Will-Tyler commented Sep 26, 2024

Description

This task is to support format fields in the vcztool query CLI. Format fields must be enclosed in square brackets to loop over all the samples. vcztools query is based on bcftools query.

The -f option in vcztools query was added in #64.

Example

bcftools query -f '%CHROM\t%POS\t%REF\t%ALT[\t%SAMPLE=%GT]\n' file.vcf.gz

This example from bcftools query illustrates using square brackets to print the sample ID, %SAMPLE, and the genotype, %GT, for all samples. We want to support this functionality in vcztools query as well.

References

@jeromekelleher
Copy link
Contributor

This sounds great @Will-Tyler! Just to note that this is definitely a case where we'd want to pre-filter before fetching data from Zarr, unless the bcftools semantics bars us from doing so.

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 a pull request may close this issue.

2 participants