changeset 3:ca1e48c52db9 draft

Uploaded
author elixir-it
date Sat, 21 Sep 2019 13:23:01 -0400
parents bfd92976550f
children e82c4e48ecd7
files .shed.yml tool-data/vcf_to_maf_index.loc.sample tool_data_table_conf.xml.sample vep-unico-macros.xml vep_unico.sh vep_unico.xml
diffstat 6 files changed, 90 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/.shed.yml	Thu Oct 25 04:46:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-categories:
-- Variant Analysis
-description: 'vep86_vcf2maf: vep86 determines the effect of your variants vcf2maf same thing but giving the output in MAF format '
-homepage_url: https://www.ensembl.org/info/docs/tools/vep/index.html https://github.com/mskcc/vcf2maf
-long_description: |
-VEP determines the effect of your variants (SNPs, insertions, deletions, CNVs or structural variants) on genes, transcripts, and protein sequence, as well as regulatory regions.vcf2mafuse VEP and give the output in MAF format 
-name: vep86_vcf2maf
-owner: elixir-it
-remote_repository_url: https://github.com/Laniakea-elixir-it/GDC-DNA-Seq-pipeline-galaxy-wrapper/tree/master/vep86_vcf2maf-wrapper
-type: unrestricted
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/vcf_to_maf_index.loc.sample	Sat Sep 21 13:23:01 2019 -0400
@@ -0,0 +1,34 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of vep86_vcf2maf-wrapper indexed sequences data files. You will need
+#to create these data files and then create a vcf_to_maf_index.loc file
+#similar to this one (store it in this directory) that points to
+#the directories in which those files are stored. The vcf_to_maf_index.loc
+#file has this format (longer white space characters are TAB characters):
+#
+#<unique_build_id>   <dbkey>   <display_name>   <file_path>
+#
+#So, for example, if you had phiX indexed stored in 
+#/depot/data2/galaxy/phiX/base/, 
+#then the bwa_index.loc entry would look like this:
+#
+#phiX174   phiX   phiX Pretty   /depot/data2/galaxy/phiX/base/phiX.fa
+#
+#and your /depot/data2/galaxy/phiX/base/ directory
+#would contain phiX.dict, phiX.fa.fai files.
+#
+#
+#Your vcf_to_maf_index.loc file should include an entry per line for each
+#index set you have stored. The "file" in the path does not actually
+#exist, but it is the prefix for the actual index files.  For example:
+#
+#phiX174                                phiX    phiX174                 /depot/data2/galaxy/phiX/base/phiX.fa
+#hg18canon                              hg18    hg18 Canonical  /depot/data2/galaxy/hg18/base/hg18canon.fa
+#hg18full                               hg18    hg18 Full               /depot/data2/galaxy/hg18/base/hg18full.fa
+#/orig/path/hg19.fa             hg19    hg19                    /depot/data2/galaxy/hg19/base/hg19.fa
+#...etc...
+#
+#Note that for backwards compatibility with workflows, the unique ID of
+#an entry must be the path that was in the original loc file, because that
+#is the value stored in the workflow for that parameter. That is why the
+#hg19 entry above looks odd. New genomes can be better-looking.
+#
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Sat Sep 21 13:23:01 2019 -0400
@@ -0,0 +1,7 @@
+<tables>
+    <!-- Locations of indexes in the vep86_vcf2maf-wrapper mapper format -->
+    <table name="vcf_to_maf_index" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/vcf_to_maf_index.loc" />
+    </table>
+</tables>
--- a/vep-unico-macros.xml	Thu Oct 25 04:46:04 2018 -0400
+++ b/vep-unico-macros.xml	Sat Sep 21 13:23:01 2019 -0400
@@ -10,7 +10,24 @@
         <param name="tumour_id" type="text" value="TUMOR" label="Tumour ID (Name)"/>
         <param name="normal_id" type="text" value="NORMAL" label="Normal ID (Name)"/>
         <param name="input_vcf" type="data" format="vcf" label="Input VCF File" />
-        <param name="reference" type="data" format="fasta" label="Input fasta file" />
         <param name="buffer" type="text" value="5000" label="buffer size decrease if vcf2maf can not allocate memory" />
+      <conditional name="reference_source">
+            <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?">
+                <option value="cached">Use a built-in genome</option>
+                <option value="history">Use a genome from history as reference</option>
+            </param>
+            <when value="cached">
+                <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list">
+                    <options from_data_table="vcf_to_maf_index">
+                        <filter type="sort_by" column="2" />
+                        <validator type="no_options" message="No indexes are available" />
+                    </options>
+                    <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
+                </param>
+            </when>
+            <when value="history">
+                <param name="reference" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" />
+            </when> 
+      </conditional>
   </macro>
 </macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vep_unico.sh	Sat Sep 21 13:23:01 2019 -0400
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+cmd="perl \$CONDA_PREFIX/bin/variant_effect_predictor.pl --offline --dir \$CONDA_PREFIX/vep_cache --force_overwrite --species $2 $3 $4 --buffer_size $5 --input_file $6 --output_file $7 --stats_file stat.htm $8"
+
+if [ "$1" == 1 ]; then cmd="$cmd --fork \${GALAXY_SLOTS:-4}"; fi
+
+eval $cmd
+
+
--- a/vep_unico.xml	Thu Oct 25 04:46:04 2018 -0400
+++ b/vep_unico.xml	Sat Sep 21 13:23:01 2019 -0400
@@ -11,27 +11,27 @@
     <requirements>
         <requirement type="package" version="86">variant-effect-predictor</requirement>
 	<requirement type="package" version="1.3.1">samtools</requirement>
-	<requirement type="package" version="1.7.2">perl-bioperl</requirement>
+        <requirement type="package" version="1.0" >openssl</requirement>
     </requirements>
     <command><![CDATA[
 	#if str($veptools.veptoolsselect) =="downloadcache"
 	
-	cd \$CONDA_DEFAULT_ENV && [[ -d vep_cache ]] || mkdir vep_cache ;
+	cd \$CONDA_PREFIX && [[ -d vep_cache ]] || mkdir vep_cache ;
                       cd bin && perl vep_install.pl
                         -a  ac -s $veptools.species
                         --NO_HTSLIB
-                        --CACHEDIR \$CONDA_DEFAULT_ENV/vep_cache;
+                        --CACHEDIR \$CONDA_PREFIX/vep_cache;
                         ## write the cache file downloaded 
                         echo "CACHE DOWNLOADED YET">$output1;
-                        ls \$CONDA_DEFAULT_ENV/vep_cache/*/ >> $output1;
+                        ls \$CONDA_PREFIX/vep_cache/*/ >> $output1;
 	#end if
 
 	
 	#if str($veptools.veptoolsselect) =="annotate"
-	 perl \$CONDA_DEFAULT_ENV/bin/variant_effect_predictor.pl
+	 perl \$CONDA_PREFIX/bin/variant_effect_predictor.pl
         --fork 4
         --offline
-        --dir \$CONDA_DEFAULT_ENV/vep_cache
+        --dir \$CONDA_PREFIX/vep_cache
         --force_overwrite
            #if $veptools.everything.value
            --everything
@@ -54,11 +54,22 @@
             --tumor-id $veptools.tumour_id
             --normal-id $veptools.normal_id
             --buffer-size $veptools.buffer
-            --vep-path \$CONDA_DEFAULT_ENV/bin/
-            --vep-data \$CONDA_DEFAULT_ENV/vep_cache
-            --ref-fasta $veptools.reference
-            --species $veptools.species
-	    --filter-vcf 0 ;
+            --vep-path \$CONDA_PREFIX/bin/
+            --vep-data \$CONDA_PREFIX/vep_cache
+            
+
+
+
+        
+         #if $veptools.reference_source.reference_source_selector == "history"
+         --ref-fasta  $veptools.reference_source.reference
+        #end if
+        #if $veptools.reference_source.reference_source_selector == "cached"
+        --ref-fasta  $veptools.reference_source.ref_file.fields.path
+        #end if
+    
+             --species $veptools.species
+             --filter-vcf 0 ;
 
         #end if
 		 ]]>