changeset 36:5f39f745682f draft

planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
author fubar
date Thu, 29 Feb 2024 00:47:58 +0000
parents 15da358c3108
children 7adde511daa1
files __pycache__/jbrowse2.cpython-310.pyc autogenJB2.py autogenJB2.xml jbrowse2.xml
diffstat 4 files changed, 28 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
Binary file __pycache__/jbrowse2.cpython-310.pyc has changed
--- a/autogenJB2.py	Wed Feb 28 10:08:57 2024 +0000
+++ b/autogenJB2.py	Thu Feb 29 00:47:58 2024 +0000
@@ -109,9 +109,9 @@
                             }
                         }
                 elif trext == 'bam':
-                     track_conf["conf"] = {"options": {"bam": {"bam_indices": {"bam_index": track[3]}}}}
+                     track_conf = {"conf": {"options": {"bam": {"bam_indices": {"bam_index": track[3]}}}}}
                 elif trext == 'cram':
-                     track_conf["conf"] = {"options": {"cram": {"cram_indices": {"cram_index": track[3]}}}}
+                     track_conf = {"conf": {"options": {"cram": {"cram_indices": {"cram_index": track[3]}}}}}
                 else:
                     track_conf = {}
                 track_conf["format"] = trext
--- a/autogenJB2.xml	Wed Feb 28 10:08:57 2024 +0000
+++ b/autogenJB2.xml	Thu Feb 29 00:47:58 2024 +0000
@@ -1,4 +1,4 @@
- <tool id="autogenjb2" name="autogenjb2" version="2.10.2_0" profile="22.05">
+ <tool id="autogenjb2" name="autogenjb2" version="2.10.2.0" profile="22.05">
     <description>Track collection to JBrowse2</description>
     <macros>
         <import>macros.xml</import>
@@ -26,10 +26,10 @@
 --sessName "Autogen JBrowse" &&
 
   cp '$output.files_path/index.html' '$output'
-
 ## Ugly testing hack since I cannot get <extra_files> to test the files I want to test. Hmph.
-
-
+#if str($uglyTestingHack) == "enabled":
+ &&   cp '$output.files_path/config.json' '$output'
+#end if
   ]]></command>
     <inputs>
         <param
@@ -37,11 +37,31 @@
                     name="autoCollection"
                     type="data_collection">
         </param>
+   <param type="hidden" name="uglyTestingHack" value="" />
     </inputs>
     <outputs>
         <data format="html" name="output" label="AutoJBrowse2"/>
     </outputs>
+<tests>
+ <test>
+      <param name="uglyTestingHack" value="enabled" />
+      <param name="autoCollection">
+        <collection type="list">
+          <element name="Merlin" value="merlin.fa" ftype="fasta"/>
+          <element name="merlin-sample.bam" value="bam/merlin-sample.bam" ftype="bam"/>
+        </collection>
+      </param>
+            <output name="output">
+                <assert_contents>
+                    <has_text text='"name": "Merlin",'/>
+                    <has_text text='"name": "merlin-sample.bam",'/>
+                    <has_text text='"uri": "Merlin.fa.gz.fai"'/>
+                    <has_text text='"uri": "bam_0_merlin-sample.bam.bam.bai"'/>
 
+                </assert_contents>
+            </output>
+    </test>
+</tests>
     <help><![CDATA[
 
 JBrowse2-in-Galaxy
--- a/jbrowse2.xml	Wed Feb 28 10:08:57 2024 +0000
+++ b/jbrowse2.xml	Thu Feb 29 00:47:58 2024 +0000
@@ -140,11 +140,11 @@
                     <options>
 
                     #if str($track.data_format.data_format_select) == "bam":
-                        <pileup>
+                        <bam>
                             #for $dataset in $track.data_format.annotation:
                                 <bam_index>${dataset.metadata.bam_index}</bam_index>
                             #end for
-                        </pileup>
+                        </bam>
                     #else if str($track.data_format.data_format_select) == "cram":
                         <cram>
                             <cram_indices>