diff jbrowse.xml @ 25:1cfc579079a6 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse commit b6f9a87b6091cc881a49e0b6acfadc5e7786967f
author iuc
date Tue, 29 Jan 2019 05:34:16 -0500
parents dba3c47e1798
children 08776ba76cf5
line wrap: on
line diff
--- a/jbrowse.xml	Wed Jan 16 03:28:29 2019 -0500
+++ b/jbrowse.xml	Tue Jan 29 05:34:16 2019 -0500
@@ -4,9 +4,8 @@
     <import>macros.xml</import>
   </macros>
   <expand macro="requirements"/>
-  <expand macro="stdio"/>
   <version_command>python '${__tool_directory__}/jbrowse.py' --version</version_command>
-  <command><![CDATA[
+  <command detect_errors="aggressive"><![CDATA[
 #if $action.action_select == "create":
     mkdir -p $output.files_path &&
 #else:
@@ -73,31 +72,29 @@
                   <metadata />
               </genome>s
             #else
-              #for $genome in $reference_genome.genomes:
-                  <genome path="$genome">
-                    <metadata>
-                      <dataset id="${__app__.security.encode_id($genome.id)}" hid="${genome.hid}"
-                          size="${genome.get_size(nice_size=True)}"
-                          edam_format="${genome.datatype.edam_format}"
-                          file_ext="${genome.ext}" />
-                      <history id="${__app__.security.encode_id($genome.history_id)}"
-                          user_email="${genome.history.user.email}"
-                          user_id="${genome.history.user_id}"
-                          display_name="${genome.history.get_display_name()}"/>
-                      <metadata
-                          #for (key, value) in $genome.get_metadata().items():
-                          #if "_types" not in $key:
-                          ${key}="${value}"
-                          #end if
-                          #end for
-                          />
-                      <tool
-                          tool_id="${genome.creating_job.tool_id}"
-                          tool_version="${genome.creating_job.tool_version}"
-                          />
-                    </metadata>
-                  </genome>
-              #end for
+              <genome path="$reference_genome.genome">
+                <metadata>
+                  <dataset id="${__app__.security.encode_id($reference_genome.genome.id)}" hid="${reference_genome.genome.hid}"
+                      size="${reference_genome.genome.get_size(nice_size=True)}"
+                      edam_format="${reference_genome.genome.datatype.edam_format}"
+                      file_ext="${reference_genome.genome.ext}" />
+                  <history id="${__app__.security.encode_id($reference_genome.genome.history_id)}"
+                      user_email="${reference_genome.genome.history.user.email}"
+                      user_id="${reference_genome.genome.history.user_id}"
+                      display_name="${reference_genome.genome.history.get_display_name()}"/>
+                  <metadata
+                      #for (key, value) in $reference_genome.genome.get_metadata().items():
+                      #if "_types" not in $key:
+                      ${key}="${value}"
+                      #end if
+                      #end for
+                      />
+                  <tool
+                      tool_id="${reference_genome.genome.creating_job.tool_id}"
+                      tool_version="${reference_genome.genome.creating_job.tool_version}"
+                      />
+                </metadata>
+              </genome>
             #end if
         </genomes>
         <general>
@@ -117,12 +114,8 @@
     <tracks>
         #for $tg in $track_groups:
         #for $track in $tg.data_tracks:
-        #if $track.data_format.data_format_select == "rest":
         <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
-            <url>${track.data_format.url}</url>
-        </track>
-        #else:
-        <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
+            #if $track.data_format.data_format_select != "rest" and $track.data_format.data_format_select != "sparql":
             <files>
               #for $dataset in $track.data_format.annotation:
               <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.element_identifier}">
@@ -150,9 +143,10 @@
               </trackFile>
               #end for
             </files>
+            #end if
 
             <options>
-            #if str($track.data_format.data_format_select) == "gene_calls" or  str($track.data_format.data_format_select) == "blast":
+            #if str($track.data_format.data_format_select) == "gene_calls" or str($track.data_format.data_format_select) == "blast" or str($track.data_format.data_format_select) == "rest" or str($track.data_format.data_format_select) == "sparql":
                 <style>
                     <overridePlugins>${track.data_format.override_apollo_plugins}</overridePlugins>
                     <overrideDraggable>${track.data_format.override_apollo_drag}</overrideDraggable>
@@ -248,6 +242,7 @@
                   #else:
                     <bicolor_pivot>${track.data_format.jbcolor.bicolor_pivot.pivot_point}</bicolor_pivot>
                   #end if
+                  <multibigwig>${track.data_format.MultiBigWig}</multibigwig>
                 </wiggle>
             #else if str($track.data_format.data_format_select) == "pileup":
                 <pileup>
@@ -257,6 +252,7 @@
                         <bam_index>${dataset.metadata.bam_index}</bam_index>
                         #end for
                     </bam_indices>
+                    <chunkSizeLimit>${track.data_format.chunkSizeLimit}</chunkSizeLimit>
                 </pileup>
             #else if str($track.data_format.data_format_select) == "blast":
                 <blast>
@@ -290,25 +286,37 @@
                   #end if
                     <index>${track.data_format.index}</index>
                 </gff>
-##            #else if str($track.data_format.data_format_select) == "sparql":
-##                <sparql>
-##                    <url>${track.data_format.url}</url>
-##                    <label>${track.data_format.label}</label>
-##                    <!-- This is going to be an absolutey nightmare -->
-##                    <query>${track.data_format.query}</query>
-##                </sparql>
+            #else if str($track.data_format.data_format_select) == "rest":
+                <label>${track.data_format.label}</label>
+                <rest>
+                    <url>${track.data_format.url}</url>
+                </rest>
+            #else if str($track.data_format.data_format_select) == "sparql":
+                <label>${track.data_format.label}</label>
+                <sparql>
+                    <url>${track.data_format.url}</url>
+                    <query>${track.data_format.query}</query>
+                </sparql>
             #end if
             </options>
         </track>
-        #end if
         #end for
         #end for
     </tracks>
+    ## Disable plugins until https://github.com/GMOD/jbrowse/issues/1288 is fixed
+    ## <plugins
+    ##     ComboTrackSelector="${plugins.ComboTrackSelector}"
+    ##     Bookmarks="${plugins.Bookmarks}"
+    ##     GCContent="${plugins.GCContent}"
+    ##     BlastView="${plugins.BlastView}"
+    ##     theme="${plugins.theme}"
+    ##     />
     <plugins
         ComboTrackSelector="${plugins.ComboTrackSelector}"
-        Bookmarks="${plugins.Bookmarks}"
+        Bookmarks=""
         GCContent="${plugins.GCContent}"
-        theme="${plugins.theme}"
+        BlastView="${plugins.BlastView}"
+        theme=""
         />
 </root>]]></configfile>
   </configfiles>
@@ -335,9 +343,8 @@
             <param
               format="fasta"
               label="Select the reference genome"
-              name="genomes"
-              type="data"
-              multiple="True" />
+              name="genome"
+              type="data" />
         </when>
     </conditional>
 
@@ -390,7 +397,7 @@
                 <option value="wiggle">BigWig XY</option>
                 <option value="vcf">VCF SNPs</option>
                 <option value="rest">REST Endpoint</option>
-                <!--<option value="sparql">SPARQL</option>-->
+                <option value="sparql">SPARQL</option>
             </param>
             <when value="blast">
                 <expand macro="input_conditional" label="BlastXML Track Data" format="blastxml" />
@@ -456,7 +463,7 @@
                     <param type="select" label="JBrowse Track Type [Advanced]" name="track_class">
                         <option value="JBrowse/View/Track/HTMLFeatures">HTML Features</option>
                         <option value="JBrowse/View/Track/CanvasFeatures" selected="true">Canvas Features</option>
-                        <option value="BlastView/View/Track/CanvasFeatures">Blast Features</option>
+                        <option value="BlastView/View/Track/CanvasFeatures">Blast Features</option><!-- Disable plugins until https://github.com/GMOD/jbrowse/issues/1288 is fixed -->
                     </param>
                     <when value="JBrowse/View/Track/CanvasFeatures">
                         <section name="canvas_options" title="CanvasFeatures Options [Advanced]" expanded="false">
@@ -491,7 +498,7 @@
                                   optional="True"/>
                       </section>
                   </when>
-                  <when value="BlastView/View/Track/CanvasFeatures" />
+                  <!--when value="BlastView/View/Track/CanvasFeatures" /-->
                 </conditional>
                 <expand macro="track_styling" />
                 <expand macro="color_selection" />
@@ -506,6 +513,11 @@
                        name="auto_snp"
                        truevalue="true"
                        falsevalue="false" />
+                <param label="Maximum size of BAM chunks"
+                       name="chunkSizeLimit"
+                       type="integer"
+                       help="Maximum size in bytes of BAM chunks that the browser will try to deal with. When this is exceeded, most tracks will display 'Too much data' message."
+                       value="5000000" />
                 <expand macro="track_display" />
             </when>
             <when value="wiggle">
@@ -543,42 +555,93 @@
                     <option value="linear" selected="true">Linear</option>
                     <option value="log">Logarithmic (Dynamically Calculated)</option>
                 </param>
+
+                <param label="Use MultiBigWig Plugin" name="MultiBigWig" truevalue="True" falsevalue="" type="boolean"
+                    help="MultiBigWig is a plugin to group multiple big-wig tracks in a more aesthetically pleasing format and to show data in a higher density display." />
+
                 <expand macro="color_selection_minmax" />
                 <expand macro="track_display" />
             </when>
             <when value="rest">
                 <param type="text" label="REST Endpoint" name="url" />
+                <param type="text" label="Track Label" name="label" value="REST Genes" />
+                <expand macro="track_styling"
+                        classname="feature"
+                        label="description"
+                        description="Hit_titles"
+                        height="600px"/>
+                <expand macro="color_selection"
+                        token_scaling_lin_select="false"
+                        token_scaling_log_select="true" />
+                <expand macro="track_menu" />
+                <expand macro="track_display" />
             </when>
-            <!--
+
             <when value="sparql">
                 <param type="text" label="SPARQL Server URL" name="url" />
-                <param type="text" label="Track Label" name="key" value="SPARQL Genes" />
-                <param type="text" label="SPARQL Query" name="query" area="true" />
+                <param type="text" label="Track Label" name="label" value="SPARQL Genes" />
+                <param type="text" label="SPARQL Query" name="query" area="true">
+                    <sanitizer>
+                         <mapping initial="galaxy.util.mapped_chars">
+                           <add source="&#10;" target=" " />
+                           <add source="&gt;" target="__gt__" />
+                           <add source="&lt;" target="__lt__" />
+                         </mapping>
+                         <valid initial="default">
+                           <add value="|" />
+                           <add value="#" />
+                           <add value="{"/>
+                           <add value="}"/>
+                           <add value="!"/>
+                           <add value="?"/>
+                           <add value="&amp;"/>
+                           <add value="+"/>
+                           <add value="="/>
+                           <add value="'"/>
+                           <add value='"'/>
+                         </valid>
+                    </sanitizer>
+                </param>
+                <expand macro="track_styling"
+                        classname="feature"
+                        label="description"
+                        description="Hit_titles"
+                        height="600px"/>
+                <expand macro="color_selection"
+                        token_scaling_lin_select="false"
+                        token_scaling_log_select="true" />
+                <expand macro="track_menu" />
                 <expand macro="track_display" />
             </when>
-            -->
         </conditional>
     </repeat>
     </repeat>
 
     <expand macro="general_options" />
+    <!-- Disable plugins until https://github.com/GMOD/jbrowse/issues/1288 is fixed -->
     <section name="plugins" title="Plugins" expanded="false">
+
+        <param
+            label="BlastView" name="BlastView" truevalue="True" falsevalue="" type="boolean" checked="true"
+            help="A JBrowse plugin for viewing blast alignments. This plugin makes MANY assumptions about the format of your data, and may not work without those assumptions: 1) you use protein_match / match_part 2) your features have a Blast_qseq, Blast_mseq, and Blast_sseq attribute in their GFF3 representation." />
+
         <param
             label="Combo Track Selector" name="ComboTrackSelector" truevalue="True" falsevalue="" type="boolean"
             help="ComboTrackSelector is a plugin to allow the co-existence of the Hierarchical and Faceted Track selectors in JBrowse, built for/by the Arabidopsis Information Portal (Araport) project" />
-        <param
+        <!-- No way to disable now that it's built in jbrowse conda package -->
+        <!--param
             label="Bookmarks" name="Bookmarks" truevalue="True" falsevalue="" type="boolean"
-            help="JBrowse plugin allowing users to manage a persistent list of bookmarks kept in localstorage" />
+            help="JBrowse plugin allowing users to manage a persistent list of bookmarks kept in localstorage" /-->
 
         <param
             label="GC Content" name="GCContent" truevalue="True" falsevalue="" type="boolean"
             help="A JBrowse plugin for plotting GC Content and GC Skew. The plugin consists of a storeClass that automatically calculates the percentage of G/C bases in a region, a track type that derives from the Wiggle XY or density types, and a dialog box to adjust the sliding window size, window step size, and the calculation mode (content or skew)." />
 
-        <param type="select" label="JBrowse Theme" name="theme">
+        <!--param type="select" label="JBrowse Theme" name="theme">
             <option value="" selected="True">Default</option>
             <option value="Minimalist">Minimalist</option>
             <option value="Dark">Dark</option>
-        </param>
+        </param-->
     </section>
 
     <param type="hidden" name="uglyTestingHack" value="" />
@@ -590,7 +653,7 @@
     <test>
       <!-- gencode -->
       <param name="reference_genome|genome_type_select" value="history"/>
-      <param name="reference_genome|genomes" value="merlin.fa"/>
+      <param name="reference_genome|genome" value="merlin.fa"/>
       <param name="gencode" value="1" />
       <param name="standalone" value="Data Directory" />
       <param name="uglyTestingHack" value="enabled" />
@@ -598,7 +661,7 @@
     </test>
     <test>
       <param name="reference_genome|genome_type_select" value="history"/>
-      <param name="reference_genome|genomes" value="merlin.fa"/>
+      <param name="reference_genome|genome" value="merlin.fa"/>
       <param name="gencode" value="11" />
       <param name="standalone" value="Data Directory" />
       <param name="uglyTestingHack" value="enabled" />
@@ -606,7 +669,7 @@
     </test>
     <test>
       <param name="reference_genome|genome_type_select" value="history"/>
-      <param name="reference_genome|genomes" value="merlin.fa"/>
+      <param name="reference_genome|genome" value="merlin.fa"/>
       <param name="gencode" value="11" />
       <param name="standalone" value="Data Directory" />
       <repeat name="track_groups">
@@ -802,7 +865,7 @@
     </test>
     <test>
         <param name="reference_genome|genome_type_select" value="history"/>
-        <param name="reference_genome|genomes" value="merlin.fa"/>
+        <param name="reference_genome|genome" value="merlin.fa"/>
         <param name="gencode" value="11" />
         <param name="standalone" value="Data Directory" />
 
@@ -865,7 +928,7 @@
     </test>
     <test>
         <param name="reference_genome|genome_type_select" value="history"/>
-        <param name="reference_genome|genomes" value="merlin.fa"/>
+        <param name="reference_genome|genome" value="merlin.fa"/>
         <param name="gencode" value="11" />
         <param name="standalone" value="Data Directory" />
 
@@ -902,7 +965,7 @@
     </test>
     <test>
         <param name="reference_genome|genome_type_select" value="history"/>
-        <param name="reference_genome|genomes" value="merlin.fa"/>
+        <param name="reference_genome|genome" value="merlin.fa"/>
         <param name="gencode" value="11" />
         <param name="standalone" value="Data Directory" />
 
@@ -923,12 +986,59 @@
     <test>
         <!-- data_table -->
         <param name="reference_genome|genome_type_select" value="indexed"/>
-        <param name="reference_genome|genomes" value="merlin"/>
+        <param name="reference_genome|genome" value="merlin"/>
         <param name="gencode" value="1" />
         <param name="standalone" value="Data Directory" />
         <param name="uglyTestingHack" value="enabled" />
         <output name="output" file="gencode/test-data_table.xml" lines_diff="6" />
     </test>
+
+    <test>
+        <param name="reference_genome|genome_type_select" value="history"/>
+        <param name="reference_genome|genome" value="merlin.fa"/>
+        <param name="gencode" value="11" />
+        <param name="standalone" value="Data Directory" />
+
+        <repeat name="track_groups">
+            <param name="category" value="External endpoints" />
+            <repeat name="data_tracks">
+                <conditional name="data_format">
+                    <param name="data_format_select" value="rest"/>
+                    <param name="url" value="http://example.org.external/rest_api/"/>
+                    <param name="label" value="Rest api"/>
+                </conditional>
+            </repeat>
+            <repeat name="data_tracks">
+                <conditional name="data_format">
+                    <param name="data_format_select" value="sparql"/>
+                    <param name="url" value="http://example.org.external/sparql/"/>
+                    <param name="label" value="Sparql endpoint"/>
+                    <param name="query" value="  DEFINE sql:select-option 'order'
+  prefix rdf:    &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
+  select ?start,
+         ?end,
+         IF( ?faldo_type = faldo:ForwardStrandPosition,
+             1,
+             IF( ?faldo_type = faldo:ReverseStrandPosition,
+                 -1,
+                  0
+               )
+           ) as ?strand,
+         str(?obj_type_name) as ?type,
+         str(?label) as ?name,
+         str(?obj_name) as ?description,
+         ?obj as ?uniqueID,
+         ?parent as ?parentUniqueID
+  where {
+    values ?faldo_type { faldo:ForwardStrandPosition faldo:ReverseStrandPosition faldo:BothStrandsPosition }
+  }"/>
+                </conditional>
+            </repeat>
+        </repeat>
+
+        <param name="uglyTestingHack" value="enabled" />
+        <output name="output" file="endpoints/test.xml" lines_diff="48"/>
+    </test>
   </tests>
   <help><![CDATA[
 JBrowse-in-Galaxy
@@ -952,9 +1062,9 @@
 javascript functions to handle colouring of features which would be
 nearly impossible to write without the assistance of this tool.
 
-The JBrowse-in-Galaxy tool is maintained by `Eric
-Rasche <mailto:esr+jig@tamu.edu>`__, who you can contact if you
-encounter missing features or bugs.
+The JBrowse-in-Galaxy tool is maintained by `the Galaxy IUC
+<https://github.com/galaxyproject/tools-iuc/issues>`__, who you can help you
+with missing features or bugs in the tool.
 
 Options
 -------
@@ -966,11 +1076,12 @@
 will be shown from the dropdown selector within JBrowse, this is a known
 issue.
 
-**Standalone Instances** are a somewhat in-development feature.
+**Standalone Instances** enable you to have either a complete JBrowse instance
+in a dataset, or just the data directory without JBrowse (e.g. for Apollo).
 Currently Galaxy copies the entire JBrowse directory in order to have a
 complete, downloadable file that contains a ready-to-go JBrowse
 instance. This is obviously an anti-feature because users don't want a
-complete copy of JBrowse (6-20Mb) that's duplicated for every JBrowse
+complete copy of JBrowse (12Mb) that's duplicated for every JBrowse
 dataset in their history, and admins don't want useless copies of
 JBrowse on disk. Unfortunately we have not come up with the perfect
 solution just yet, but we're working on it! In the meantime, users have
@@ -981,10 +1092,7 @@
 
 **Genetic Code** is a new feature in v0.4 of JiG / v1.12.0 of JBrowse,
 which allows users to specify a non standard genetic code, and have
-JBrowse highlight the correct start and stop codons. If you would like
-to use a coding table not provided by this list, please let
-`me <mailto:esr+jig@tamu.edu>`__ know so that I may add support for
-this.
+JBrowse highlight the correct start and stop codons.
 
 **Track Groups** represent a set of tracks in a single category. These
 can be used to let your users understand relationships between large
@@ -1086,8 +1194,7 @@
 
 This is *strongly discouraged* for high coverage density datasets.
 Unfortunately there are no other configuration options exposed for bam
-files. If you find JBrowse options you wish to see exposed, please let
-`me <mailto:esr+jig@tamu.edu>`__ know.
+files.
 
 BlastXML
 ~~~~~~~~