Skip to content
Pierre Lindenbaum edited this page Apr 21, 2016 · 6 revisions

##Motivation

Injects a pedigree (.ped) file in the VCF header

##Compilation

Requirements / Dependencies

Download and Compile

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

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 vcfinjectpedigree 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/vcfinjectpedigree.jar  [options] (stdin|file.vcf|file.vcf.gz) 

Options

  • -o|--output (OUTPUT-FILE) Output file. Default:stdout
  • -p|--pedigree (PEDIGREE) Path to a pedigree file. A pedigree file is a text file containing the following columns: FAMILY-ID INDIVIDUAL-ID FATHER-ID(or 0) MOTHER-ID(or 0) SEX(1 male, 2 female, 0 unknown) PHENOTYPE (1 affected, 0 unaffected, 9 not available)
  • -clean|--clean Remove all previous data about pedigree in the VCF header before adding the new one. Default value : "false".
  • -imih|--ignoreMissingInHeader Ignore errors if a sample is declared in the pedigree but is missing in the VCF header Default value : "false".
  • -imip|--ignoreMissingInPedigree Ignore errors if a sample is declared in the VCF header but is missing in the pedigree Default value : "false".
  • -valid|--valid Ignore pedigree validation 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/burden/VcfInjectPedigree.java

This tools reads a pedigree file and inject it in the VCF header

$ java -jar dist/vcfinjectpedigree.jar \
	-imih -imip -p input.ped \
	input.vcf.gz > out.vcf

$ grep Sample out.vcf
(...)
##Sample=<Family=F1,ID=INDI1,Father=0,Mother=0,Sex=1,Status=1>
##Sample=<Family=F2,ID=INDI2,Father=0,Mother=0,Sex=2,Status=1>
##Sample=<Family=F3,ID=INDI3,Father=INDI1,Mother=INDI2,Sex=1,Status=1>
(...)

Contribute

License

The project is licensed under the MIT license.

Citing

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

Clone this wiki locally