Skip to content
Pierre Lindenbaum edited this page Mar 23, 2016 · 6 revisions

##Motivation

Set FILTER for VCF if it doesn't intersects with BED.

##Compilation

Requirements / Dependencies

Download and Compile

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

by default, the libraries are not included in the jar file, so you shouldn't move them (https://github.com/lindenb/jvarkit/issues/15#issuecomment-140099011 ). You can create a bigger but standalone executable jar by addinging standalone=yes on the command line:

$ git clone "https://github.com/lindenb/jvarkit.git"
$ cd jvarkit
$ make vcfbedsetfilter standalone=yes

The required libraries will be downloaded and installed in the dist directory.

edit 'local.mk' (optional)

The a file local.mk can be created edited to override/add some paths.

For example it can be used to set the HTTP proxy:

http.proxy.host=your.host.com
http.proxy.port=124567

##Synopsis

$ java -jar dist/vcfbedsetfilter.jar  [options] (stdin|file.vcf|file.vcf.gz) 

Options

  • -o|--output (OUTPUT-FILE) Output file. Default:stdout
  • -f|--filter (FILTER) FILTER name Default value : "VCFBED".
  • -i|--inverse inverse selection Default value : "false".
  • -B|--bed (FILE.BED) Tribble or Tabix bed file
  • -m|--map (FILE.BED) unindexed bed file, will be loaded in memory (faster than tribble/tabix but memory consumming)
  • -d|--discard Discard filtered variants Default value : "false".
  • -h|--help print help
  • -version|--version show version and exit

##Source Code

Main code is: https://github.com/lindenb/jvarkit/blob/master/src/main/java/com/github/lindenb/jvarkit/tools/vcfbed/VCFBedSetFilter.java

Examples

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

Contribute

License

The project is licensed under the MIT license.

Citing

Should you cite vcfbedsetfilter ? https://github.com/mr-c/shouldacite/blob/master/decision-tree.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

Clone this wiki locally