This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filtering out by gene and samples from VCF files

Hi,

I have a set of genes and samples from GTEx dataset. I want to filter out variants from a very large VCF file corresponding to these genes and samples. Is there any way to implement the same using VCFtools?

Thanks

vcf snp vcftools gtex gene

1 answer

build a bed of your genes , create a complement with 'bedtools complement' and then filter with 'bcftools view --regions-file not-gene.bed the.vcf '

Thanks, filtering out based on the samples (individuals) can be done in the same manner?

Log in to answer this question.