diff generate_cannot_links.xml @ 0:dba4c0409de1 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/semibin commit aa9bfb2fb62547ee8bac34f0de5b3beaa0bfd1a4"
author bgruening
date Fri, 14 Oct 2022 21:32:03 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/generate_cannot_links.xml	Fri Oct 14 21:32:03 2022 +0000
@@ -0,0 +1,138 @@
+<tool id="semibin_generate_cannot_links" name="SemiBin: Contig annotations"  version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>
+
+    </description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="biotools"/>
+    <expand macro="requirements"/>
+    <expand macro="version"/>
+    <command detect_errors="exit_code"><![CDATA[
+#import re
+@FASTA_FILES@
+SemiBin
+    generate_cannot_links
+    --input-fasta 'contigs.fasta'
+    --output 'output'
+    --cannot-name 'cannot'
+#if $mode.ref.select == "cached"
+    --reference-db-data-dir '$mode.ref.cached_db.fields.path'
+#else
+    --taxonomy-annotation-table '$mode.ref.taxonomy_annotation_table'
+#end if
+    @MIN_LEN@
+#if str($ml_threshold) != ''
+    --ml-threshold $ml_threshold
+#end if
+    --cannot-name 'cannot'
+    --threads \${GALAXY_SLOTS:-1}
+    --processes \${GALAXY_SLOTS:-1}
+    ]]></command>
+    <inputs>
+        <conditional name="mode">
+            <expand macro="mode_select"/>
+            <when value="single">
+                <expand macro="input-fasta-single"/>
+                <expand macro="ref-single"/>
+            </when>
+            <when value="co">
+                <expand macro="input-fasta-single"/>
+                <expand macro="ref-single"/>
+            </when>
+            <when value="multi">
+                <expand macro="input-fasta-multi"/>
+                <expand macro="ref-multi"/>
+            </when>
+        </conditional>
+        <expand macro="min_len"/>
+        <expand macro="ml-threshold"/>
+    </inputs>
+    <outputs>
+        <expand macro="cannot_link_output"/>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <conditional name="mode">
+                <param name="select" value="single"/>
+                <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
+                <conditional name="ref">
+                    <param name="select" value="taxonomy"/>
+                    <param name="taxonomy_annotation_table" value="taxonomy.tsv"/>
+                </conditional>
+            </conditional>
+            <conditional name="min_len">
+                <param name="method" value="min-len"/>
+                <param name="min_len" value="0" />
+            </conditional>
+            <param name="ml_threshold" value=""/>
+            <output name="cannot" ftype="txt">
+                <assert_contents>
+                    <has_text text="g1k_0,g4k_0"/>
+                    <has_text text="g2k_3,g4k_5"/>
+                    <has_text text="g4k_6,g4k_5"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <conditional name="mode">
+                <param name="select" value="single"/>
+                <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
+                <conditional name="ref">
+                    <param name="select" value="taxonomy"/>
+                    <param name="taxonomy_annotation_table" value="taxonomy.tsv"/>
+                </conditional>
+            </conditional>
+            <conditional name="min_len">
+                <param name="method" value="min-len"/>
+                <param name="min_len" value="0" />
+            </conditional>
+            <param name="ml_threshold" value=""/>
+            <output name="cannot" ftype="txt">
+                <assert_contents>
+                    <has_text text="g1k_0,g4k_0"/>
+                    <has_text text="g2k_3,g4k_5"/>
+                    <has_text text="g4k_6,g4k_5"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <conditional name="mode">
+                <param name="select" value="single"/>
+                <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
+                <conditional name="ref">
+                    <param name="db_selector" value="cached"/>
+                    <param name="cached_db" value="test-db"/>
+                </conditional>
+            </conditional>
+            <conditional name="min_len">
+                <param name="method" value="min-len"/>
+                <param name="min_len" value="0" />
+            </conditional>
+            <param name="ml_threshold" value=""/>
+            <output name="cannot" ftype="txt">
+                <assert_contents>
+                    <has_text text="g1k_0,g2k_0"/>
+                    <has_text text="g2k_9,g4k_1"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+@HELP_HEADER@
+
+This tool runs the contig annotations using mmseqs with GTDB and generate cannot-link file used in the semi-supervised deep learning model training.
+
+Inputs
+======
+
+@HELP_INPUT_FASTA@
+
+Outputs
+=======
+
+@HELP_CANNOT@
+
+    ]]></help>
+    <expand macro="citations"/>
+</tool>