view mirmachine.xml @ 1:0ad5db33c99e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mirmachine commit 4b14ff1a0b0a76b8abc41c094e614696c23f5655
author iuc
date Tue, 17 Jun 2025 08:34:39 +0000
parents 6001cd3141a1
children 061b1cea3439
line wrap: on
line source

<tool id="mirmachine" name="MirMachine" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="22.05">
    <description>A tool to detect miRNA homologs in genome sequences</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
    ln -sf '$genome' ./genome.fasta &&
    MirMachine.py
        -n '$input_node'
        -s '$input_species'
        -m '$model'
        $a
        $o
        --genome ./genome.fasta
        -c \${GALAXY_SLOTS:-8}
    &&
    mv results/predictions/filtered_gff/*.PRE.gff species_filtered.PRE.gff &&
    mv results/predictions/gff/*.PRE.gff species.PRE.gff &&
    mv results/predictions/fasta/*.PRE.fasta species.PRE.fasta
    ]]></command>
    <inputs>
        <param type="data" name="genome" format="fasta" label="Genome fasta file"/>
        <param name="input_node" type="select" label="Node name" help="e.g. Caenorhabditis">
            <expand macro="node_options"/>
        </param>
        <param type="text" name="input_species" label="Scientific species name" help="Separated by underscore e.g. Caenorhabditis_elegans">
            <sanitizer invalid_char="">
                <valid initial="string.letters">
                    <add value="_"/>
                </valid>
            </sanitizer>
            <validator type="regex">[a-zA-Z_]+</validator>
        </param>
        <param type="select" name="model" label="Model" help="Model type: deutero, proto, combined">
            <expand macro="model_options"/>
        </param>
        <param type="boolean" optional="true" truevalue="-a" falsevalue="" argument="-a" label="Add all nodes" help="Move on the tree both ways"/>
        <param type="boolean" optional="true" truevalue="-o" falsevalue="" argument="-o" label="Single node only" help="Run only on the given node for miRNA families"/>
    </inputs>
    <outputs>
        <data name="gff_file" format="gff" from_work_dir="species.PRE.gff" label="${tool.name} on ${on_string}: GFF file"/>
        <data name="filtered_gff_file" format="gff" from_work_dir="species_filtered.PRE.gff" label="${tool.name} on ${on_string}: filtered GFF file"/>
        <data name="fasta_file" format="fasta" from_work_dir="species.PRE.fasta" label="${tool.name} on ${on_string}: fasta sequence of annotation miRNAs"/>
    </outputs>
    <tests>
        <test expect_num_outputs="3">
            <param name="genome" value="ref.fa"/>
            <param name="input_node" value="Caenorhabditis"/>
            <param name="input_species" value="Caenorhabditis_elegans"/>
            <output name="gff_file">
                <assert_contents>
                    <has_n_lines n="24" delta="0"/>
                </assert_contents>
            </output>
            <output name="filtered_gff_file">
                <assert_contents>
                    <has_n_lines n="15" delta="0"/>
                </assert_contents>
            </output>
            <output name="fasta_file">
                <assert_contents>
                    <has_n_lines n="24" delta="0"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="3">
            <param name="genome" value="ref.fa"/>
            <param name="input_node" value="Caenorhabditis"/>
            <param name="input_species" value="Caenorhabditis_elegans"/>
            <param name="a" value="true"/>
            <output name="gff_file">
                <assert_contents>
                    <has_n_lines n="30" delta="0"/>
                </assert_contents>
            </output>
            <output name="filtered_gff_file">
                <assert_contents>
                    <has_n_lines n="15" delta="0"/>
                </assert_contents>
            </output>
            <output name="fasta_file">
                <assert_contents>
                    <has_n_lines n="36" delta="0"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="3">
            <param name="genome" value="ref.fa"/>
            <param name="input_node" value="Caenorhabditis"/>
            <param name="input_species" value="Caenorhabditis_elegans"/>
            <param name="o" value="true"/>
            <output name="gff_file">
                <assert_contents>
                    <has_n_lines n="20" delta="0"/>
                </assert_contents>
            </output>
            <output name="filtered_gff_file">
                <assert_contents>
                    <has_n_lines n="12" delta="0"/>
                </assert_contents>
            </output>
            <output name="fasta_file">
                <assert_contents>
                    <has_n_lines n="16" delta="0"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[

Accurate microRNA annotation of animal genomes using trained covariance models of curated microRNA complements. MirMachine facilitates automated genome annotation pipelines and deeper studies into the evolution of genome regulation, even in extinct organisms.

The MirMachine main executable will generate GFF annotations (filtered and unfiltered) and some other files

`gff` All predicted miRNA families
`filtered_gff` High confidence miRNA family predictions after bitscore filtering. (This file is what you need in most cases)
`fasta` Both high and low confidence predictions in FASTA format

miRNA prediction score is given in the header of the output filtered gff file
    ]]></help>
    <expand macro="citations"/>
    <expand macro="creator"/>
</tool>