view data_manager/kma_build_index.xml @ 3:b221a6c2ed00 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kma_index/ commit d0b3d69f25fe8419e5b98165ae53b59651d711b1
author iuc
date Fri, 10 Oct 2025 12:03:10 +0000
parents 889cc43b72d6
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="kma_build_index" name="KMA Index Builder" tool_type="manage_data" version="1.6.6+galaxy0" profile="24.1">
    <description>kma index builder</description>
    <requirements>
        <requirement type="package" version="1.6.6">kma</requirement>
    </requirements>
    <version_command>kma -v</version_command>
    <command detect_errors="exit_code">
    <![CDATA[
mkdir -p '${out_file.extra_files_path}'/index_folder &&
kma_index
  -i '$fasta'
  -o '${out_file.extra_files_path}'/index_folder/index
  ## index options
  -k $k
  -k_t $k_t
  -k_i $k_i
  -ML $ML
  -ht $ht
  -hq $hq
    ]]></command>
    <configfiles>
        <configfile filename="dm.json"><![CDATA[#slurp
#from datetime import datetime
#from hashlib import md5
#set value=datetime.now().strftime("%Y-%m-%d") + "_" + md5($name.encode()).hexdigest()
{"data_tables": {"kma_index": [{"value": "$value", "name": "$name", "path": "index_folder"}]}}
]]></configfile>
    </configfiles>
    <inputs>
        <param argument="-k" type="integer" value="16" min="8" max="32" label="kmer size used for indexing the database." />
        <param argument="-k_t" type="integer" value="16" min="8" max="32" label="kmer size used to identify template candidates when running KMA." />
        <param argument="-k_i" type="integer" value="16" min="8" max="32" label="kmer size used when performing alignments between two sequences." />
        <param argument="-ML" type="integer" value="16" label="Minimum length of templates" />
        <param argument="-ht" type="float" value="1.0" min="0.0" max="1.0" label="Homology template" />
        <param argument="-hq" type="float" value="1.0" min="0.0" max="1.0" label="Homology query" />
        <param name="fasta" type="data" format="fasta" label="Sequence to index (fasta)" />
        <param name="name" type="text" optional="false" label="Name for index" help="Choose a name that describes the indexed sequence and possibly any non-default indexing parameters.">
            <validator type="empty_field"/>
        </param>
    </inputs>
    <outputs>
        <data name="out_file" format="data_manager_json" from_work_dir="dm.json"/>
    </outputs>
    <tests>
        <test>
            <param name="fasta" value="phiX174.fasta"/>
            <param name="name" value="index"/>
            <output name="out_file" ftype="data_manager_json">
                <assert_contents>
                    <has_text text='"kma_index":' />
                    <has_text text='"name": "index"' />
                    <has_text text='"path": "index_folder"' />
                    <has_text_matching expression='"value": "\d{4}-\d{2}-\d{2}_6a992d5529f459a44fee58c733255e86"' />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
**Data manager for building an index for the kma aligner**

Runs the kma index command on the input sequence with the chosen options.

.. class:: infomark

   You may want to capture details about the reference sequence and any non-default indexing parameters in the name of the index so that users have a better idea what they are selecting for tool runs.
    ]]></help>
    <citations>
        <citation type="doi">10.1186/s12859-018-2336-6</citation>
    </citations>
</tool>