How to include/keep only the samples in a list in VCF.gz file?
I have a list of 8000 samples in a file “samples.txt”:
samples.txt: TCGA..barcode.. TCGA..barcode.. . .
I am using bcftools to only keep these samples in the vcf.gz file. The vcf.gz file has 10000 samples. Hence, I am trying to use bcftools to keep only the 8000 samples in the “samples.txt” file in the vcf.gz file and remove the remaining 2000 samples. I did:
bcftools -S samples.txt vcf.gz -o filtered-vcf.vcf
it gives me error:
[E::main] unrecognized command -S
Could you please suggest me what could be the issue here, and how you think I can do the above? Thanks much.
• 3.4k views
Read more here: Source link