jvarkit

VCFBedSetFilter

Last commit

Set FILTER for VCF if intersects with BED.

Usage

Usage: vcfbedsetfilter [options] Files
  Options:
  * -B, --bed, -m, --map
      Tribble or Tabix bed file. Must be indexed with tribble or tabix, or use 
      '--fast' to load in memory.
    -x, --extend
      Extend the variant coordinates per 'x' bases. A distance specified as a 
      positive integer.Comma are removed. The following suffixes are 
      interpreted : b,bp,k,kb,m,mb
      Default: 0
    -f, --filter
      FILTER name. Filter is **set** if the variant overlaps any BED region, 
      unless `--inverse` is set. If `--filter` is empty, FILTERED variant will 
      be discarded.
      Default: VCFBED
    -h, --help
      print help and exit
    --helpFormat
      What kind of help. One of [usage,markdown,xml].
    -i, --inverse
      Inverse selection: FILTER will be **set** for a Variant overlaping no 
      bed record. Variant overlapping any bed record remains unfiltered.
      Default: false
    --fast, --memory
      Load the bed in memory: faster than tribble/tabix but memory consumming)
      Default: false
    -o, --output
      Output file. Optional . Default: stdout
    --version
      print version and exit

Keywords

Compilation

Requirements / Dependencies

Download and Compile

$ git clone "https://github.com/lindenb/jvarkit.git"
$ cd jvarkit
$ ./gradlew vcfbedsetfilter

The java jar file will be installed in the dist directory.

Source code

https://github.com/lindenb/jvarkit/tree/master/src/main/java/com/github/lindenb/jvarkit/tools/vcfbed/VCFBedSetFilter.java

Unit Tests

https://github.com/lindenb/jvarkit/tree/master/src/test/java/com/github/lindenb/jvarkit/tools/vcfbed/VCFBedSetFilterTest.java

Contribute

License

The project is licensed under the MIT license.

Citing

Should you cite vcfbedsetfilter ? 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

Examples

$java -jar dist/vcfbedsetfilter.jar -f MYFILTER - -B in.bed in.vcf