Annotate variants with the distance between previous and next variant.
This program is now part of the main jvarkit
tool. See jvarkit for compiling.
Usage: java -jar dist/jvarkit.jar vcfdistancevariants [options] Files
Usage: vcfdistancevariants [options] Files
Options:
--bcf-output
If this program writes a VCF to a file, The format is first guessed from
the file suffix. Otherwise, force BCF output. The current supported BCF
version is : 2.1 which is not compatible with bcftools/htslib (last
checked 2019-11-15)
Default: false
--generate-vcf-md5
Generate MD5 checksum for VCF output.
Default: false
-h, --help
print help and exit
--helpFormat
What kind of help. One of [usage,markdown,xml].
-o, --out
Output file. Optional . Default: stdout
-p, --prefix
INFO Attribute Prefix
Default: DIST_
--version
print version and exit
20190410
The project is licensed under the MIT license.
Should you cite vcfdistancevariants ? https://github.com/mr-c/shouldacite/blob/master/should-I-cite-this-software.md
The current reference is:
http://dx.doi.org/10.6084/m9.figshare.1425030
Lindenbaum, Pierre (2015): JVarkit: java-based utilities for Bioinformatics. figshare. http://dx.doi.org/10.6084/m9.figshare.1425030
$ java -jar dist/vcfdistancevariants.jar src/test/resources/toy.vcf.gz
##fileformat=VCFv4.2
##INFO=<ID=BQB,Number=1,Type=Float,Description="Mann-Whitney U test of Base Quality Bias (bigger is better)">
##INFO=<ID=DIST_NEXT,Number=1,Type=Integer,Description="Distance to next variant">
##INFO=<ID=DIST_PREV,Number=1,Type=Integer,Description="Distance to previous variant">
(..)
##contig=<ID=ref,length=45>
##contig=<ID=ref2,length=40>
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT S1
ref 11 . A C 0.52 . AC1=1;AF1=0.498013;BQB=1;DIST_NEXT=3;DP=3;DP4=2,0,1,0;FQ=-6.97257;MQ=30;MQ0F=0;MQB=1;PV4=1,1,1,0.106148;RPB=1;SGB=-0.379885 GT:PL 0/1:21,0,46
ref 14 . AG AGGG 0.71 . AC1=2;AF1=1;DIST_PREV=3;DP=3;DP4=0,0,1,0;FQ=-37.5301;IDV=2;IMF=0.666667;INDEL;MQ=30;MQ0F=0;SGB=-0.379885 GT:PL 0/1:30,3,0
ref2 14 . C T 0.09 . AC1=1;AF1=0.487148;BQB=1;DIST_NEXT=0;DP=6;DP4=3,0,1,0;FQ=-14.1557;MQ=30;MQ0F=0;MQB=1;PV4=1,0,1,0.0285955;RPB=1;SGB=-0.379885 GT:PL 0/0:13,0,64
ref2 14 . CAA CAAATAA 32.43 . AC1=2;AF1=1;DIST_NEXT=1;DIST_PREV=0;DP=6;DP4=0,0,3,0;FQ=-43.5253;IDV=1;IMF=0.166667;INDEL;MQ=30;MQ0F=0;SGB=-0.511536;VDB=0.354794 GT:PL 1/1:72,9,0
ref2 17 . T A 0.14 . AC1=1;AF1=0.491968;BQB=1;DIST_PREV=1;DP=6;DP4=4,0,1,0;FQ=-12.2521;MQ=30;MQ0F=0;MQB=1;PV4=1,1,1,0.201057;RPB=1;SGB=-0.379885 GT:PL 0/0:15,0,72