view cutadapt_plugin.xml @ 24:f7e2f1eb3a16 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/multiqc commit dffbb5d421a5a5773bcb7f05933b12c45461bb58
author iuc
date Mon, 02 Sep 2024 14:22:54 +0000
parents
children
line wrap: on
line source

<macros>
    <token name="@CUTADAPT_COMMAND@"><![CDATA[
        #set $pattern = "This is cutadapt"
        #for $file in $repeat.software_cond.input
            @ESCAPE_IDENTIFIER@
            #set file_path = os.path.join($software_dir, str($identifier) + '.txt')
            ln -s '$file' '$file_path' &&
            ## replace header for old cutadapt release
            sed -i.old 's/You are running/This is/' '$file_path' &&
            grep -q "$pattern" '$file_path' || die "'$pattern' or 'You are running cutadapt' not found in the file" &&
        #end for
    ]]></token>
    <xml name="cutadapt_form">
        <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of Cutadapt" help="It should contain 'This is cutadapt' or 'You are running cutadapt'"/>
    </xml>
    <xml name="cutadapt_test">
        <test expect_num_outputs="3">
            <repeat name="results">
                <conditional name="software_cond">
                    <param name="software" value="cutadapt"/>
                    <param name="input" value="cutadapt.txt"/>
                </conditional>
            </repeat>
            <param name="title" value="Title of the report"/>
            <param name="comment" value="Commment for the report"/>
            <param name="flat" value="true"/>
            <param name="export" value="true"/>
            <output name="html_report">
                <assert_contents>
                    <has_text text="Title of the report"/>
                    <has_text text="Commment for the report"/>
                    <has_text text="cutadapt_trimmed_sequences_plot"/>
                </assert_contents>
            </output>
            <output name="stats">
                <assert_contents>
                    <has_text text="Cutadapt"/>
                    <has_text text="Cutadapt_mqc_generalstats_cutadapt_percent_trimmed"/>
                    <has_text text="10"/>
                    <has_text text="Cutadapt_mqc_generalstats_cutadapt_percent_trimmed"/>
                    <has_n_lines n="2"/>
                    <has_n_columns n="2"/>
                </assert_contents>
            </output>
            <output_collection name="plots" type="list" count="2"/>
        </test>
    </xml>
</macros>