diff jbrowse2.xml @ 35:15da358c3108 draft

planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
author fubar
date Wed, 28 Feb 2024 10:08:57 +0000
parents 2893ef33fba9
children 5f39f745682f
line wrap: on
line diff
--- a/jbrowse2.xml	Sun Feb 25 04:18:53 2024 +0000
+++ b/jbrowse2.xml	Wed Feb 28 10:08:57 2024 +0000
@@ -93,107 +93,110 @@
     <tracks>
         #for $tg in $track_groups:
             #for $track in $tg.data_tracks:
-            <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
-                #if $track.data_format.data_format_select != "sparql":
-                    <files>
-                    #set dataset = $track.data_format.annotation
-                      <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.name}">
-                        <metadata>
-                          <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}"
-                              size="${dataset.get_size(nice_size=True)}"
-                              edam_format="${dataset.datatype.edam_format}"
-                              file_ext="${dataset.ext}" />
-                          <history id="${__app__.security.encode_id($dataset.history_id)}"
-                              #if $dataset.history.user:
-                              user_email="${dataset.history.user.email}"
-                              user_id="${dataset.history.user_id}"
-                              display_name="${dataset.history.get_display_name()}"/>
-                              #else
-                              user_email="anonymous"
-                              user_id="-1"
-                              display_name="Unnamed History"/>
-                              #end if
-                          <metadata
-                            #for (key, value) in $dataset.get_metadata().items():
-                            #if "_types" not in $key and $value is not None and len(str($value)) < 5000:
-                              #if isinstance($value, list):
-                                #set value_str = "[%s]" % ','.join([str(val) for val in value])
-                                ${key}="$value_str"
-                              #else
-                                ${key}="${value}"
-                              #end if
-                            #end if
-                            #end for
-                              />
-                          <tool
-                              tool_id="${dataset.creating_job.tool_id}"
-                              tool_version="${dataset.creating_job.tool_version}"
-                              />
-                        </metadata>
-                      </trackFile>
-                    </files>
-                #else
-                        <track cat="${tg.category}" format="sparql" visibility="off">
-                #end if
+                <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
+                    #if $track.data_format.data_format_select != "sparql":
+                        #for $dataset in $track.data_format.annotation:
+                            <files>
+                              <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.name}">
+                                <metadata>
+                                  <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}"
+                                      size="${dataset.get_size(nice_size=True)}"
+                                      edam_format="${dataset.datatype.edam_format}"
+                                      file_ext="${dataset.ext}" />
+                                  <history id="${__app__.security.encode_id($dataset.history_id)}"
+                                      #if $dataset.history.user:
+                                      user_email="${dataset.history.user.email}"
+                                      user_id="${dataset.history.user_id}"
+                                      display_name="${dataset.history.get_display_name()}"/>
+                                      #else
+                                      user_email="anonymous"
+                                      user_id="-1"
+                                      display_name="Unnamed History"/>
+                                      #end if
+                                  <metadata
+                                    #for (key, value) in $dataset.get_metadata().items():
+                                    #if "_types" not in $key and $value is not None and len(str($value)) < 5000:
+                                      #if isinstance($value, list):
+                                        #set value_str = "[%s]" % ','.join([str(val) for val in value])
+                                        ${key}="$value_str"
+                                      #else
+                                        ${key}="${value}"
+                                      #end if
+                                    #end if
+                                    #end for
+                                      />
+                                  <tool
+                                      tool_id="${dataset.creating_job.tool_id}"
+                                      tool_version="${dataset.creating_job.tool_version}"
+                                      />
+                                </metadata>
+                              </trackFile>
+                            </files>
+                        #end for
+                    #else
+                            <track cat="${tg.category}" format="sparql" visibility="off">
+                    #end if
 
-                <options>
+                    <options>
 
-                #if str($track.data_format.data_format_select) == "pileup":
-                    <pileup>
-                        <bam_indices>
-                            <bam_index>${dataset.metadata.bam_index}</bam_index>
-                        </bam_indices>
-                    </pileup>
-                #else if str($track.data_format.data_format_select) == "cram":
-                    <cram>
-                        <cram_indices>
-                            <cram_index>${dataset.metadata.cram_index}</cram_index>
-                        </cram_indices>
-                    </cram>
-                #else if str($track.data_format.data_format_select) == "blast":
-                    <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) == "gene_calls":
-                    <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>
-                        <genome>
-                        #for gnome in $track.data_format.synteny_genome:
-                            $gnome,
-                        #end for
-                        </genome>
-                        <genome_label>
-                        #for gnome in $track.data_format.synteny_genome:
-                            $gnome.name,
-                        #end for
-                        </genome_label>
-                    </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) == "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>
-            </track>
-        #end for
+                    #if str($track.data_format.data_format_select) == "bam":
+                        <pileup>
+                            #for $dataset in $track.data_format.annotation:
+                                <bam_index>${dataset.metadata.bam_index}</bam_index>
+                            #end for
+                        </pileup>
+                    #else if str($track.data_format.data_format_select) == "cram":
+                        <cram>
+                            <cram_indices>
+                            #for $dataset in $track.data_format.annotation:
+                                <cram_index>${dataset.metadata.cram_index}</cram_index>
+                            #end for
+                            </cram_indices>
+                        </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) == "gene_calls":
+                        <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>
+                            <genome>
+                            #for gnome in $track.data_format.synteny_genome:
+                                $gnome,
+                            #end for
+                            </genome>
+                            <genome_label>
+                            #for gnome in $track.data_format.synteny_genome:
+                                $gnome.name,
+                            #end for
+                            </genome_label>
+                        </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) == "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>
+                </track>
+                #end for
     #end for
     </tracks>
 </root>
@@ -238,19 +241,18 @@
             <repeat name="data_tracks" title="Annotation Track">
                 <conditional name="data_format" label="Track Data Selection Options">
                     <param type="select" label="Track Type" name="data_format_select">
-                        <option value="pileup">BAM Pileup track</option>
-                        <option value="wiggle">BigWig track</option>
-                        <option value="blast">Blast XML track - converted to GFF</option>
+                        <option value="bam">BAM Pileup track</option>
+                        <option value="bigwig">BigWig track</option>
+                        <option value="blastxml">Blast XML track - converted to GFF</option>
                         <option value="cool">HiC as cool/mcool/scool format files</option>
                         <option value="cram">CRAM</option>
                         <option value="gene_calls" selected="true">GFF/GFF3/BED feature track</option>
                         <option value="hic">HiC as juicebox_hic format file. Tabular hic_matrix will NOT work.</option>
                         <option value="maf">Multiple alignment format. Reference name must match the MAF name exactly to work correctly</option>
                         <option value="paf">PAF - approximate mapping positions between two set of sequences</option>
-                        <option value="sparql">SPARQL</option>
                        <option value="vcf">VCF SNP</option>
                     </param>
-                    <when value="blast">
+                    <when value="blastxml">
                         <expand macro="input_conditional" label="BlastXML Track Data" format="blastxml" />
 
                         <param label="Features used in Blast Search"
@@ -297,7 +299,7 @@
                         </conditional>
                         <expand macro="track_visibility" />
                     </when>
-                    <when value="pileup">
+                    <when value="bam">
                         <expand macro="input_conditional" label="BAM Track Data" format="bam" />
                         <expand macro="track_visibility" />
                     </when>
@@ -309,12 +311,12 @@
                         <expand macro="input_conditional" label="MAF Track Data" format="maf" />
                         <expand macro="track_visibility" />
                     </when>
-                    <when value="wiggle">
+                    <when value="bigwig">
                         <expand macro="input_conditional" label="BigWig Track Data" format="bigwig" />
                         <expand macro="track_visibility" />
                     </when>
                     <when value="paf">
-                        <param label="Comparison genome sequence" help="Paf from these as the references, using the real reference as the reads to map"
+                        <param label="Comparison genome sequence" help="Paf from these as the reference(s), using the common reference as the reads to map"
                             format="fasta"
                             name="synteny_genome"
                             type="data"
@@ -331,55 +333,6 @@
                         <expand macro="input_conditional" label="HiC data in cool/mcool/scool format" format="cool,mcool,scool" />
                         <expand macro="track_visibility" />
                     </when>
-                    <when value="sparql">
-                        <param type="text" label="SPARQL Server URL" name="url" />
-                        <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>
-                        <param type="text" label="SPARQL reference names query" help="This query should return a line for each reference name in a `refName` column" name="query_refnames" 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_visibility" />
-                    </when>
                 </conditional>
             </repeat>
         </repeat>