I need some help with GATK. I have a multisample vcf file containing 18125 samples. After performing PCA I have around 303 samples as outliers and I wanted to remove these samples from my multisample vcf file.
I tried doing it using the GATK
SelectVariant tool. It does some stuff and generates a VCF file which is a bit smaller in size than the original file, but in the end the total count of samples remains the same. As I have no prior knowledge of GATK (working with it for the first time) I am just wondering if you guys can help me out in fixing this issue.
The command that I used was
gatk SelectVariants -V filtered.vcf -xl-sn remove.txt -O test.vcf
remove.txt contains the sample names in each row (1 sample per row).
After running this command it generated a
test.vcf file, for which I counted samples using:
bcftools query -l test.vcf | wc -l
However, I got exactly same number of samples as in the original VCF file