How can I filter by read depth using vcftools?

857 views Asked by At

I am trying to build a workflow to analyse my scRNA-seq data. I am using a combination of GATK and samtools, vcftools, bcftools. I would like to filter my .vcf file such that it removes all entries that have fewer than 10 reads. It looks like vcftools can be used for this. My code is:

vcftools --vcf "$fn" --out "$fn"_dp10 --minDP 10 --recode --recode-INFO-all

However, it does not filter out anything. Any thoughts on this?

Kind regards Cora

2

There are 2 answers

1
Cora_olpe On

I just found the answer! I had to use --mean-minDP instead of --minDP.

Kind regards Cora

0
Kermit On

One source of --minDP not working is a parsing bug that emits a warning, but does not error.

https://github.com/vcftools/vcftools/issues/134