Sample level genotype mapping in plink vcf output
1
0
Entering edit mode
4 months ago
1769mkc ★ 1.3k

This is a small subset of vcf file.

 `#CHROM POS   ID          REF ALT QUAL FILTER  INFO FORMAT HG00096 HG00097 HG00099
1      10583 rs58108140  G   A   25   PASS    .    GT     0/0     0/0     0/0
1      10611 rs189107123 C   G   11   q10     .    GT     0/0     0/1     0/0
1      13302 rs180734498 C   T   32   s50     .    GT     ./.     0/1     ./.
1      13327 rs144762171 G   C   30   .       .    GT     0/0     0/1     ./.
1      13957 rs201747181 TC  T   3    q10;s50 .    GT     0/0     ./.     ./.`

Is it possible to get the sample level genotype if yes how we can map those.

One simple way I can think of this

For position 10583 (rs58108140):

REF = G, ALT = A, HG00096: 0/0 = G/G (homozygous reference) HG00097: 0/0 = G/G (homozygous reference) HG00099: 0/0 = G/G (homozygous reference)

But is this the correct way of mapping those genotype information to the samples?

VCF • 665 views
ADD COMMENT
3
Entering edit mode
4 months ago
bcftools query -f '[%CHROM %POS %SAMPLE %GT %TGT\n]' in.vcf.gz
ADD COMMENT
0
Entering edit mode

It works, how does this convert the binary to actual genotype?

ADD REPLY
1
Entering edit mode
0 : REF
1: first ALT
2: second ALT
3 : third ALT
etc...
ADD REPLY

Login before adding your answer.

Traffic: 4191 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6