Feature for encoding and decoding sex of samples/genomes in VCF header

Open
#308 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale

Research direction

Start with the linked SourceForge discussion and the proposed bcftools reheader --add-sex and bcftools query --list-samples-with-sex interfaces. Clarify how sex should be represented in the VCF ##SAMPLE header and whether bcftools convert must preserve it for sex-aware formats. Done means the representation, input/output format, and conversion scope are agreed before implementation.

Written by the indexing model from the issue text.

Description

enhancement

I would like to encode the sex of the samples contained in a VCF in the VCF header.

Based on the discussion at http://sourceforge.net/p/vcftools/mailman/message/28587354/, it appears that the best way of doing this in the absence of a ##GENOME field would be to encode sex using the ##SAMPLE field.

So, what I'm envisioning are additions to bcftools that work in the following way:

bcftools reheader --add-sex sex_file file.vcf.gz
bcftools query --list-samples-with-sex > sex_file.2

, where sex_file and sex_file.2 would not differ, and where sex_file would look like this:

sample sex 
samp1 female
samp2 male
samp3 male
...

Ideally, sex awareness would also be added to the bcftools convert tools that convert to and from sex-aware file formats (for example Impute2 format).

What do people think?

Dominant language
C
Stars
891
Forks
277
Avg merge
2d 23h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/bcftools

All issues in samtools/bcftools

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.