diff cooc_tabmut.xml @ 1:579538ff939d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cojac commit 5b54fc7af13196445abda407054e01dd3e5603c6
author iuc
date Mon, 31 Jul 2023 15:23:29 +0000
parents 4be399803856
children eeb5c054ecf8
line wrap: on
line diff
--- a/cooc_tabmut.xml	Thu Aug 11 13:50:09 2022 +0000
+++ b/cooc_tabmut.xml	Mon Jul 31 15:23:29 2023 +0000
@@ -1,7 +1,7 @@
 <tool id="cooc_tabmut" name="Cojac: tabmut" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"
       profile="@PROFILE@">
     <description>
-        export cooccurrence mutations as a table
+        exports co-occurrence results from mutbamscan as a table
     </description>
     <macros>
         <import>macros.xml</import>
@@ -10,26 +10,26 @@
     <expand macro="requirements"/>
     <expand macro="version"/>
     <command detect_errors="exit_code"><![CDATA[
-#for $input_file in $cooc_file
-    #set $cooc_ext = $input_file.ext
-#end for
-cooc-tabmut
-    #if $cooc_ext == 'json'
-        -j '$cooc_file'
-    #else if $cooc_ext == 'yaml'
-        -y '$cooc_file'
+cojac cooc-tabmut
+    #if $cooc_data.ext == 'json'
+        -j '$cooc_data'
+    #else
+        -y '$cooc_data'
     #end if
-    -o cooc-table.csv
     #if $table_orientation.choice == 'lines'
         -l
     #else if $table_orientation.choice == 'multiindex'
         -m
     #end if
+    #if $out_format == 'tsv':
+        -o cooc-table.tsv
+    #else:
+        -o cooc-table.csv
+    #end if
     -q
     ]]></command>
     <inputs>
-        <param name="cooc_file" type="data" format="json,yaml" multiple="true"
-               label="Results generated by mutbamscan"/>
+        <param name="cooc_data" type="data" format="json,yaml" label="Results generated by mutbamscan"/>
         <conditional name="table_orientation">
             <param name="choice" type="select" label="Output table orientation">
                 <option value="columns">Column-oriented table (default)</option>
@@ -42,23 +42,40 @@
             <when value="lines"/>
             <when value="multiindex"/>
         </conditional>
+        <param name="out_format" type="select" label="Type of output to produce">
+            <option value="tsv">Tab-separated (TSV)</option>
+            <option value="csv">Comma-separated (CSV)</option>
+        </param>
     </inputs>
     <outputs>
-        <data name="table" format="csv"
-              label="${tool.name} on ${on_string}: Mutation cooccurrence (CSV table)"
-              from_work_dir="cooc-table.csv">
+        <data name="table_tsv" format="tsv" label="${tool.name} on ${on_string}: Mutation coo-ccurrence (TSV table)" from_work_dir="cooc-table.tsv">
+            <filter>out_format == 'tsv'</filter>
+        </data>
+        <data name="table_csv" format="csv" label="${tool.name} on ${on_string}: Mutation coo-ccurrence (CSV table)" from_work_dir="cooc-table.csv">
+            <filter>out_format == 'csv'</filter>
         </data>
     </outputs>
     <tests>
         <test expect_num_outputs="1">
-            <param name="cooc_file" value="cooc-test111.json"/>
+            <param name="cooc_data" value="cooc-test111.json"/>
             <conditional name="table_orientation">
                 <param name="choice" value="columns"/>
             </conditional>
-            <output name="table" ftype="csv">
+            <output name="table_tsv" ftype="tsv">
                 <assert_contents>
-                    <has_text text="A76_om1.count"/>
-                    <has_text text="A76_om1.mut_oneless"/>
+                    <has_text text="A76"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="cooc_data" value="cooc-test111.json"/>
+            <conditional name="table_orientation">
+                <param name="choice" value="columns"/>
+            </conditional>
+            <param name="out_format" value="csv"/>
+            <output name="table_csv" ftype="csv">
+                <assert_contents>
+                    <has_text text="A76"/>
                 </assert_contents>
             </output>
         </test>
@@ -66,8 +83,8 @@
     <help><![CDATA[
 @HELP_HEADER@
 
-Information about **cooc_tabmut** method
-========================================
+Information about **cojac cooc_tabmut** method
+==============================================
 
 The method exports a JSON or YAML file as a CSV/TSV table for downstream analysis (e.g.: RStudio).