1% VCFFILTER(1) vcffilter (vcflib) | vcffilter (VCF filter) 2% Erik Garrison and vcflib contributors 3 4# NAME 5 6**vcffilter** 7 8# SYNOPSIS 9 10**vcffilter** [options] <vcf file> 11 12# DESCRIPTION 13 14VCF filter the specified vcf file using the set of filters 15 16 17 18# OPTIONS 19 20``` 21 22 23options: 24 -f, --info-filter specifies a filter to apply to the info fields of records, 25 removes alleles which do not pass the filter 26 -g, --genotype-filter specifies a filter to apply to the genotype fields of records 27 -k, --keep-info used in conjunction with '-g', keeps variant info, but removes genotype 28 -s, --filter-sites filter entire records, not just alleles 29 -t, --tag-pass tag vcf records as positively filtered with this tag, print all records 30 -F, --tag-fail tag vcf records as negatively filtered with this tag, print all records 31 -A, --append-filter append the existing filter tag, don't just replace it 32 -a, --allele-tag apply -t on a per-allele basis. adds or sets the corresponding INFO field tag 33 -v, --invert inverts the filter, e.g. grep -v 34 -o, --or use logical OR instead of AND to combine filters 35 -r, --region specify a region on which to target the filtering, requires a BGZF 36 compressed file which has been indexed with tabix. any number of 37 regions may be specified. 38 39Filter the specified vcf file using the set of filters. 40Filters are specified in the form "<ID> <operator> <value>: 41 -f "DP > 10" # for info fields 42 -g "GT = 1|1" # for genotype fields 43 -f "CpG" # for 'flag' fields 44 45Operators can be any of: =, !, <, >, |, & 46 47Any number of filters may be specified. They are combined via logical AND 48unless --or is specified on the command line. Obtain logical negation through 49the use of parentheses, e.g. "! ( DP = 10 )" 50 51For convenience, you can specify "QUAL" to refer to the quality of the site, even 52though it does not appear in the INFO fields. 53 54type: filter 55 56``` 57 58 59 60 61 62# EXIT VALUES 63 64**0** 65: Success 66 67**not 0** 68: Failure 69 70# SEE ALSO 71 72 73 74[vcflib](./vcflib.md)(1) 75 76 77 78# OTHER 79 80## Source code 81 82[vcffilter.cpp](https://github.com/vcflib/vcflib/blob/master/src/vcffilter.cpp) 83 84# LICENSE 85 86Copyright 2011-2020 (C) Erik Garrison and vcflib contributors. MIT licensed. 87 88<!-- 89 Created with ./scripts/bin2md.rb scripts/bin2md-template.erb 90--> 91