diff cooc_pubmut.xml @ 0:d04ea6b052c5 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cojac commit 38ed91999d4bbe3bedc294197926ea332eb6cd5e
author iuc
date Thu, 11 Aug 2022 13:49:40 +0000
parents
children f193fef5b19d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cooc_pubmut.xml	Thu Aug 11 13:49:40 2022 +0000
@@ -0,0 +1,85 @@
+<tool id="cooc_pubmut" name="Cojac: pubmut" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"
+      profile="@PROFILE@">
+    <description>
+        render a JSON or YAML file to a pretty table
+    </description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="biotools"/>
+    <expand macro="requirements">
+        <requirement type="package" version="2.12">pandoc</requirement>
+    </expand>
+    <expand macro="version"/>
+    <command detect_errors="exit_code"><![CDATA[
+@VOCDIR_COMMAND@
+#for $input_file in $cooc_file
+    #set $cooc_ext = $input_file.ext
+#end for
+cooc-pubmut
+    -m '$vocdir'
+    -a '$amplicons'
+    #if $cooc_ext == 'json'
+        -j '$cooc_file'
+    #else if $cooc_ext == 'yaml'
+        -y '$cooc_file'
+    #end if
+    -o cooc-table.csv
+    -q
+    $escape
+    #if $add_html
+        && pandoc cooc-table.csv -o cooc-table.html
+        && mkdir -p '$html.files_path'
+        && cp cooc-table.html '$html.files_path'
+    #end if
+    ]]></command>
+    <inputs>
+        <expand macro="vocdir_input"/>
+        <param name="amplicons" type="data" format="yaml" label="List of query amplicons"
+               help="File generated by the Cojac mutbamscan tool"/>
+        <param name="cooc_file" type="data" format="json,yaml" multiple="true"
+               label="Results generated by mutbamscan"/>
+        <param argument="--escape" type="boolean" truevalue="--escape" falsevalue=""
+               checked="false" label="Use escape characters for newlines"/>
+        <param name="add_html" type="boolean" checked="false"
+               label="Convert CSV output table to HTML format"/>
+    </inputs>
+    <outputs>
+        <data name="table" format="csv"
+              label="${tool.name} on ${on_string}: Mutation cooccurrence (CSV table)"
+              from_work_dir="cooc-table.csv">
+        </data>
+        <data name="html" format="html"
+              label="${tool.name} on ${on_string}: Mutation cooccurrence (HTML)"
+              from_work_dir="cooc-table.html">
+            <filter>add_html</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <conditional name="vocdir_option">
+                <param name="choice" value="custom"/>
+                <param name="voc_file" value="omicron_ba1_mutations.yaml"/>
+            </conditional>
+            <param name="amplicons" value="amplicons111.yaml"/>
+            <param name="cooc_file" value="cooc-test111.json"/>
+            <output name="table" ftype="csv">
+                <assert_contents>
+                    <has_text text="Amplicon 76"/>
+                    <has_text text="Amplicon 81"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+@HELP_HEADER@
+
+Information about **cooc-pubmut** method
+========================================
+
+The method renders a JSON or YAML file to a table as in the publication.
+You need to open the output CSV in a spreadsheet that understands linebreaks.
+
+    ]]></help>
+    <expand macro="citations"/>
+</tool>