view groups-kmers.xml @ 1:0a1ea8818564 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/meryl commit 6935ad9dddbbb913817552d682d0b2208481dc7f
author iuc
date Sun, 09 Nov 2025 18:36:07 +0000
parents a3af9d9727ad
children
line wrap: on
line source

<tool id="meryl_groups_kmers" name="Meryl" version="@TOOL_VERSION@+@GALAXY_TOOL_VERSION@@SUFFIX_VERSION@" profile="@PROFILE@">
    <description>apply operations on k-mer databases</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)) &&
    #for $i,$mdb in enumerate($input_meryldb_02)
        mkdir -p ./tmp_folder_$i/ &&
        tar -xmf $mdb --use-compress-program="pigz -p \${GALAXY_SLOTS:-1}" -C ./tmp_folder_$i &&
        mv ./tmp_folder_$i/* db_'${i}'.meryl &&
    #end for
    meryl $groups_operations output read-db.meryl db_*  &&
    tar -cf read-db.meryldb --use-compress-program="pigz -p \${GALAXY_SLOTS:-1}" read-db.meryl
    ]]></command>
    <inputs>
        <param name="groups_operations" type="select" label="Operations on sets of k-mers" help="Select an operation to be executed">
            <option value="union">Union: return k-mers that occur in any input</option>
            <option value="union-min">Union-min: return k-mers that occur in any input, set the count to the minimum count</option>
            <option value="union-max">Union-max: return k-mers that occur in any input, set the count to the maximum count</option>
            <option value="union-sum">Union-sum: return k-mers that occur in any input, set the count to the sum of the counts</option>
            <option value="intersect">Intersect: return k-mers that occur in all inputs, set the count to the count in the first input</option>
            <option value="intersect-min">Intersect-min: return k-mers that occur in all inputs, set the count to the minimum count</option>
            <option value="intersect-max">Intersect-max: return k-mers that occur in all inputs, set the count to the maximum count</option>
            <option value="intersect-sum">Intersect-sum: return k-mers that occur in all inputs, set the count to the sum of the counts</option>
            <option value="subtract">Subtract: return k-mers that occur in the first input, subtracting counts from the other inputs</option>
            <option value="difference">Difference: return k-mers that occur in the first input, but none of the other inputs</option>
            <option value="symmetric-difference">Symmetric-difference: return k-mers that occur in exactly one input</option>
        </param>
        <param name="input_meryldb_02" type="data" multiple="true" format="meryldb" label="Input meryldb"/>
    </inputs>
    <outputs>
        <data name="read_db" format="meryldb" from_work_dir="read-db.meryldb"/>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="union"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="34918" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="union-min"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="59637" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="union-max"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="60705" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="union-sum"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="61311" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="intersect"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="16003" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="intersect-min"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="15413" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="intersect-max"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="15424" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="intersect-sum"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="15965" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="subtract"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="25728" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="difference"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="24666" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_meryldb_02" value="output_02.read-db.meryldb,output_03.read-db.meryldb" ftype="meryldb"/>
            <param name="groups_operations" value="symmetric-difference"/>
            <output name="read_db" ftype="meryldb">
                <assert_contents>
                    <has_size value="60385" delta="3000"/>
                    <expand macro="meryldb_archive_assumptions"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>

.. class:: infomark

**Purpose**

Meryl is the k-mer counter. Apply operations on multiple k-mer databases.

- Union-min: return k-mers that occur in any input, set the count to the minimum count
- Union-max: return k-mers that occur in any input, set the count to the maximum count
- Union-sum: return k-mers that occur in any input, set the count to the sum of the counts
- Intersect: return k-mers that occur in all inputs, set the count to the count in the first input
- Intersect-min: return k-mers that occur in all inputs, set the count to the minimum count
- Intersect-max: return k-mers that occur in all inputs, set the count to the maximum count
- Intersect-sum: return k-mers that occur in all inputs, set the count to the sum of the counts
- Subtract: return k-mers that occur in the first input, subtracting counts from the other inputs
- Difference: return k-mers that occur in the first input, but none of the other inputs
- Symmetric-difference: return k-mers that occur in exactly one input

        </help>
    <expand macro="citations"/>
</tool>