view cnplot.xml @ 2:02d795635772 draft default tip

planemo upload for repository https://github.com/thegenemyers/MERQURY.FK commit f02f3754424a68a1463fa75e9523d49e60d68373
author iuc
date Wed, 05 Mar 2025 19:07:33 +0000
parents 5081249368ff
children
line wrap: on
line source

<tool id="merquryfk_cnplot" name="MerquryFK CNplot" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2">
    <description>Creates copy-number spectrum plots from a genomic read k-mer table and its assembly</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        ln -s $reads input.ktab &&
        ln -s $assembly input.fastq &&
        ln -s $fastk_ktab_files ktab_files.tar.gz &&
        tar -xf ktab_files.tar.gz -C '.' &&
        mv ktabfiles/.*.ktab* .input.ktab.1  &&
        CNplot
        @PLOTS@
        @MEASURE@
        @GRAPHS@
        $pdf
        -T\${GALAXY_SLOTS:-1}
        input.ktab
        input.fastq
        output
    ]]></command>
    <inputs>
        <param name="reads" type="data" format="fastk_ktab" label="K-mer table (ktab) obtained from FastK tool"/>
        <param name="fastk_ktab_files" type="data" format="fastk_ktab_tar" label="Select the TAR file consisting of all intermediate Ktab file from FastK"/>
        <param name="assembly" type="data" format="fasta,fasta.gz,fastq,fastq.gz" label="Assembly of genome" help="Must be same genome as the K-mer table was generated from"/>
        <expand macro="plots"/>
        <expand macro="sizes"/>
        <expand macro="graphs"/>
        <expand macro="pdf"/>
    </inputs>
    <outputs>
        <collection name="outputs_png" type="list" label="${tool.name} on ${on_string}: PNG figures">
            <filter>pdf is not True</filter>
            <discover_datasets pattern="(?P&lt;designation&gt;.*).png" format="png"/>
        </collection>
        <collection name="outputs_pdf" type="list" label="${tool.name} on ${on_string}: PDF figures">
            <filter>pdf is True</filter>
            <discover_datasets pattern="(?P&lt;designation&gt;.*).pdf" format="pdf"/>
        </collection>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="reads" value="maternal.ktab"/>
            <param name="fastk_ktab_files" ftype="fastk_ktab_tar" value="cnplot_ktab.tar.gz"/>
            <param name="assembly" value="maternal.fastq"/>
            <param name="width" value="6.0"/>
            <param name="height" value="4.5"/>
            <param name="graphs" value="-l,-f,-s"/>
            <param name="pdf" value="False"/>
            <conditional name="measure">
                <param name="measurement" value="absolute"/>
                <param name="max_x" value="2"/>
                <param name="max_y" value="1"/>
            </conditional>
            <output_collection name="outputs_png" count="3"/>
        </test>
        <test expect_num_outputs="1">
            <param name="reads" value="maternal.ktab"/>
            <param name="fastk_ktab_files" ftype="fastk_ktab_tar" value="cnplot_ktab.tar.gz"/>
            <param name="assembly" value="maternal.fastq"/>
            <param name="width" value="6.0"/>
            <param name="height" value="4.5"/>
            <param name="graphs" value="-l,-f,-s"/>
            <param name="pdf" value="True"/>
            <conditional name="measure">
                <param name="measurement" value="absolute"/>
                <param name="max_x" value="2"/>
                <param name="max_y" value="1"/>
            </conditional>
            <output_collection name="outputs_pdf" count="3"/>
        </test>
    </tests>
    <help><![CDATA[
        Given a k-mer table, produced by FastK, for a read data set, and an assembly of the same genome, CNplot produces copy-number spectrum plots for the pair. 
            ]]></help>
    <expand macro="citation"/>
</tool>