Move any FILTER to the INFO column. reset FILTER to PASS
This program is now part of the main jvarkit
tool. See jvarkit for compiling.
Usage: java -jar dist/jvarkit.jar vcfmovefilterstoinfo [options] Files
Usage: vcfmovefilterstoinfo [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
-f, --filter
INFO name. This tag will be used to store the previous filters
Default: PREVIOUSLY_FILTERED_AS
--generate-vcf-md5
Generate MD5 checksum for VCF output.
Default: false
-G, --genotype
If not empty, FILTER all **GENOTYPES** with this filter, if any FILTER
was found. Could be useful before bcftools merge
-h, --help
print help and exit
--helpFormat
What kind of help. One of [usage,markdown,xml].
-t, --limitto
If not empty, limit to those FILTERS. Multiple separated by comma/space.
Default: []
-o, --out
Output file. Optional . Default: stdout
--version
print version and exit
20161025
The project is licensed under the MIT license.
Should you cite vcfmovefilterstoinfo ? 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
For Matilde K: move the information in FILTER to the INFO column to keep a trace of the FILTERs.
$ cat input.vcf | grep -v "##"
#CHROM POS ID REF ALT QUAL FILTER INFO
22 16057607 rs201535778 G GAAAA . . AAC=2;AAF=0.0005;BEACON=T|solvebio,T|bob,T|solvebio-133,T|altruist,T|prism,T|kaviar;NS=3690;RAC=3688;RAF=0.9995;VTYPE=SNV
22 16057608 rs201535778 G T . . AAC=2;AAF=0.0005;BEACON=T|solvebio,T|bob,T|solvebio-133,T|altruist,T|prism,T|kaviar;NS=3690;RAC=3688;RAF=0.9995;VTYPE=SNV
$ java -jar dist/jvarkit.jar vcfmovefilterstoinfo input.vcf | grep -v "##"
#CHROM POS ID REF ALT QUAL FILTER INFO
22 16057608 rs201535778 G T . . AAC=2;AAF=0.0005;NS=3690;PREVIOUSLY_FILTERED_AS=FT1;RAC=3688;RAF=0.9995;VTYPE=SNV
22 16058492 . G A . . AAC=2;AAF=0.0005;NS=3708;PREVIOUSLY_FILTERED_AS=FT2;RAC=3706;RAF=0.9995;VTYPE=SNV
$ java -jar dist/jvarkit.jar vcfmovefilterstoinfo -f OLDFILTER -t FT2 input.vcf | grep -v "##"
#CHROM POS ID REF ALT QUAL FILTER INFO
22 16057608 rs201535778 G T . FT1 AAC=2;AAF=0.0005;NS=3690;RAC=3688;RAF=0.9995;VTYPE=SNV
22 16058492 . G A . . AAC=2;AAF=0.0005;NS=3708;OLDFILTER=FT2;RAC=3706;RAF=0.9995;VTYPE=SNV