Print Minimum Depth from a VCF
1
0
Entering edit mode
6.8 years ago

Is there an easy way to print the minimum depth (FORMAT:DP) for variants in a VCF.

I can write a script to accomplish this, but I am looking for an option in bcftools or some other tool that can determine the minimum depth on the fly.

bcftools vcf • 1.7k views
ADD COMMENT
0
Entering edit mode
6.8 years ago

using bioalcidaejdk http://lindenb.github.io/jvarkit/BioAlcidaeJdk.html

$ java -jar dist/bioalcidaejdk.jar -e 'stream().forEach(V->{println(V.getContig()+":"+V.getStart()+":"+V.getReference().getDisplayString()+"\t"+V.getGenotypes().stream().filter(G->G.hasDP()).mapToInt(G->G.getDP()).min().orElse(-1));});' input.vcf
ADD COMMENT

Login before adding your answer.

Traffic: 1550 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