changeset 6:ecbdfc775b9a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse commit fe77b125826ab5cbd0a235f957d66e544b658a98
author iuc
date Sat, 25 Jun 2016 16:44:39 -0400
parents ae9382cfb6ac
children 1e74f16adaa1
files jbrowse.xml macros.xml
diffstat 2 files changed, 52 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/jbrowse.xml	Sat Jun 25 15:06:43 2016 -0400
+++ b/jbrowse.xml	Sat Jun 25 16:44:39 2016 -0400
@@ -1,4 +1,4 @@
-<tool id="jbrowse" name="JBrowse" version="0.5">
+<tool id="jbrowse" name="JBrowse" version="0.5.2">
   <description>genome browser</description>
   <macros>
     <import>macros.xml</import>
@@ -72,11 +72,13 @@
     <metadata>
         <gencode>$gencode</gencode>
         <genomes>
-            #if str($action.genomes) != "None":
-            #for $genome in $action.genomes:
-                <genome>$genome</genome>
-            #end for
-            #end if
+              #if str($action.reference_genome.genome_type_select) == "indexed":
+                <genome>${action.reference_genome.genomes.fields.path}</genome>
+              #else
+                #for $genome in $action.reference_genome.genomes:
+                    <genome>$genome</genome>
+                #end for
+              #end if
         </genomes>
         <general>
             <defaultLocation>${jbgen.defaultLocation}</defaultLocation>
@@ -224,20 +226,13 @@
             <option value="update">Update exising JBrowse Instance</option>
         </param>
         <when value="create">
-            <param label="Fasta Sequence(s)"
-                   name="genomes"
-                   type="data"
-                   format="fasta"
-                   multiple="True"/>
+            <expand macro="genome_selector" />
        </when>
         <when value="update">
-            <param label="Additional Fasta Sequence(s)"
-                   help="If sequences are selected, they will be added to the existing JBrowse instance. You should not select any sequences if you are simply updating an existing JBrowse instance which already has the required reference sequences."
-                   name="genomes"
-                   type="data"
-                   format="fasta"
-                   optional="True"
-                   multiple="True"/>
+            <expand macro="genome_selector"
+              label="Additional Fasta Sequence(s)"
+              help="If sequences are selected, they will be added to the existing JBrowse instance. You should not select any sequences if you are simply updating an existing JBrowse instance which already has the required reference sequences."
+              optional="True"/>
             <param label="Previous JBrowse Instance"
                    name="update_jbrowse"
                    type="data"
--- a/macros.xml	Sat Jun 25 15:06:43 2016 -0400
+++ b/macros.xml	Sat Jun 25 16:44:39 2016 -0400
@@ -28,6 +28,43 @@
 This Galaxy tool relies on the JBrowse, maintained by the GMOD Community. The Galaxy wrapper is developed by Eric Rasche
 ]]>
   </token>
+  
+  <xml name="genome_selector"
+    token_help=""
+    token_label="Fasta sequences"
+    token_optional="False" >
+    <conditional name="reference_genome">
+        <param help="Built-in references" label="Reference genome to display" name="genome_type_select" type="select">
+            <option selected="True" value="indexed">Use a built-in genome</option>
+            <option value="history">Use a genome from history</option>
+        </param>
+        <when value="indexed">
+            <param 
+              help="@HELP@"
+              label="@LABEL@"
+              name="genomes"
+              type="select"
+              optional="@OPTIONAL@"
+              >
+                <options from_data_table="all_fasta">
+                    <filter column="2" type="sort_by" />
+                    <validator message="No genomes are available for the selected input dataset" type="no_options" />
+                </options>
+            </param>
+        </when>
+        <when value="history">
+            <param 
+              format="fasta"
+              label="@LABEL@"
+              help="@HELP@"
+              name="genomes"
+              type="data"
+              optional="@OPTIONAL@"
+              multiple="True" />
+        </when>
+    </conditional>
+  </xml>
+  
   <xml name="auto_manual_tk"
       token_cond_label="Color"
       token_cond_name="color"
@@ -220,8 +257,8 @@
   </xml>
   <xml name="track_styling"
        token_classname="feature"
-       token_label="name,id"
-       token_description="note,description"
+       token_label="prodcut,name,id"
+       token_description="note"
        token_height="100px">
     <section name="jbstyle" title="JBrowse Styling Options [Advanced]" expanded="false">
         <param label="JBrowse style.className" type="text"