Skip to content
Pierre Lindenbaum edited this page Dec 18, 2013 · 5 revisions

##Motivation

CGI/Web tool printing all the variants at a given position for a collection of tabix-ed VCF files.

output example:

CHROM POS ID REF QUAL Sample Alleles DP GQ File
22 11905981 rs86876 A 3133 SAMPLE_273 A/G 211 99 /path/to/SAMPLE_273_variations.gatk.annotations.vcf.gz
22 11905981 rs86876 A 143 SAMPLE_273 G/G 221 99 /path/to/SAMPLE_273_variations.samtools.annotations.vcf.gz
22 11905981 rs86876 A 2455 SAMPLE_324 A/G 165 99 /path/to/SAMPLE_324_variations.gatk.annotations.vcf.gz
22 11905981 rs86876 A 118 SAMPLE_324 G/G 167 99 /path/to/SAMPLE_324_variations.samtools.annotations.vcf.gz
22 11905981 rs86876 A 6398 SAMPLE_016 A/G 462 99 /path/to/SAMPLE_016_variations.gatk.annotations.vcf.gz
22 11905981 rs86876 A 133 SAMPLE_016 A/G 482 99 /path/to/SAMPLE_016_variations.samtools.annotations.vcf.gz
(...) (...) (...) (...) (...) (...) (...) (...) (...)

##Compilation/Installation

Create a Preference file.

create/update a java preferences file with the following key/example:

<?xml version="1.0"?>
<!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
<preferences EXTERNAL_XML_VERSION="1.0">
  <root type="user">
    <map>
      <entry key="vcf.registry.group.file" value="/var/www/cgi-bin/vcfregistry.tsv"/>
    </map>
  </root>
</preferences>

here /var/www/cgi-bin/vcfregistry.tsv is a tab delimited file containing the path to some collections of VCFs (path/Title):

$ cat vcfregistry.tsv
/var/www/cgi-bin/vcfregistry1.tsv       Collection1
/var/www/cgi-bin/vcfregistry2.tsv       Collection2
/var/www/cgi-bin/vcfregistry3.tsv       Collection3

A collection file contains a list of VCF indexed with tabix:

$ head /var/www/cgi-bin/vcfregistry1.tsv 
/commun/data/projects/TEST/align/Samples/SAMPLE_73/VCF/SAMPLE_73_variations.gatk.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_73/VCF/SAMPLE_73_variations.samtools.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_72/VCF/SAMPLE_72_variations.gatk.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_72/VCF/SAMPLE_72_variations.samtools.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_71/VCF/SAMPLE_71_variations.gatk.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_71/VCF/SAMPLE_71_variations.samtools.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_24/VCF/SAMPLE_24_variations.gatk.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_24/VCF/SAMPLE_24_variations.samtools.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_16/VCF/SAMPLE_16_variations.gatk.annotations.vcf.gz
/commun/data/projects/TEST/align/Samples/SAMPLE_16/VCF/SAMPLE_16_variations.samtools.annotations.vcf.gz

Compile the program

See also Compilation.

Important : the JAR/library files of picard should be visible from the CGI-bin. The path defined in the build.properties should be absolute.

$ ant vcfregistry.cgi

It creates a jar file (vcfregistry.jar) and an executable shell script (vcfregistry.cgi) in the 'dist' folder. Both should be moved in the cgi-bin script of your server:

$ sudo mv dist/vcfregistry* /var/www/cgi-bin/

If needed, edit the script tviewweb.cgi and change the JVM property Dprefs.file.xml= to the correct place of your xml preference file.

java (...) -Dprefs.file.xml=/var/www/cgi-bin/prefs.xml (...)
Clone this wiki locally