Question: VCFTOOLS error while trying to filter for MAF
0
gravatar for lafzi.a
8 months ago by
lafzi.a0
lafzi.a0 wrote:

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 • 651 views
ADD COMMENTlink modified 8 months ago by Pierre Lindenbaum118k • written 8 months ago by lafzi.a0

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

ADD REPLYlink written 8 months ago by Pierre Lindenbaum118k
0
gravatar for Pierre Lindenbaum
8 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum118k wrote:

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 COMMENTlink written 8 months ago by Pierre Lindenbaum118k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1235 users visited in the last hour