Entering edit mode
4.4 years ago
User000
▴
720
Hello,
I would like to replace all het GT 0/1
or 1/0
to missing data ./.
?
Is there any way to do it with bcftools
? If no how could I do it.
You mean
-i 'GT=="het"'
and not-e
. OP wants to set all HETs (not all non-HETs) to./.
.-i doesnt work, -e seems to be working, is it normal?
Sorry, I'd made a typo that led to a formatting error - I've edited that now. What is the full command you're using?
Hi, I'm using this command line:
/DATA/Tools/bcftools-1.10.2/bcftools filter -S . -e 'GT=="het"' {input.f1} > {output.f2}
It seems to be working...it that OK? because I expect -e to exclude, no? Should I run something like/DATA/Tools/bcftools-1.10.2/bcftools filter -i 'GT=="het"' {input.f1} > {output.f2}
?If the command you're using works and gives you what you expect, then you're all set. The thing to fix is the gap in my understanding - either I'm misunderstanding how bcftools functions or I'm misunderstanding your requirement. Either way, glad it worked for you.
I've moved micofuge's comment to an answer. Go ahead and accept it (using the green check mark on the left side panel).