diff affiliation_postprocess_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/affiliation_postprocess_macros.xml	Wed Feb 04 13:15:55 2026 +0000
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<macros>
+    <token name="@AFFILIATION_POSTPROCESS_CMD_LINE@">
+        affiliation_postprocess.py
+            --input-biom '$input_biom'
+            --input-fasta '$input_fasta'
+
+            #if $is_HVL.HVL_amplicon == "Yes"
+                --reference '$is_HVL.reference.fields.path'
+            #end if
+            
+            --identity $identity
+            --coverage $coverage
+
+            --output-biom '$output_biom'
+            --output-fasta '$output_fasta'
+            --output-compo '$output_asv_compo'
+    </token>
+
+    <xml name="affiliation_postprocess_inputs">
+        <!-- Files -->
+        <param argument="--input-fasta" type="data" format="fasta" label="Sequence file (.fasta)" help="The sequence file to filter." />
+        <param argument="--input-biom" type="data" format="biom1" label="Abundance file (.biom)" help="The abundance file to filter." />
+
+        <!-- Parameters -->
+        <conditional name="is_HVL">
+            <param name="HVL_amplicon" type="select" display="radio" label="Is this an amplicon hyper variable in length?" help="Multi-affiliation tag may be resolved by selecting the shortest amplicon reference. For this, you need the reference fasta file of your target amplicon.">
+                <option value="No">No</option>
+                <option value="Yes" >Yes</option>
+            </param>
+            <when value="Yes">
+                <param argument="--reference" type="select" label="Using reference database" help="Select reference from the list">
+                    <options from_data_table="frogs_HVL_db"/>
+                    <validator type="no_options" message="A built-in database is not available"/>
+                </param>
+            </when>
+            <when value="No"/>
+        </conditional>
+        <param argument="--identity" type="float" min="0.0" max="100.0" value="99.0" label="Minimum identity for aggregation" help="ASVs will be aggregated if they share the same taxonomy with at least X% identity"/>
+        <param argument="--coverage" type="float" min="0.0" max="100.0" value="99.0" label="Minimum coverage for aggregation" help="ASVs will be aggregated if they share the same taxonomy with at least X% alignment coverage"/>
+    </xml>
+
+    <!-- Test -->
+    <xml name="affiliation_postprocess_test_input">
+        <param name="input_fasta" value="references/04-filters.fasta" />
+        <param name="input_biom" value="references/06-affiliation.biom" />
+
+        <conditional name="is_HVL">
+            <param name="HVL_amplicon" value="Yes" />
+            <param name="reference" value="Unite_extract_ITS1_test" />
+        </conditional>
+    </xml>
+    
+    <xml name="affiliation_postprocess_test_output">
+        <!-- Diff size instead of line because biom include date -->
+        <output name="output_biom" file="references/08-affiliation_postprocessed.biom" compare="sim_size" delta="0"  />
+        <output name="output_fasta" file="references/08-affiliation_postprocessed.fasta" compare="diff" lines_diff="0" />
+        <output name="output_asv_compo" file="references/08-affiliation_postprocessed.compo.tsv" compare="diff" lines_diff="0" />
+    </xml>  
+</macros>