view processing_454_reads_macros.xml @ 2:76ff9af5c0a3 draft default tip

planemo upload for repository https://github.com/geraldinepascal/FROGS-wrappers/ commit 0e987ae3594883fb3b12d2999c6ad7fccd0b1b64
author frogs
date Fri, 06 Feb 2026 22:05:51 +0000
parents cd7675c5b15a
children
line wrap: on
line source

<?xml version="1.0"?>
<macros>
    <token name="@PROCESSING_454_READS_CMD_LINE@">
        #set $sep = ' '

        reads_processing.py 454 
            @CPUS@

            ## INPUTS
            #if $input_files.file_type == "archive"
                --input-archive '${input_files.input_archive}'
            #else
                --samples-names 
                #for $current in $input_files.samples
                    $sep'${current.samples_names.strip()}'
                #end for
                --input-R1 
                #for $current in $input_files.samples
                    $sep'${current.input_R1}'
                #end for
            #end if

            ## AMPLICON PARAMETERS
            --min-amplicon-size $min_amplicon_size
            --max-amplicon-size $max_amplicon_size

            ## PRIMERS
            --five-prim-primer '$five_prim_primer'
            --three-prim-primer '$three_prim_primer'

            ## PROCESS TYPE
            #if $process_type.process == "Preprocess only"
                --process preprocess-only
            #elif $process_type.process == "Clustering Swarm"
                --process swarm
                --distance $process_type.distance
                #if $process_type.cluster_improvements.clustering_options != "no-refinement"
                    $process_type.cluster_improvements.clustering_options
                #end if
            #end if

            ## OUTPUTS
            --output-biom $output_biom 
            --output-fasta $output_fasta
            --html $html
            #if $process_type.process == "Clustering Swarm"
                --output-compo $output_cluster_compo
            #end if
    </token>

    <xml name="processing_454_reads_inputs">
       <!-- Files -->
        <conditional name="input_files">
            <param name="file_type" type="select" label="Input type" help="Sample files can be provided either as a single TAR archive or as separate files per sample (one file each).">
                <option value="archive" selected="true">TAR Archive</option>
                <option value="files_per_samples" >Files per samples</option>
            </param>
            <when value="archive">
                <param argument="--input-archive" type="data" format="tar,tgz" label="TAR archive file" help="The TAR file containing the 454 single-end reads (.fastq.gz) for each sample. Supported sequencers: ROCHE 454." />
            </when>
            <when value="files_per_samples">
                <repeat name="samples" title="Samples" default="1" min="1">
                    <param argument="--samples-names" type="text" label="Sample name" help="The sample name.">
                        <expand macro="restricted_sanitizer_validator"/>
                    </param>
                    <param argument="--input-R1" type="data" format="fastq" label="454 reads (.fastq.gz)" help="fastq file of 454 reads. Supported sequencers: ROCHE 454" />
                </repeat>
            </when>
        </conditional>

        <!-- Amplicons Parameters-->
        <param argument="--min-amplicon-size" type="integer" value="" label="Minimum amplicon length" help="The minimum length of the amplicons (including primers)."/>
        <param argument="--max-amplicon-size" type="integer" value="" label="Maximum amplicon length" help="The maximum length of the amplicons (including primers)."/>

        <!-- Primers -->
        <param argument="--five-prim-primer" type="text" label="5' primer" help="Enter the 5' primer sequence. Wildcards are allowed. The sequence must be provided in 5' → 3' orientation.">
            <expand macro="only_letter_sanitizer_validator"/>
        </param>
        <param argument="--three-prim-primer" type="text" label="3' primer" help="Enter the 3' primer sequence. Wildcards are allowed. The sequence must be provided in 5' → 3' orientation.">
                <expand macro="only_letter_sanitizer_validator"/>
        </param>

        <!-- Preprocessing only, clustering or denoising -->
         <conditional name="process_type">
            <param argument="--process" type="select" display="radio" label="Process type" help="Select the type of process to perform">
                <option value="Preprocess only">Preprocessing only</option>
                <option value="Clustering Swarm" selected="true">Preprocessing and clustering with Swarm</option>
            </param>
            <when value="Preprocess only"/>
            <when value="Clustering Swarm">
                <param argument="--distance" type="integer" min="1" value="1" optional="false" label="Swarm distance threshold" help="Distance threshold used by Swarm for clustering."/>
                <conditional name="cluster_improvements">
                    <param name="clustering_options" type="select" display="radio" label="Clustering refinement" help="(i) With --distance = 1, use the Swarm --fastidious option to refine clustering (recommended since FROGS 3.2). (ii) With --distance > 1, enable pre-clustering to reduce redundancy before final clustering step. (iii) Select this option to apply neither refinement nor pre-clustering.">
                        <option value="--fastidious" selected="true">With --distance = 1, refine clusters with Swarm --fastidious option (recommended since FROGS 3.2)</option>
                        <option value="--pre-clustering">With --distance > 1, perform a pre-clustering step with FROGS --pre-clustering option</option>
                        <option value="no-refinement">No clustering refinement</option>
                    </param>
                    <when value="--fastidious"/>
                    <when value="--pre-clustering"/>
                    <when value="no-refinement"/>
                </conditional>
            </when>
        </conditional>
    </xml>

    <!-- Test swarm -->
    <xml name="swarm_processing_454_reads_test_input">
        <!-- Files -->
        <conditional name="input_files">
            <param name="file_type" value="files_per_samples" />
            <repeat name="samples">
                <param name="samples_names" value="SRR443364_clipped" />
                <param name="input_R1" ftype="fastq" value="input/SRR443364_clipped.fastq.gz" />
            </repeat>
        </conditional>

        <!-- Amplicons Parameters-->
        <param name="min_amplicon_size" value="340"/>
        <param name="max_amplicon_size" value="450"/>

        <!-- Primers -->
        <param name="five_prim_primer" value="ACGGGAGGCAGCAG" />
        <param name="three_prim_primer" value="AGGATTAGATACCCTGGTA"/>
        
        <!-- Preprocessing only, clustering or denoising -->
        <conditional name="process_type">
            <param name="process" value="Clustering Swarm" />
            <conditional name="cluster_improvements">
                <param name="clustering_options" value="no-refinement" />
            </conditional>
        </conditional>
    </xml>

    <xml name="swarm_processing_454_reads_test_output">
        <output name="output_biom" file="references/01-reads_processing-454-swarm.biom" compare="sim_size" delta="0" />
        <output name="output_fasta" file="references/01-reads_processing-454-swarm.fasta" compare="diff" lines_diff="0" />
        <output name="output_cluster_compo" file="references/01-reads_processing-454-swarm_compo.tsv" compare="diff" lines_diff="0" />
        <output name="html" file="references/01-reads_processing-454-swarm.html" compare="diff" lines_diff="0" />
    </xml>
</macros>