Split genotypes in VCF file
1
0
Entering edit mode
7 months ago

I have a VCF file from dipcall. I used two samples, so I have two genotypes compared to the reference. I would like to split my VCF file into individual genotypes. For example, in the first case in the image below, there is G in the reference, but GT as allele 1 and GTT as allele 2. However, if I only want to have file with the first sample, I would only have reference allele G and allele 1 GT. For the second sample, I would have G in the reference, and GTT as allele 1.

How to do this, please?

I need this split because I want to apply the variants back to the reference and build a new consensus. Thank you!

enter image description here

VCF genotype dipcall • 790 views
ADD COMMENT
2
Entering edit mode
7 months ago

vt decompose or bcftools norm

ADD COMMENT
0
Entering edit mode

this helps, thank you!!

ADD REPLY
0
Entering edit mode

vt decompose did the trick for me, followed by the filtering for 10th and 11th column. Thanks!

ADD REPLY

Login before adding your answer.

Traffic: 2878 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