diff processing_long_reads_macros.xml @ 0:cd7675c5b15a draft

planemo upload for repository https://github.com/geraldinepascal/FROGS-wrappers/ commit 78ca62b54aee22893d278d9c3d495527be405f8a
author frogs
date Wed, 04 Feb 2026 13:15:55 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/processing_long_reads_macros.xml	Wed Feb 04 13:15:55 2026 +0000
@@ -0,0 +1,195 @@
+<?xml version="1.0"?>
+<macros>
+    <token name="@PROCESSING_LONG_READS_CMD_LINE@">
+        #set $sep = ' '
+
+        reads_processing.py longreads 
+            @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
+            #if $is_primer_in_seq.primer_choice == "true"
+                --five-prim-primer '$is_primer_in_seq.five_prim_primer'
+                --three-prim-primer '$is_primer_in_seq.three_prim_primer'
+            #else
+                --without-primers
+            #end if
+
+            ## 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
+            #elif $process_type.process == "Denoising DADA2"
+                --process dada2
+                --sample-inference $process_type.sample_inference
+            #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_long_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 or two files 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 long reads (.fastq.gz) for each sample. Supported sequencers: PacBio and Oxford Nanopore." />
+            </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="Long reads (.fastq.gz)" help="fastq file of long reads. Supported sequencers: PACBIO and ONT." />
+                </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 -->
+        <conditional name="is_primer_in_seq">
+            <param name="primer_choice" type="select" display="radio" label="Do the sequences include PCR primers?" help="Indicate whether the sequences still include PCR primers. Select “Yes” if primers are present, “No” if they have already been removed." >
+                <option value="true" selected="true">Yes</option>
+                <option value="false">No</option>     
+            </param>
+            <when value="true">
+                <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>
+            </when>
+            <when value="false"/>
+        </conditional>
+
+        <!-- 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 run">
+                <option value="Preprocess only">Preprocessing only</option>
+                <option value="Clustering Swarm" selected="true">Preprocessing and clustering with Swarm</option>
+                <option value="Denoising DADA2">Preprocessing and denoising with DADA2. /!\ Only Pacbio sequencers are currently supported /!\.</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>
+            <when value="Denoising DADA2">
+                <param argument="--sample-inference" type="select" display="radio" label="DADA2 pooling method" help="Choose how to consider sample prior to sample inferance">
+                    <option value="pseudo-pooling" selected="true">Pseudo pooling, samples will be pseudo-pooled prior to sample inference.</option>
+                    <option value="independent">Independent, sample inference will be performed on each sample individually.</option>
+                    <option value="pooling">Full pooling, all samples will be pooled together prior to sample inference.</option>
+                </param>
+            </when>
+        </conditional>
+    </xml>
+    
+    <!-- Test swarm -->
+    <xml name="swarm_processing_long_reads_test_input">
+        <!-- Files -->
+        <conditional name="input_files">
+            <param name="file_type" value="archive" />
+            <param name="input_archive" ftype="tgz" value="input/LongReads.tar.gz" />
+        </conditional>
+
+        <!-- Amplicons Parameters-->
+        <param name="min_amplicon_size" value="400"/>
+        <param name="max_amplicon_size" value="3000"/>
+
+        <!-- Primers -->
+        <conditional name="is_primer_in_seq">
+            <param name="primer_choice" value="true" />
+            <param name="five_prim_primer" value="AGRGTTYGATYMTGGCTCAG" />
+            <param name="three_prim_primer" value="AAGTCGTAACAAGGTARCY"/>
+        </conditional>
+        
+        <!-- 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_long_reads_test_output">
+        <output name="output_biom" file="references/01-reads_processing-long-swarm.biom" compare="sim_size" delta="0" />
+        <output name="output_fasta" file="references/01-reads_processing-long-swarm.fasta" compare="diff" lines_diff="0" />
+        <output name="output_cluster_compo" file="references/01-reads_processing-long-swarm_compo.tsv" compare="diff" lines_diff="0" />
+        <output name="html" file="references/01-reads_processing-long-swarm.html" compare="diff" lines_diff="0" />
+    </xml>
+
+    <!-- Test dada2 -->
+    <xml name="dada2_processing_long_reads_test_input">
+        <!-- Files -->
+        <conditional name="input_files">
+            <param name="file_type" value="archive" />
+            <param name="input_archive" ftype="tgz" value="input/LongReads.tar.gz" />
+        </conditional>
+
+        <!-- Amplicons Parameters-->
+        <param name="min_amplicon_size" value="400"/>
+        <param name="max_amplicon_size" value="3000"/>
+
+        <!-- Primers -->
+        <conditional name="is_primer_in_seq">
+            <param name="primer_choice" value="true" />
+            <param name="five_prim_primer" value="AGRGTTYGATYMTGGCTCAG" />
+            <param name="three_prim_primer" value="AAGTCGTAACAAGGTARCY"/>
+        </conditional>
+        
+        <!-- Preprocessing only, clustering or denoising -->
+        <conditional name="process_type">
+            <param name="process" value="Denoising DADA2" />
+        </conditional>
+    </xml>
+
+    <xml name="dada2_processing_long_reads_test_output">
+        <output name="output_biom" file="references/01-reads_processing-long-dada2.biom" compare="sim_size" delta="0" />
+        <output name="output_fasta" file="references/01-reads_processing-long-dada2.fasta" compare="diff" lines_diff="0" />
+        <output name="html" file="references/01-reads_processing-long-dada2.html" compare="diff" lines_diff="0" />
+    </xml>
+</macros>