# HG changeset patch # User geert-vandeweyer # Date 1401955348 14400 # Node ID 04e3bba317f4b8c2b8dc769c33de2d3eb941f3c3 # Parent 775372e00f55904d2bff53b396cb23c08a722a61 Added selection to differentiate in VCF format diff -r 775372e00f55 -r 04e3bba317f4 VCF_to_VariantDB.pl --- a/VCF_to_VariantDB.pl Fri Feb 21 07:17:28 2014 -0500 +++ b/VCF_to_VariantDB.pl Thu Jun 05 04:02:28 2014 -0400 @@ -20,7 +20,8 @@ # S = (S)erver addrress to send data to. # R = (r)oot of galaxy web server (/home/galaxyuser/galaxy-dist) # H = (H)ost of the galaxy web server (http://my.galaxy.server/galaxy/) -getopts('v:u:n:a:g:o:b:B:V:c:S:R:H:', \%opts); # option are in %opts +# F = (F)ormat of input file +getopts('v:u:n:a:g:o:b:B:V:c:S:R:H:F:', \%opts); # option are in %opts $|++; ################# @@ -41,6 +42,9 @@ if (!exists($opts{'H'})) { die('The Galaxy source-server is not specified'); } +if (!exists($opts{'F'})) { + die('VCF format not specified.'); +} ################ # open outfile # @@ -90,6 +94,8 @@ my $vcfpath = $opts{'v'}; my $bampath = $opts{'b'}; my $baipath = $opts{'B'}; +# input VCF format +$format = $opts{'F'}; # make output directory in (galaxy/static/) working dir my $rand = int(rand(1000)); our $wd = $opts{'R'}."/static/VCF_parser.".$rand; #int(rand(1000)); @@ -116,10 +122,10 @@ $gender = $opts{'g'}; # post form to the variantDB host. if (exists($opts{'b'})) { - $response = $conn->post( $url, {'VCFurl1' => "$vcfurl", 'BAMurl1' => "$bamurl", 'BAIurl1' => "$bamidxurl",'storedata1' => 1, 'name1' => "$sample", 'gender1' => "$gender", 'User' => $email, 'GalaxyUpload' => 1} ); + $response = $conn->post( $url, {'VCFurl1' => "$vcfurl", 'BAMurl1' => "$bamurl", 'BAIurl1' => "$bamidxurl",'storedata1' => 1, 'name1' => "$sample", 'gender1' => "$gender", 'User' => $email, 'GalaxyUpload' => 1,'Format1' => $format} ); } else { - $response = $conn->post( $url, {'VCFurl1' => "$vcfurl", 'name1' => "$sample", 'gender1' => "$gender", 'User' => $email, 'GalaxyUpload' =>1 } ); + $response = $conn->post( $url, {'VCFurl1' => "$vcfurl", 'name1' => "$sample", 'gender1' => "$gender", 'User' => $email, 'GalaxyUpload' =>1, 'Format1' => $format } ); } my $content = $response->decoded_content(); chomp($content); diff -r 775372e00f55 -r 04e3bba317f4 VCF_to_VariantDB.xml --- a/VCF_to_VariantDB.xml Fri Feb 21 07:17:28 2014 -0500 +++ b/VCF_to_VariantDB.xml Thu Jun 05 04:02:28 2014 -0400 @@ -42,14 +42,21 @@ ## The server to send results to -S $server - + ## The input file format + -F $format tabix - + + + + + + + @@ -58,6 +65,7 @@ + @@ -72,6 +80,7 @@ + @@ -89,7 +98,7 @@ **What it does** -This tools sends the results from the GATK unified genotyper to a VariantDB server. From there, variants can be compared between samples, filtered on various annotations etc. To add servers, specify them in the tool configuration XML file. +This tools sends VCF files with results from the GATK unified genotyper, HaploType Caller, Mutect or samtools VarScan to a VariantDB server. From there, variants can be compared between samples, filtered on various annotations etc. To add servers, specify them in the tool configuration XML file. ------