Entering edit mode
2.1 years ago
LDT
▴
340
Dear all,
I have a large VCF file from which I want to convert the heterozygous alleles to ./.
.
Do you have any idea how I can do that?
Hi! What are you trying to achieve? What do you mean by "converting heterozygous alleles to NA"? Could you simply discard them from your VCF? Could you describe your desired output?
I want to mask heterozygous sites and work only with the homozygotes. Thank you for the comment :)
I think if you just need to work with homozygous variant calls, you could simply generate a new VCF with the homozygous calls:
N.B: These commands only work for a single alternative allele at the variant position.
thats very handy, thank you so so much, but I really want to convert heterozygotes to
./.
and keep them in the file. Maybe I could try a grep command? Also thank you so much for your time, means a lot learning from othersSure, no worries, happy to help. So, an easy way could be with
sed
:NA ? that doesnt fit in the VCF specification. Could be
./.
but not NA.Yes you are right to
./.
I wanted to write. I am changing the question asap