VCFTOOLS error while trying to filter for MAF
1
0
Entering edit mode
5.8 years ago
lafzi.a • 0

Hi,

Im trying to filter a vcf file I've got from genomAD (Exome VCF files) for MAF > 0.01, using vcftools but I get an error I cant figure out why.

I use this command:

vcftools --vcf gnomad.exomes.r2.0.2.sites.vcf --recode --maf 0.01 --out gnomad.exomes.r2.0.2.sites.filtered.MAF01.vcf

but I get the following error "" VCFtools - UNKNOWN (C) Adam Auton and Anthony Marcketta 2009

Parameters as interpreted: --vcf gnomad.exomes.r2.0.2.sites.vcf --maf 0.01 --out gnomad.exomes.r2.0.2.sites.filtered.MAF01.vcf --recode

After filtering, kept 0 out of 0 Individuals Outputting VCF file... Error: Require Genotypes in variant file to filter by frequency and/or call rate

"" I tried to check with HTSLIB if its identified as vcf file and yes!

$ htsfile gnomad.exomes.r2.0.2.sites.vcf

gnomad.exomes.r2.0.2.sites.vcf: VCF version 4.2 variant calling text

I tried with the bgzipped version of the file which I directly get from genomAD using --gzvcf tag in vcftools, but still the same problem...

There is a similar questoin from more than a year ago without any answers: vcftools flags --mac and --max-mac giving an empty output file

It would be great if someone gives me any clue of what can be the problem!

Many thanks,

Ati

SNP • 4.3k views
ADD COMMENT
0
Entering edit mode

how about using bcftools instead of the 'old' vcftools ? https://vcftools.github.io/htslib.html

ADD REPLY
0
Entering edit mode
5.8 years ago

Error: Require Genotypes in variant file to filter by frequency and/or call rate

there is NO genotype in your vcf file = there is NO SAMPLE

$ wget -q -O - "https://storage.googleapis.com/gnomad-public/release/2.0.2/vcf/genomes/gnomad.genomes.r2.0.2.sites.chr1.vcf.bgz" | gunzip -c | grep CHROM -m1 | tr "\t" "\n"
#CHROM
POS
ID
REF
ALT
QUAL
FILTER
INFO

what you want is filtering using the AF field in the INFO column . Not tested: you can try to use vcftools without 'recode' or use **bcftools** filter using an include expression

ADD COMMENT

Login before adding your answer.

Traffic: 2473 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6