Entering edit mode
8 months ago
optimistsso4co3 ▴ 100
I would like to extract VCF subset with only those variants that are present in one particular sample. E.g. i have three sample VCF with ten variants. Only one variant has been detected in the first sample, so i would like to subset VCF so that only this variant is kept. Pseudo code would be something like:
bcftools query -f'%CHROM:%POS %INFO [%GT]\n' -i'GT="alt in sample1"' file.vcf
The desired output is VCF with three samples but only variants present in one of the samples, in this case
However, more desirable solution would avoid using -s option.
How so? That is a valid option for the command and how it is meant to used.
Because many plugins does not support -s option, more specifically it's not present in +split-vep