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!
this helps, thank you!!
vt decompose did the trick for me, followed by the filtering for 10th and 11th column. Thanks!