view Intchecks/xml_intensity_check.xml @ 6:ec75de7f1e08 draft default tip

Uploaded
author melpetera
date Mon, 11 Dec 2023 12:56:20 +0000
parents a31f3f802b2b
children
line wrap: on
line source

<tool id="intens_check" name="Intensity Check" version="1.3.0">
	<description>Statistical measures, number of missing values and mean fold change</description>
	<requirements>
	    <requirement type="package" version="4.2.1">r-base</requirement>
	</requirements>
	<command interpreter="Rscript">
  
		wrapper_intensity_check.R
	
		dataMatrix_in "$dataMatrix_in"
		sampleMetadata_in "$sampleMetadata_in"
		variableMetadata_in "$variableMetadata_in"
		
		method "${method_cond.method}"
		
		chosen_stat "${method_cond.chosen_stat}"
		
		#if $method_cond.method == "each_class" :
			class_col "${method_cond.class_col}"
			test_fold "${method_cond.test_fold_cond.test_fold}"
			#if $method_cond.test_fold_cond.test_fold == "Yes" :
				logarithm "${method_cond.test_fold_cond.logarithm}"
			#end if
		#end if
		
		#if $method_cond.method == "one_class" :
			class_col "${method_cond.class_col}"
			class1 "${method_cond.class1}"
			test_fold "${method_cond.test_fold_cond.test_fold}"
			#if $method_cond.test_fold_cond.test_fold == "Yes" :
				fold_frac "${method_cond.test_fold_cond.fold_frac}"
				logarithm "${method_cond.test_fold_cond.logarithm}"
			#end if
		#end if
		
		variableMetadata_out "$variableMetadata_out"
		graphs_out "$graphs_out"
		
		
		
	</command>

	<inputs>
		<param name="dataMatrix_in" type="data" label="Data matrix file" help="" format="tabular" />
		<param name="sampleMetadata_in" type="data" label="Sample metadata file" help="" format="tabular" />
		<param name="variableMetadata_in" type="data" label="Variable metadata file" help="" format="tabular" />
		
		<conditional name="method_cond">
			<param name="method" type="select" label="Computation method" help="Select the first method if you don't want to take into account any class of samples">
				<option value="no_class">Without distinction between samples </option>
				<option value="each_class">For each class of samples  </option>
				<option value="one_class">Between one class and all the remaining samples </option>
				
			</param>
			
			<when value="no_class">
				<param name="chosen_stat" type="select" display="checkboxes" multiple="True" label="Statistics">
					<option value="mean">Mean</option>
                    <option value="sd">Standard deviation</option>
                    <option value="median">Median</option>
                    <option value="quartile">Quartile</option>
                    <option value="decile">Decile</option>
					<option value="NA">Missing values</option>
					<validator type="no_options" message="Please choose at least one statistic representation" />
				</param>
			</when>
			
			<when value="each_class">
				<param name="class_col" type="text" label="Class column" help="Name of the column in Sample metadata" />
				<param name="chosen_stat" type="select" display="checkboxes" multiple="True" label="Statistics">
					<option value="mean">Mean</option>
                    <option value="sd">Standard deviation</option>
                    <option value="median">Median</option>
                    <option value="quartile">Quartile</option>
                    <option value="decile">Decile</option>
					<option value="NA">Missing values</option>
				</param>
				<conditional name="test_fold_cond">
					<param name="test_fold" type="select" display="radio" label="Calculate the mean fold change">
						<option value="Yes">Yes</option>
						<option value="No">No</option>
					</param>
					<when value="Yes">
						<param name="logarithm" type="select" label="Logarithm" help="Choose if you want the mean fold change to be converted into a log mean fold change (log2 or log10)">
							<option value="none">none </option>
							<option value="log2">log2 </option>
							<option value="log10">log10 </option>
						</param>
					</when>
					<when value="No">
					</when>
				</conditional>
			</when>
			
			<when value="one_class">
				<param name="class_col" type="text" label="Class column" help="Name of the column in Sample metadata" />
				<param name="class1" type="text" label="Selected class" help="Name of the class to test versus all the remaining samples." />
				<param name="chosen_stat" type="select" display="checkboxes" multiple="True" label="Statistics">
					<option value="mean">Mean</option>
                    <option value="sd">Standard deviation</option>
                    <option value="median">Median</option>
                    <option value="quartile">Quartile</option>
                    <option value="decile">Decile</option>
					<option value="NA">Missing values</option>
				</param>
				<conditional name="test_fold_cond">
					<param name="test_fold" type="select" display="radio" label="Calculate the mean fold change">
						<option value="Yes">Yes</option>
						<option value="No">No</option>
					</param>
					<when value="Yes">
						<param name="fold_frac" type="select" label="Where should the class be placed for the mean fold change calculation?" display="radio">
							<option value="Top">Numerator (Top) </option>
							<option value="Bottom">Denominator (Bottom) </option>
						</param>
						<param name="logarithm" type="select" label="Logarithm" help="Choose if you want the mean fold change to be converted into a log mean fold change (log2 or log10)">
							<option value="none">none </option>
							<option value="log2">log2 </option>
							<option value="log10">log10 </option>
						</param>
					</when>
					<when value="No">
					</when>
				</conditional>
			</when>
		</conditional>
	</inputs>
					
	
	<outputs>
		<data name="variableMetadata_out" label="IC_${variableMetadata_in.name}" format="tabular" />
		<data name="graphs_out" label="IC_Graphs" format="pdf" />
	</outputs>
	
	
  <tests>
	<test>
      <param name="dataMatrix_in" value="input_IC_DM.txt"/>
      <param name="sampleMetadata_in" value="input_IC_SM.txt"/>
      <param name="variableMetadata_in" value="input_IC_VM.txt"/>
	  <param name="method" value="one_class"/>
	  <param name="chosen_stat" value="mean,sd,NA"/>
	  <param name="class_col" value="uv"/>
	  <param name="class1" value="s"/>
	  <param name="test_fold" value="Yes"/>
	  <param name="fold_frac" value="Bottom"/>
	  <param name="logarithm" value="log2"/>
      <output name="variableMetadata_out" file="output_IC_VM.tabular"/>
	</test>
  </tests>
	
	<help>

.. class:: infomark

**Author:** 
Anthony Fernandes for original code (PFEM - INRA) 
**Maintainer:** Melanie Petera (PFEM - INRAE - MetaboHUB)

---------------------------------------------------

========================
Intensity Check
========================

-----------
Description
-----------

This tool performs various metrics: mean fold change calculation, number and proportion of missing values, and mean, sd and decile calculation.
You can choose to perform these metrics according to sample groups defined in the sample metadata file given as input. 

 
-----------------
Workflow position
-----------------


.. image:: int_check.png
        :width: 800


-----------
Input files
-----------

+----------------------------+------------+
| Parameter                  |   Format   |
+============================+============+
| 1 : Data matrix file       |   tabular  |
+----------------------------+------------+
| 2 : Sample metadata file   |   tabular  |
+----------------------------+------------+
| 3 : Variable metadata file |   tabular  |
+----------------------------+------------+

	| 


----------
Parameters
----------

**Computation method**
	| 	- **Without distinction between samples:** calculates chosen statistic(s) for each variable.
	| 	- **For each class of samples:** separates samples between each class (class column to specified). Chosen statistic(s) and/or mean fold change are calculated for each of them. 
	| 	- **Between one class versus all the remaining samples:** If you want to focus only on one class versus all the remaining samples without class distinction. 
	
	| In the case of two classes: "each class" and "one class" give the same results for statistical measures. We recommend to choose "one class" for mean fold change calculation in order to select the class you want to put as numerator or denominator (see below).
	
**Statistics**
	|  Select the statistical measures you want to add in the variable metadata table. If the method is "each class" or "one class", you can choose to leave this section blank if you only want to calculate the mean fold change (see below).

**Class column** (*only if "each class" or "one class"*)
	| Fill the name of the class column in sample metadata table; it is case-sensitive.

**Selected class** (*only if "one class"*)
	| If the method is "one class", specify it. Remaining samples will be named "Other".
	
**Calculate the mean fold change** (*only if "each class" or "one class"*)
	| Choose if you want to calculate the mean fold change. If the method is "each class": mean fold change will be calculated for all combinations of classes. If the method is "one class": it will be calculated between the selected class (see above) and the remaining samples.
	
**Where should the class be placed for the mean fold change calculation?** (*only if "one class"*)
	| If the method is "one class", choose "top" or "bottom" to put the selected class as numerator or denominator (respectively) for the mean fold change calculation.	
	
**Logarithm** (*only if "each class" or "one class"*)
	| Choose if you want to transform the mean fold change with a log2 or log10.
	
------------
Output file
------------

**Variable metadata file**
	| Contains the previous columns in variable metadata file and the new ones.
	| In the column names for fold, the first class specified is the one used as numerator in the ratio.
	
**Graphs file**
	| Contains barplots with the proportion of NA considering classes and boxplots with the fold values.



---------------------------------------------------

----------------------
Additional information
----------------------


.. class:: warningmark

For more information about input files, refer to the corresponding "W4M HowTo" page:
 | `W4M table format for Galaxy &lt;https://workflow4metabolomics.org/sites/default/files/fichiers/documents/w4m_TableFormatForGalaxy_150908.pdf&gt;`_
 |






	</help>
	
	
</tool>