Biostar9556602
Filtering of tricky overlapping sites in VCF
Usage
This program is now part of the main jvarkit
tool. See jvarkit for compiling.
Usage: java -jar dist/jvarkit.jar biostar9556602 [options] Files
Usage: biostar9556602 [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
-filter, --filter
if not blank, do not remove the variants but set the FILTER with this
value
--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
-sorter, --sorter
Best variant sort type
Default: LOWEST_AF
Possible Values: [LOWEST_AF, HIGHEST_AF, LOWEST_DP, HIGHEST_DP, LOWEST_QUAL, HIGHEST_QUAL]
--version
print version and exit
Keywords
- vcf
- filter
See also in Biostars
Source code
Contribute
- Issue Tracker: http://github.com/lindenb/jvarkit/issues
- Source Code: http://github.com/lindenb/jvarkit
License
The project is licensed under the MIT license.
Citing
Should you cite biostar9556602 ? 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
input
input must be sorted on coordinate, Alleles must be normalized (one ALT per variant)
Example
$ grep -v "##" jeter.vcf
#CHROM POS ID REF ALT QUAL FILTER INFO
1 905593 . A T 3887.15 PASS AF=0.1
1 905594 rs867360694 A T 3887.15 PASS AF=0.1
1 905594 rs867360694 A TT 3887.15 PASS AF=0.2
1 905594 rs867360694 A TTT 3887.15 PASS AF=0.3
1 905595 . A T 3887.15 PASS AF=0.1
1 905595 . A G 3887.15 PASS AF=0.01
$ java -jar dist/jvarkit.jar biostar9556602 --sorter HIGHEST_AF jeter.vcf --filter ZZZZZZZZZZZZ | grep -v "##"
#CHROM POS ID REF ALT QUAL FILTER INFO
1 905593 . A T 3887.15 PASS AF=0.1
1 905594 rs867360694 A TTT 3887.15 PASS AF=0.3
1 905594 rs867360694 A TT 3887.15 ZZZZZZZZZZZZ AF=0.2
1 905594 rs867360694 A T 3887.15 ZZZZZZZZZZZZ AF=0.1
1 905595 . A T 3887.15 PASS AF=0.1
1 905595 . A G 3887.15 ZZZZZZZZZZZZ AF=0.01
$ java -jar dist/jvarkit.jar biostar9556602 --sorter LOWEST_AF jeter.vcf | grep -v "##"#CHROM POS ID REF ALT QUAL FILTER INFO
1 905593 . A T 3887.15 PASS AF=0.1
1 905594 rs867360694 A T 3887.15 PASS AF=0.1
1 905595 . A G 3887.15 PASS AF=0.01