This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to choose some samples from a vcf files

Hello,

I have a vcf file with 200 samples. I need only 100 specific samples out of the 200 in total for some downstream analysis. I there a way to filter out these samples without parsing vcf or changing the file format.

Thank you!

snp

1 answer

For all your VCF manipulations you should first have a look at the bcftools documentation, that's the recommended tool nowadays and has a lot of features. In your case, you need bcftools view with -s or -S.

Log in to answer this question.