changeset 88:efd1d41f11b4 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 22dfa93b72dddfc9eeb79ba02a7c76bc2967a5b9
author fubar
date Sun, 14 Apr 2024 03:49:10 +0000
parents de8fb46bc3ef
children 408781c080fc
files jbrowse2.xml test-data/jbrowse2_result02.zip
diffstat 2 files changed, 133 insertions(+), 123 deletions(-) [+]
line wrap: on
line diff
--- a/jbrowse2.xml	Wed Apr 10 07:33:52 2024 +0000
+++ b/jbrowse2.xml	Sun Apr 14 03:49:10 2024 +0000
@@ -1,4 +1,4 @@
- <tool id="jbrowse2" name="JBrowse2" version="@TOOL_VERSION@+@WRAPPER_VERSION@_12" profile="22.05">
+ <tool id="jbrowse2" name="JBrowse2" version="@TOOL_VERSION@+@WRAPPER_VERSION@_14" profile="22.05">
     <description>genome browser</description>
     <macros>
         <import>macros.xml</import>
@@ -99,7 +99,7 @@
                 #else
                   <genome path="$assembly.reference_genome.genome" label="${assembly.reference_genome.genome.name}" useuri="no">
                     <metadata>
-                    #if $uglyTestingHack != "enabled":
+
                       <dataset id="${__app__.security.encode_id($assembly.reference_genome.genome.id)}"
                           hid="${assembly.reference_genome.genome.hid}"
                           size="${assembly.reference_genome.genome.get_size(nice_size=True)}"
@@ -135,34 +135,38 @@
                           tool_id="${assembly.reference_genome.genome.creating_job.tool_id}"
                           tool_version="${assembly.reference_genome.genome.creating_job.tool_version}"
                           />
-                    #end if
+
                     </metadata>
                   </genome>
                 #end if
             </genomes>
-
     </metadata>
     <tracks>
         #for $tg in $assembly.track_groups:
             #for $track in $tg.data_tracks:
+                #set input_exists = "False"
                 #if $track.data_format.useuri.insource == "uri":
-                    <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
-                        <files>
-                             <trackFile path="${track.data_format.useuri.annouri}" ext="${track.data_format.data_format_select}"
-                                label="${track.data_format.useuri.annoname}" useuri="yes">
-                                <metadata>
-                                <dataset id = "${track.data_format.useuri.annouri}" />
-                                </metadata>
-                             </trackFile>
-                        </files>
+                        #if $track.data_format.useuri.annouri:
+                        #set input_exists = "True"
+                        <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
+                            <files>
+                                 <trackFile path="${track.data_format.useuri.annouri}" ext="${track.data_format.data_format_select}"
+                                    label="${track.data_format.useuri.annoname}" useuri="yes">
+                                    <metadata>
+                                    <dataset id = "${track.data_format.useuri.annouri}" />
+                                    </metadata>
+                                 </trackFile>
+                            </files>
+                        #end if
                 #else if $track.data_format.useuri.insource == "history":
                     #if $track.data_format.useuri.annotation:
+                        #set input_exists = "True"
                     <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
                     <files>
                         #for $dataset in $track.data_format.useuri.annotation:
                               <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.name}" useuri="no">
                                 <metadata>
-                                #if $uglyTestingHack != "enabled":
+
                                   <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}"
                                       size="${dataset.get_size(nice_size=True)}"
                                       edam_format="${dataset.datatype.edam_format}"
@@ -194,113 +198,112 @@
                                       tool_id="${dataset.creating_job.tool_id}"
                                       tool_version="${dataset.creating_job.tool_version}"
                                       />
-                                #end if
                                 </metadata>
                               </trackFile>
-                       #end for
+                        #end for
                     </files>
                     #end if
-                  #end if
-                  #if $uglyTestingHack != "enabled":
-                  <options>
-                    <style>
-                        #if str($track.data_format.data_format_select) in ["gff", "bed", "maf", "blastxml"]:
-                            <type>${track.data_format.jbstyle.display}</type>
-                            #if str($track.data_format.jbstyle.display) in ["LinearBasicDisplay", "LinearVariantDisplay"]:
-                                <trackShowLabels>${track.data_format.jbstyle.show_labels}</trackShowLabels>
-                                <trackShowDescriptions>${track.data_format.jbstyle.show_descriptions}</trackShowDescriptions>
+                #end if
+                #if $input_exists == "True":
+                      <options>
+                        <style>
+                            #if str($track.data_format.data_format_select) in ["gff", "bed", "maf", "blastxml"]:
+                                <type>${track.data_format.jbstyle.display}</type>
+                                #if str($track.data_format.jbstyle.display) in ["LinearBasicDisplay", "LinearVariantDisplay"]:
+                                    <trackShowLabels>${track.data_format.jbstyle.show_labels}</trackShowLabels>
+                                    <trackShowDescriptions>${track.data_format.jbstyle.show_descriptions}</trackShowDescriptions>
+                                #end if
+                            #else if str($track.data_format.data_format_select) == "vcf":
+                                <type>${track.data_format.jbstyle.track_style.display}</type>
+                                #if str($track.data_format.jbstyle.track_style.display) in ["LinearBasicDisplay", "LinearVariantDisplay"]:
+                                    <trackShowLabels>${track.data_format.jbstyle.track_style.show_labels}</trackShowLabels>
+                                    <trackShowDescriptions>${track.data_format.jbstyle.track_style.show_descriptions}</trackShowDescriptions>
+                                #end if
+
+                            #end if
+                            #if str($track.data_format.data_format_select) in ["bam", "cram"]:
+                                <type>LinearAlignmentsDisplay</type>
+                            #end if
+                            #if str($track.data_format.data_format_select) in ["hic", "cool", "mcool", "scool"]:
+                                <type>LinearHicDisplay</type>
                             #end if
-                        #else if str($track.data_format.data_format_select) == "vcf":
-                            <type>${track.data_format.jbstyle.track_style.display}</type>
-                            #if str($track.data_format.jbstyle.track_style.display) in ["LinearBasicDisplay", "LinearVariantDisplay"]:
-                                <trackShowLabels>${track.data_format.jbstyle.track_style.show_labels}</trackShowLabels>
-                                <trackShowDescriptions>${track.data_format.jbstyle.track_style.show_descriptions}</trackShowDescriptions>
-                            #end if
-
-                        #end if
-                        #if str($track.data_format.data_format_select) in ["bam", "cram"]:
-                            <type>LinearAlignmentsDisplay</type>
-                        #end if
-                        #if str($track.data_format.data_format_select) in ["hic", "cool", "mcool", "scool"]:
-                            <type>LinearHicDisplay</type>
+                        </style>
+                        #if str($track.data_format.data_format_select) == "bam":
+                            <bam>
+                            <bam_index>
+                                #for $dataset in $track.data_format.useuri.annotation:
+                                    ${dataset.name},${dataset.metadata.bam_index}
+                                #end for
+                            </bam_index>
+                            </bam>
+                        #else if str($track.data_format.data_format_select) == "cram":
+                            <cram>
+                            <cram_index>
+                                #for $dataset in $track.data_format.useuri.annotation:
+                                    ${dataset.name},${dataset.metadata.cram_index}
+                                #end for
+                            </cram_index>
+                            </cram>
+                        #else if str($track.data_format.data_format_select) == "blastxml":
+                            <blast>
+                              #if str($track.data_format.blast_parent) != "":
+                                <parent>${track.data_format.blast_parent}</parent>
+                              #end if
+                                <protein>${track.data_format.is_protein}</protein>
+                                <min_gap>${track.data_format.min_gap}</min_gap>
+                            </blast>
+                        #else if str($track.data_format.data_format_select) == "gff":
+                            <gff>
+                              #if $track.data_format.match_part.match_part_select == "true":
+                                <match>${track.data_format.match_part.name}</match>
+                              #end if
+                            </gff>
+                        #else if str($track.data_format.data_format_select) == "paf":
+                            <paf>
+                                #if $track.data_format.pafuseuri.insource == "history":
+                                <genome>
+                                    #for $anno in $track.data_format.pafuseuri.annotation:
+                                        ${anno},
+                                    #end for
+                                </genome>
+                                <genome_label>
+                                    #for $anno in $track.data_format.pafuseuri.annotation:
+                                            ${anno.name},
+                                    #end for
+                                </genome_label>
+                                #else:
+                                <genome>
+                                    #for $refgenome in $track.data_format.pafuseuri.refuri:
+                                        $refgenome.annotation,
+                                    #end for
+                                </genome>
+                                <genome_label>
+                                    #for $refgenome in $track.data_format.pafuseuri.refuri:
+                                        ${refgenome.annoname},
+                                    #end for
+                                </genome_label>
+                                #end if
+                            </paf>
+                        #else if str($track.data_format.data_format_select) == "hic":
+                            <hic>
+                            </hic>
+                        #else if str($track.data_format.data_format_select) == "cool":
+                            <cool>
+                            </cool>
+                        #else if str($track.data_format.data_format_select) == "bed":
+                            <bed>
+                            </bed>
+                        #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>
+                                <query_refnames>${track.data_format.query_refnames}</query_refnames>
+                            </sparql>
                         #end if
-                    </style>
-                    #if str($track.data_format.data_format_select) == "bam":
-                        <bam>
-                        <bam_index>
-                            #for $dataset in $track.data_format.useuri.annotation:
-                                ${dataset.name},${dataset.metadata.bam_index}
-                            #end for
-                        </bam_index>
-                        </bam>
-                    #else if str($track.data_format.data_format_select) == "cram":
-                        <cram>
-                        <cram_index>
-                            #for $dataset in $track.data_format.useuri.annotation:
-                                ${dataset.name},${dataset.metadata.cram_index}
-                            #end for
-                        </cram_index>
-                        </cram>
-                    #else if str($track.data_format.data_format_select) == "blastxml":
-                        <blast>
-                          #if str($track.data_format.blast_parent) != "":
-                            <parent>${track.data_format.blast_parent}</parent>
-                          #end if
-                            <protein>${track.data_format.is_protein}</protein>
-                            <min_gap>${track.data_format.min_gap}</min_gap>
-                        </blast>
-                    #else if str($track.data_format.data_format_select) == "gff":
-                        <gff>
-                          #if $track.data_format.match_part.match_part_select == "true":
-                            <match>${track.data_format.match_part.name}</match>
-                          #end if
-                        </gff>
-                    #else if str($track.data_format.data_format_select) == "paf":
-                        <paf>
-                            #if $track.data_format.pafuseuri.insource == "history":
-                            <genome>
-                                #for $anno in $track.data_format.pafuseuri.annotation:
-                                    ${anno},
-                                #end for
-                            </genome>
-                            <genome_label>
-                                #for $anno in $track.data_format.pafuseuri.annotation:
-                                        ${anno.name},
-                                #end for
-                            </genome_label>
-                            #else:
-                            <genome>
-                                #for $refgenome in $track.data_format.pafuseuri.refuri:
-                                    $refgenome.annotation,
-                                #end for
-                            </genome>
-                            <genome_label>
-                                #for $refgenome in $track.data_format.pafuseuri.refuri:
-                                    ${refgenome.annoname},
-                                #end for
-                            </genome_label>
-                            #end if
-                        </paf>
-                    #else if str($track.data_format.data_format_select) == "hic":
-                        <hic>
-                        </hic>
-                    #else if str($track.data_format.data_format_select) == "cool":
-                        <cool>
-                        </cool>
-                    #else if str($track.data_format.data_format_select) == "bed":
-                        <bed>
-                        </bed>
-                    #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>
-                            <query_refnames>${track.data_format.query_refnames}</query_refnames>
-                        </sparql>
-                    #end if
-                    </options>
-                    #end if
+                        </options>
                   </track>
+                  #end if
             #end for
         #end for
     </tracks>
@@ -311,13 +314,14 @@
 ]]></configfile>
     </configfiles>
     <inputs>
-        <repeat name="assemblies" min="1" title="Genome Assembly" help="When too many genomes are never enough">
+        <repeat name="assemblies" min="1" title="Genome reference to provide display coordinates for this set of tracks"
+           help="JBrowse2 can show a set of tracks for each of multiple genome reference fasta files">
         <conditional name="reference_genome">
             <param help="Select a built in, history or remote tabix URI for the reference track"
                  label="Reference genome source" 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>
-                <option value="uri">URI for a reference as tabix with predictable index file URI</option>
+                <option selected="True" value="indexed">Use a Galaxy server built-in genome</option>
+                <option value="history">Use a genome fasta file from the current history</option>
+                <option value="uri">Provide a URI (e.g. "https://..." for a genome reference as tabix bgzip with predictable index file URI</option>
             </param>
             <when value="indexed">
                 <param
@@ -380,7 +384,6 @@
                     </param>
                     <when value="blastxml">
                         <expand macro="input_conditional" label="BlastXML Track Data" format="blastxml" />
-
                         <param label="Features used in Blast Search"
                             help="in GFF3. This is used  so we know where to map features. E.g. where results of which CDS Protein32 match up to. The query IDs in your blast results should MATCH some feature
                             IDs in your GFF3 file. This is an optional field and is most useful if using JBrowse to display protein blast results on a DNA genome. blastn results don't need this,
@@ -389,7 +392,6 @@
                             name="blast_parent"
                             optional="true"
                             type="data"/>
-
                         <param label="Minimum Gap Size"
                             help="before a new match_part feature is created"
                             name="min_gap"
@@ -459,7 +461,6 @@
                             format="fasta" help="Paf from these as the reference(s), using the common reference as the reads to map"/>
                         <expand macro="track_visibility" />
                     </when>
-
                     <when value="hic">
                         <expand macro="input_conditional" label="Binary Juicebox HiC data" format="hic,juicebox_hic" />
                         <expand macro="track_visibility" />
@@ -564,6 +565,15 @@
                             </conditional>
                         </conditional>
                     </repeat>
+                    <repeat name="data_tracks">
+                        <conditional name="data_format">
+                            <param name="data_format_select" value="bam"/>
+                            <conditional name="useuri">
+                                <param name="insource" value="history"/>
+                                <param name="annotation" value=""/>
+                            </conditional>
+                        </conditional>
+                    </repeat>
                 </repeat>
             </repeat>
             <repeat name="assemblies">
@@ -658,8 +668,8 @@
                     <has_archive_member path="merlin-sample.bam_5.bam"/>
                     <has_archive_member path="merlinlastz.maf_6.maf.sorted.bed.gz.tbi"/>
                     <has_archive_member path="merlin.blastxml_7.blastxml.gz"/>
-                    <has_archive_member path="dm3test.cool_8.cool.hic"/>
-                    <has_archive_member path="peach-grape-map.paf_9.paf"/>
+                    <has_archive_member path="dm3test.cool_9.cool.hic"/>
+                    <has_archive_member path="peach-grape-map.paf_10.paf"/>
                     <has_archive_member path="Merlin.fa.gz.fai"/>
                     <has_archive_member path="config.json">
                         <has_json_property_with_text property="name" text="Merlin" />
Binary file test-data/jbrowse2_result02.zip has changed