-
Notifications
You must be signed in to change notification settings - Fork 133
Biostar130456
##Motivation
Individual VCF files from main VCF file. See https://www.biostars.org/p/13045
##Compilation
- java 1.8 http://www.oracle.com/technetwork/java/index.html (NOT the old java 1.7 or 1.6) . Please check that this java is in the
${PATH}
. Setting JAVA_HOME is not enough : (e.g: https://github.com/lindenb/jvarkit/issues/23 ) - GNU Make > 3.81
- curl/wget
- git
- apache ant is only required to compile htsjdk
- xsltproc http://xmlsoft.org/XSLT/xsltproc2.html
$ git clone "https://github.com/lindenb/jvarkit.git"
$ cd jvarkit
$ make biostar130456
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 biostar130456 standalone=yes
The required libraries will be downloaded and installed in the dist
directory.
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/biostar130456.jar [options] (stdin|file.vcf|file.vcf.gz)
- -o|--output (OUTPUT-FILE) Output file. Default:stdout
- -p|--pattern (FILEPATTERN) output file pattern. Must contain the word SAMPLE
- -x|--uncalled remove uncalled genotypes Default value : "false".
- -z|--homref remove homzygote REF/REF 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/biostar/Biostar130456.java
bash
$ curl -sL "https://raw.githubusercontent.com/arq5x/bedtools2/bc2f97d565c36a82c1a0b12f570fed4398001e5f/test/map/test.vcf" |\
java -jar dist/biostar130456.jar -x -z -p "sample.__SAMPLE__.vcf.gz"
sample.NA00003.vcf.gz
sample.NA00001.vcf.gz
sample.NA00002.vcf.gz
$ gunzip -c sample.NA00003.vcf.gz
(...)
##source=myImputationProgramV3.1
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA00003
chr1 10 rs6054257 G A 29 PASS AF=0.5;DB;DP=14;H2;NS=3 GT:DP:GQ:HQ 1/1:5:43
chr1 20 rs6040355 A G,T 67 PASS AA=T;AF=0.333,0.667;DB;DP=10;NS=2 GT:DP:GQ 2/2:4:35
chr1 130 microsat1 GTC G,GTCT 50 PASS AA=G;DP=9;NS=3 GT:DP:GQ 1/1:3:40
chr2 130 microsat1 GTC G,GTCT 50 PASS AA=G;DP=9;NS=3 GT:DP:GQ 1/1:3:40
- Issue Tracker: http://github.com/lindenb/jvarkit/issues
- Source Code: http://github.com/lindenb/jvarkit
The project is licensed under the MIT license.
Should you cite biostar130456 ? 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