view stacks_clonefilter.xml @ 4:60d86dc1b19d draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit 74ee33c6e30744a6da8deb7116d431d80ee80edb
author iuc
date Fri, 07 Apr 2023 21:59:58 +0000
parents 3009a21724e7
children
line wrap: on
line source

<tool id="stacks_clonefilter" name="Stacks: clone filter" version="@WRAPPER_VERSION@.0">
    <description>Identify PCR clones</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <command><![CDATA[

        #if $data_type.dt_select == "single"

            #if $data_type.fname.is_of_type('fastqsanger')
                #set $ext = ".fq"
                #set inputype = "fastq"
            #else
                #set $ext = ".fq.gz"
                #set inputype = "gzfastq"
            #end if

            ln -s '$data_type.fname' R1$ext &&
        #else

            #if $data_type.fwd.is_of_type('fastqsanger')
                #set $ext = ".fq"
                #set inputype = "fastq"
            #else
                #set $ext = ".fq.gz"
                #set inputype = "gzfastq"
            #end if

            ln -s '$data_type.fwd' R1$ext &&
            ln -s '$data_type.rev' R2$ext &&
        #end if


        mkdir clone_outputs

        &&

        clone_filter
            #if $data_type.dt_select == 'single':
                -f R1$ext
                
            #else
                -1 R1$ext
                -2 R2$ext
            #end if

            -i $inputype

            -o clone_outputs


            #if $oligo_len_1
                --oligo_len_1 $oligo_len_1
                $data_type.barcode_encoding
            #end if
            #if $oligo_len_2
                --oligo_len_2 $oligo_len_2
            #end if

           -y gzfastq

    ]]></command>
    <inputs>
        <conditional name="data_type">
            <param name="dt_select" type="select" label="Single or Paired-end">
                <option value="single">Single</option>
                <option value="pair">Pair</option>
            </param>
            <when value="single">
                <param name="fname" type="data" format="fastqsanger,fastqsanger.gz" label="FASTQ" />
                <param name="barcode_encoding" type="select" label="Barcode location">
                    <expand macro="barcode_encoding_single" />
                </param>

            </when>
            <when value="pair">
                <param name="fwd" type="data" format="fastqsanger,fastqsanger.gz" label="Forward FASTQ" />
                <param name="rev" type="data" format="fastqsanger,fastqsanger.gz" label="Reverse FASTQ" />
                <param name="barcode_encoding" type="select" label="Barcode location">
                    <expand macro="barcode_encoding_pair" />
                </param>
            </when>
        </conditional>
        <param name="oligo_len_1" optional="true" type="integer" label="length of the single-end oligo sequence in data set"/>
        <param name="oligo_len_2" optional="true" type="integer" label="length of the paired-end oligo sequence in data set"/>

    </inputs>
    <outputs>
        <data format="fastqsanger.gz" name="clean" from_work_dir="clone_outputs/R1.fq.gz">
            <filter>data_type['dt_select'] == 'single'</filter>
        </data>

        <data format="fastqsanger.gz" name="clean_fwd" from_work_dir="clone_outputs/R1.1.fq.gz" label="${tool.name} on ${on_string}: forward">
            <filter>data_type['dt_select'] == 'pair'</filter>
        </data>
        <data format="fastqsanger.gz" name="clean_rev" from_work_dir="clone_outputs/R2.2.fq.gz" label="${tool.name} on ${on_string}: reverse">
            <filter>data_type['dt_select'] == 'pair'</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <conditional name="data_type">
                <param name="dt_select" value="single" />
                <param name="fname" ftype="fastqsanger.gz" value="clonefilter/R1_0001.1.fq.gz" />
            </conditional>
            <param name="oligo_len_1" value="6" />
            <output name="clean" compare="sim_size" file="clonefilter/Removed1_0001.1.1.fq.single.gz"/>
        </test>
        <test>
            <conditional name="data_type">
                <param name="dt_select" value="single" />
                <param name="fname" ftype="fastqsanger.gz" value="clonefilter/R1_0001.1.fq.gz" />
            </conditional>
            <output name="clean" compare="sim_size" file="clonefilter/Removed1_0001.1.1.fq.gz"/>
        </test>
        <test>
            <conditional name="data_type">
                <param name="dt_select" value="pair" />
                <param name="fwd" ftype="fastqsanger" value="clonefilter/R1_0001.1.fq.gz" />
                <param name="rev" ftype="fastqsanger" value="clonefilter/R2_0001.2.fq.gz" />
            </conditional>
            <output name="clean_fwd" compare="sim_size" file="clonefilter/Removed1_0001.1.1.fq.gz"/>
            <output name="clean_rev" compare="sim_size" file="clonefilter/Removed2_0001.2.2.fq.gz"/>
        </test>
        <test>
            <conditional name="data_type">
                <param name="dt_select" value="pair" />
                <param name="fwd" ftype="fastqsanger.gz" value="clonefilter/R1_0001.1.fq.gz" />
                <param name="rev" ftype="fastqsanger.gz" value="clonefilter/R2_0001.2.fq.gz" />
            </conditional>
            <output name="clean_fwd" compare="sim_size" file="clonefilter/Removed1_0001.1.1.fq.gz"/>
            <output name="clean_rev" compare="sim_size" file="clonefilter/Removed2_0001.2.2.fq.gz"/>
        </test>
    </tests>
    <help>
<![CDATA[
.. class:: infomark


The clone_filter program is designed to identify PCR clones.

@STACKS_INFOS@
]]>
    </help>
    <expand macro="citation" />
</tool>