diff arithmetic-kmers.xml @ 0:50aca3a67e3e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meryl commit a3a16149db71f9b72dd7e949df0db08797637312
author iuc
date Tue, 08 Oct 2024 16:42:28 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/arithmetic-kmers.xml	Tue Oct 08 16:42:28 2024 +0000
@@ -0,0 +1,123 @@
+<tool id="meryl_arithmetic_kmers" name="Meryl" version="@TOOL_VERSION@+@GALAXY_TOOL_VERSION@@SUFFIX_VERSION@" profile="@PROFILE@">
+    <description>apply arithmetic operations to k-mer counts</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="edam_ontology"/>
+    <xrefs>
+        <xref type="bio.tools">meryl</xref>
+    </xrefs>
+    <expand macro="requirements"/>
+    <version_command>meryl --version</version_command>
+    <command detect_errors="exit_code"><![CDATA[
+    export GALAXY_MEMORY_GB=\$((\${GALAXY_MEMORY_MB:-8192}/1024)) &&
+    mkdir  -p ./temp_db/ &&
+    tar -xmf $input_meryldb_02 --use-compress-program="pigz -p \${GALAXY_SLOTS:-1}" -C ./temp_db/ &&
+    mv ./temp_db/* tmp.meryl &&
+    meryl
+    $arithmetic_operations
+    $X
+    tmp.meryl
+    output read-db.meryl &&
+    tar -cf read-db.meryldb --use-compress-program="pigz -p \${GALAXY_SLOTS:-1}" read-db.meryl
+    ]]></command>
+    <inputs>
+        <param name="arithmetic_operations" type="select" label="Arithmetic operations" help="Select an operation to be executed">
+            <option value="increase">Increase: add x to the count of each k-mer</option>
+            <option value="decrease">Decrease: subtract x from the count of each k-mer</option>
+            <option value="multiply">Multiply: multiply the count of each k-mer by x</option>
+            <option value="divide">Divide: divide the count of each k-mer by x</option>
+            <option value="divide-round">Divide-round: divide the count of each k-mer by x and round the results</option>
+            <option value="modulo">Modulo: set the count of each k-mer to the remainder of the count divided by x</option>
+        </param>
+        <param name="input_meryldb_02" type="data" format="meryldb" label="Input meryldb" help="Select a meryldb dataset"/>
+        <param name="X" type="integer" min="1" max="1000000" value="" optional="true" label="Operand"/>
+    </inputs>
+    <outputs>
+        <data name="read_db" format="meryldb" from_work_dir="read-db.meryldb"/>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="X" value="100000"/>
+            <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb"/>
+            <param name="arithmetic_operations" value="increase"/>
+            <output name="read_db" ftype="meryldb">
+                <assert_contents>
+                    <has_size value="58946" delta="3000"/>
+                    <expand macro="meryldb_archive_assumptions"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="X" value="100"/>
+            <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb"/>
+            <param name="arithmetic_operations" value="decrease"/>
+            <output name="read_db" ftype="meryldb">
+                <assert_contents>
+                    <has_size value="45595" delta="3000"/>
+                    <expand macro="meryldb_archive_assumptions"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="X" value="3"/>
+            <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb"/>
+            <param name="arithmetic_operations" value="multiply"/>
+            <output name="read_db" ftype="meryldb">
+                <assert_contents>
+                    <has_size value="60645" delta="3000"/>
+                    <expand macro="meryldb_archive_assumptions"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="X" value="2"/>
+            <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb"/>
+            <param name="arithmetic_operations" value="divide"/>
+            <output name="read_db" ftype="meryldb">
+                <assert_contents>
+                    <has_size value="58481" delta="3000"/>
+                    <expand macro="meryldb_archive_assumptions"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="X" value="2"/>
+            <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb"/>
+            <param name="arithmetic_operations" value="divide-round"/>
+            <output name="read_db" ftype="meryldb">
+                <assert_contents>
+                    <has_size value="58236" delta="3000"/>
+                    <expand macro="meryldb_archive_assumptions"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="X" value="3"/>
+            <param name="input_meryldb_02" value="read-db.meryldb" ftype="meryldb"/>
+            <param name="arithmetic_operations" value="modulo"/>
+            <output name="read_db" ftype="meryldb">
+                <assert_contents>
+                    <has_size value="36971" delta="3000"/>
+                    <expand macro="meryldb_archive_assumptions"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help>
+
+.. class:: infomark
+
+**Purpose**
+
+Meryl is the k-mer counter. This tool applies arithmetic operations on k-mer counts: 
+
+- Increase: add x to the count of each k-mer
+- Decrease: subsctract x from the count of each k-mer
+- Multiply: multiply the count of each k-mer by x
+- Divide: divide the count of each k-mer by x
+- Divide-round: divide the count of each k-mer by x and round th results
+- Modulo: set the count of each k-mer to the remainder of the count divided by x
+        </help>
+    <expand macro="citations"/>
+</tool>