diff normalisation.xml @ 9:7bf54edaba24 draft

planemo upload for repository https://github.com/geraldinepascal/FROGS-wrappers/ commit 3d595459e82ea1674c83543f41c18169c159450e-dirty
author oinizan
date Thu, 12 May 2022 10:44:30 +0000
parents 76dcbe930b1d
children ab9e3c8ab443
line wrap: on
line diff
--- a/normalisation.xml	Mon Aug 23 09:25:07 2021 +0000
+++ b/normalisation.xml	Thu May 12 10:44:30 2022 +0000
@@ -15,13 +15,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
-<tool id="FROGS_normalisation" name="FROGS Abundance normalisation" version="@TOOL_VERSION@+galaxy2">
+<tool id="FROGS_normalisation" name="FROGS Abundance normalisation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
         <description>Normalise OTUs abundance.</description>
 
     <macros>
         <import>macros.xml</import>
     </macros>
-
     <expand macro="requirements"/>
 
         <stdio>
@@ -29,10 +28,19 @@
                 <exit_code range=":-1" />
         </stdio>
 	<command>
-		normalisation.py
+		which normalisation.py;
+
+		normalisation.py 
 		                       --input-biom '$input_biom'
 		                       --input-fasta '$input_fasta'
-		                       --num-reads $num_reads
+		                       #if $sampling_method.sampling_by_min == "yes"
+		                       	 --sampling-by-min
+		                       #else
+		                         --num-reads $sampling_method.num_reads
+		                       	 #if $sampling_method.delete_samples
+		                           --delete-samples
+		                         #end if
+		                       #end if
 		                       --output-biom '$output_biom'
 		                       --output-fasta '$output_fasta'
 		                       --summary-file '$summary_file'
@@ -40,7 +48,16 @@
 	<inputs>
 		<param format="fasta" name="input_fasta" type="data" label="Sequence file" help="Sequence file to normalise (format: fasta)." />
 		<param format="biom1" name="input_biom" type="data" label="Abundance file" help="Abundance file to normalise (format: BIOM)." />
-		<param name="num_reads" type="integer" optional="false" min="1" value="" label="Number of reads" help="The final number of reads per sample." />
+		<conditional name="sampling_method">
+			<param name="sampling_by_min" type="select" label="Sampling method" help='Sampling by the number of sequences of the smallest sample, or select a number manually' display='radio'>
+            	<option value="yes" selected="true">Sampling by the number of sequences of the smallest sample</option>
+            	<option value="no">Select a number of reads</option>
+			</param>
+		<when value="no">
+			<param name="num_reads" type="integer" optional="true" min="1" value="" label="Number of reads" help="The final number of reads per sample." />
+			<param name="delete_samples" type="boolean" label="Remove samples that have an initial number of reads below the number of reads to sample ?"  />
+		</when>
+		</conditional>
 	</inputs>
 	<outputs>
 		<data format="fasta" name="output_fasta" label="${tool.name}: normalised_sequences.fasta" from_work_dir="normalised.fasta" />
@@ -51,7 +68,9 @@
         <test>
             <param name="input_fasta" value="references/08-affiliation_postprocessed.fasta"/>
 	        <param name="input_biom" value="references/08-affiliation_postprocessed.biom"/>
-        	<param name="num_reads" value="100"/>
+        	<conditional name="sampling_method">
+        	<param name="sampling_by_min" value="true"/>
+        	</conditional>
             <output name="summary_file" file="references/09-normalisation.html" compare="sim_size" delta="0" />
             <output name="summary_file" file="references/09-normalisation.html" compare="diff" lines_diff="4" />
             <output name="output_fasta" file="references/09-normalisation.fasta" compare="diff" lines_diff="12" />
@@ -83,6 +102,18 @@
 
 The abundance of each OTU in each sample (format `BIOM &lt;http://biom-format.org/&gt;`_).
 
+**Sampling method**:
+
+Sequence normalisation method :
+
+ - **Sampling by the number of sequences of the smallest sample** : Automatically detects the number of reads of the smallest sample, and selects this number for all other samples.
+ - **Select number of reads** : Manually select a number of reads.
+
+.. image:: static/images/icon_warning_sml.gif 
+
+If the **remove samples** option is enabled, samples whose total number of sequences is lower than the specified number will be removed inside the abundance table. 
+If the option is disabled, the samples will be kept in the analysis but with a number of sequences lower than the specified number (the total number of the sample).
+
 .. class:: h3
 
 Outputs
@@ -93,26 +124,18 @@
 
 **Abundance file** (normalised_abundance.biom):
 
- The normalised abundance file (format `BIOM &lt;http://biom-format.org/&gt;`_).
+ The normalised abundance file. If option **remove samples** has been chosen, then the abundance table will no longer contain information about the removed samples. (format `BIOM &lt;http://biom-format.org/&gt;`_).
 
-**Summary file** (report.html):
+**Report file** (report.html):
 
  Information about discarded data (format `HTML &lt;https://en.wikipedia.org/wiki/HTML&gt;`_).
 
 
 .. class:: infomark page-header h2
 
-Advices
-
-The number specified in "Number of reads" must be smaller than each total number of sequences by sample.
-
 
 @HELP_CONTACT@
 
 	</help>
-
-	<citations>
-		<expand macro="citations" />
-	</citations>
-	
+	<expand macro="citations" />
 </tool>