diff normalisation_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 31abf44b6599
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/normalisation_macros.xml	Wed Feb 04 13:15:55 2026 +0000
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<macros>
+    <token name="@NORMALISATION_CMD_LINE@">
+		normalisation.py 
+			--input-biom '$input_biom'
+			--input-fasta '$input_fasta'
+
+			#if $sampling_method.sampling_by_min == "yes"
+				--sampling-by-min
+			#else
+				--num-reads $sampling_method.num_reads
+
+				#if $sampling_method.delete_samples == "true"
+				--delete-samples
+				#end if
+			#end if
+
+			--output-biom '$output_biom'
+			--output-fasta '$output_fasta'
+			--html '$html'
+    </token>
+
+    <xml name="normalisation_inputs">
+        <!-- Files -->
+        <param argument="--input-fasta" type="data" format="fasta" label="Sequence file (.fasta)" help="The sequence file to normalise." />
+        <param argument="--input-biom" type="data" format="biom1" label="Abundance file (.biom)" help="The abundance file to normalise." />
+
+        <!-- Parameters -->
+        <conditional name="sampling_method">
+			<param name="sampling_by_min" type="select" label="Sampling method" help="Sample the total number of sequences per sample based on the number of sequences in the smallest sample (--sampling-by-min), or by defining a number of sequences manually (--num-reads)." display="radio">
+            	<option value="yes" selected="true">automatically, based on the number of sequences in the smallest sample </option>
+            	<option value="no">manually, by setting the number of sequences</option>
+			</param>
+            <when value="yes"/>
+            <when value="no">
+                <param name="num_reads" type="integer" min="1" value="" label="Number of reads" help="The final number of reads per sample." />
+                <param argument="--delete-samples" type="select" label="Removal samples that have an initial number of reads below the number of reads to sample." display="radio">
+                    <option value="false">No, subsampling threshold need to at most equal to the smallest sample</option>
+                    <option value="true">Yes, subsampling threshold may be greater than the smallest sample</option>
+                </param>
+            </when>
+		</conditional>
+    </xml>
+
+	<!-- Test -->
+    <xml name="normalisation_test_input">
+        <param name="input_fasta" value="references/08-affiliation_postprocessed.fasta" />
+        <param name="input_biom" value="references/08-affiliation_postprocessed.biom" />
+
+		<conditional name="sampling_method">
+			<param name="sampling_by_min" value="no" />
+			<param name="num_reads" value="100" />
+			<param name="delete_samples" value="true" />
+		</conditional>
+    </xml>
+    
+    <xml name="normalisation_test_output">
+        <!-- Because of random sampling results may slightly vary -->
+        <output name="output_fasta" file="references/09-normalisation.fasta" compare="diff" lines_diff="4" />
+        <!-- Because of random sampling results may slightly vary -->
+        <output name="html" file="references/09-normalisation.html" compare="sim_size" delta="0" />
+        <output name="html" file="references/09-normalisation.html" compare="diff" lines_diff="4" />
+    </xml>  
+</macros>