Entering edit mode
11 months ago
Matteo Ungaro
▴
110
Hi there I have several individual VCF files on which I'm working on to retain calls with only a depth greater than 10 and a genotype quality greater than 30. Also, I'm preserving missing sites.
However, I wonder if there is a way to set the condition so that every site excluded from the previous filters e.g. MIN(FMT/DP)>10 & MIN(FMT/GQ)>30
can be set as missing. Below the exact command I used:
bcftools view --threads 32 -i 'MIN(FMT/DP)>10 & MIN(FMT/GQ)>30 | GT[*]="mis"' -R chromosome.list $d/output/${ID}.vcf.gz -Oz -o $d/output/${ID}_filtered.vcf.gz
Let me know, thanks in advance!
@Pierre Lindenbaum I'm not familiar with
+setGT
... what is meant to do? Also, you mean the query I need is not easily doable just by usingbcftools
?https://samtools.github.io/bcftools/howtos/plugins.html
Oh I see, I think I got it. However, this will require to first run the command you shared, and then run what I was using on top, is that the case? If so, would there be a way to do it in one command; not that it is strictly necessary but just form my understanding. Thanks again!