changeset 1:fe9b86b5da79 draft

Uploaded
author elixir-it
date Thu, 18 Oct 2018 08:06:06 -0400
parents c4f5e1994690
children 0a8461a7b3bb
files muse_call.xml muse_macros.xml tool-data/muse_index.loc
diffstat 3 files changed, 77 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/muse_call.xml	Mon Jul 02 10:40:32 2018 -0400
+++ b/muse_call.xml	Thu Oct 18 08:06:06 2018 -0400
@@ -4,9 +4,24 @@
         <requirement type="package" version="1.0.rc" >muse</requirement>
         <requirement type="package" version="1.7">samtools</requirement>
   </requirements>
+  <macros>
+    <import>muse_macros.xml</import>
+  </macros>
   <command> <![CDATA[
     ##creation of the bam indexes and execution of the MuSE call command with all the advanced options
-    samtools index $input2 && samtools index $input3 && MuSE call -O variant_call -f $input1 $input2 $input3
+  
+   	samtools index $input2 && samtools index $input3 && 
+        
+        MuSE call -O variant_call
+         #if $reference_source.reference_source_selector == "history"
+         -f $reference_source.reference
+        #end if
+        #if $reference_source.reference_source_selector == "cached"
+        -f $reference_source.ref_file.fields.path
+        #end if
+ 
+        $input2 $input3
+
     #if $region
       -r $region
     #end if
@@ -15,7 +30,7 @@
     #end if]]>
   </command>
   <inputs>
-    <param format="fasta" name="input1" type="data" label="reference" help="fasta"/>
+    <expand macro="reference_loc"/>
     <param format="bam" name="input2" type="data" label="tumor bam" help="tumor sample bamfile"/>
     <param format="bam" name="input3" type="data" label="normal bam" help="normal sample bamfile"/>
     <param name="region" type="text" optional="true" label="region" help="(chr:pos-pos)"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/muse_macros.xml	Thu Oct 18 08:06:06 2018 -0400
@@ -0,0 +1,22 @@
+<macros>
+  <macro name="reference_loc">
+      <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="muse_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/tool-data/muse_index.loc	Thu Oct 18 08:06:06 2018 -0400
@@ -0,0 +1,38 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of MuSE  fasta files. You will need
+#to create these data files and then create a muse_index.loc file
+#similar to this one (store it in this directory) that points to
+#the directories in which those files are stored. The muse_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 mutect2_indexes.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.
+#
+hg38	hg38	GRCh38.d1.vd1.fa	/cvmfs/elixir-italy.galaxy.refdata/GRCh38.d1.vd1/GRCh38.d1.vd1.fa
+hg38	hg38	hg38_GATK_bundle	/cvmfs/elixir-italy.galaxy.refdata/index_GATK_bundle/Homo_sapiens_assembly38/Homo_sapiens_assembly38.fasta
+hg19	hg19	hg19_GATK_bundle	/cvmfs/elixir-italy.galaxy.refdata/index_GATK_bundle/ucsc.hg19/ucsc.hg19.fasta
+