Mercurial > repos > melpetera > corr_table
diff CorrTable/Corr.xml @ 1:29ec7e3afdd4 draft
Uploaded
| author | melpetera |
|---|---|
| date | Thu, 01 Aug 2019 11:30:58 -0400 |
| parents | b22c453e4cf4 |
| children |
line wrap: on
line diff
--- a/CorrTable/Corr.xml Thu Oct 11 05:35:55 2018 -0400 +++ b/CorrTable/Corr.xml Thu Aug 01 11:30:58 2019 -0400 @@ -1,4 +1,4 @@ -<tool id="corrtable" name="Between-table Correlation" version="0.0.0"> +<tool id="corrtable" name="Between-table Correlation" version="1.0.0"> <description>Correlation table between two tables and graphic representation </description> <requirements> <requirement type="package" version="1.1_4">r-batch</requirement> @@ -33,18 +33,23 @@ reorder_var "$out_section.reorder_var" - color_heatmap "${out_section.heatmap_cond.color_heatmap}" - #if str($out_section.heatmap_cond.color_heatmap) == 'yes' : - type_classes "${out_section.heatmap_cond.typeclass_cond.type_classes}" - #if str($out_section.heatmap_cond.typeclass_cond.type_classes) == 'regular' : - reg_class_value "${out_section.heatmap_cond.typeclass_cond.reg_class_value}" - #elif str($out_section.heatmap_cond.typeclass_cond.type_classes) == 'irregular' : - irreg_class_vect "${out_section.heatmap_cond.typeclass_cond.irreg_class_vect}" - #end if + plot_choice "$out_section.plot_cond.plot_choice" + #if str($out_section.plot_cond.plot_choice) == 'none' : + tabcorr_out "$tabcorr_out" + #else: + color_heatmap "${out_section.plot_cond.heatmap_cond.color_heatmap}" + #if str($out_section.plot_cond.heatmap_cond.color_heatmap) == 'yes' : + type_classes "${out_section.plot_cond.heatmap_cond.typeclass_cond.type_classes}" + #if str($out_section.plot_cond.heatmap_cond.typeclass_cond.type_classes) == 'regular' : + reg_class_value "${out_section.plot_cond.heatmap_cond.typeclass_cond.reg_class_value}" + #elif str($out_section.plot_cond.heatmap_cond.typeclass_cond.type_classes) == 'irregular' : + irreg_class_vect "${out_section.plot_cond.heatmap_cond.typeclass_cond.irreg_class_vect}" + #end if + #end if + tabcorr_out "$tabcorr_out" + heatmap_out "$heatmap_out" #end if - - tabcorr_out "$tabcorr_out" - heatmap_out "$heatmap_out" + </command> @@ -118,55 +123,142 @@ </conditional> </section> - <section name="out_section" title="Graphical outputs" expanded="False"> + <section name="out_section" title="Output options" expanded="False"> <param name="reorder_var" label="Reorder variables (using Hierarchical Cluster Analysis)" type="select" display="radio" help=""> <option value="no">No</option> <option value="yes">Yes</option> </param> - <conditional name="heatmap_cond"> - <param name="color_heatmap" label="Colored correlation table strategy" type="select" display="radio" help="Standard corresponds to a scale with a smooth gradient between three colors: red, white and green (continuous case). Customized creates classes for the correlation coefficients - the scale has discrete values."> - <option value="no">Standard</option> - <option value="yes">Customized</option> + <conditional name="plot_cond"> + <param name="plot_choice" label="PDF output" type="select" help="To determine whether a colored correlation table is plotted."> + <option value="auto">Default</option> + <option value="forced">Always plot a colored table</option> + <option value="none">No colored table</option> </param> - <when value="yes"> - <conditional name="typeclass_cond"> - <param name="type_classes" label="Choose the type of classes" type="select" display="radio" help="Regular means the classes have the same size. Irregular means it is possible to choose any intervals." > - <option value="regular">Regular classes</option> - <option value="irregular">Irregular classes</option> - </param> + <when value="auto"> + <conditional name="heatmap_cond"> + <param name="color_heatmap" label="Colored correlation table strategy" type="select" display="radio" help="Standard corresponds to a scale with a smooth gradient between three colors: red, white and green (continuous case). Customized creates classes for the correlation coefficients - the scale has discrete values."> + <option value="no">Standard</option> + <option value="yes">Customized</option> + </param> + + <when value="yes"> + <conditional name="typeclass_cond"> + <param name="type_classes" label="Choose the type of classes" type="select" display="radio" help="Regular means the classes have the same size. Irregular means it is possible to choose any intervals." > + <option value="regular">Regular classes</option> + <option value="irregular">Irregular classes</option> + </param> + + <when value="regular"> + <param name="reg_class_value" label="Class size" type="float" value="" help="Must be between 0 and 1" /> + </when> - <when value="regular"> - <param name="reg_class_value" label="Class size" type="float" value="" help="Must be between 0 and 1" /> - </when> - - <when value="irregular"> - <param name="irreg_class_vect" label="Vector with values for classes" type="text" value="" help="The vector must be of the following form: (value1,value2,value3,..). The values must be between -1 and 1 not included. For example: (-0.8,-0.5,-0.4,0,0.4,0.5,0.8)." /> - </when> - </conditional> + <when value="irregular"> + <param name="irreg_class_vect" label="Vector with values for classes" type="text" value="" help="The vector must be of the following form: (value1,value2,value3,..). The values must be between -1 and 1 not included. For example: (-0.8,-0.5,-0.4,0,0.4,0.5,0.8)." /> + </when> + </conditional> + </when> + + <when value ="no"> + </when> + + </conditional> </when> - <when value ="no"> + <when value ="forced"> + <conditional name="heatmap_cond"> + <param name="color_heatmap" label="Colored correlation table strategy" type="select" display="radio" help="Standard corresponds to a scale with a smooth gradient between three colors: red, white and green (continuous case). Customized creates classes for the correlation coefficients - the scale has discrete values."> + <option value="no">Standard</option> + <option value="yes">Customized</option> + </param> + + <when value="yes"> + <conditional name="typeclass_cond"> + <param name="type_classes" label="Choose the type of classes" type="select" display="radio" help="Regular means the classes have the same size. Irregular means it is possible to choose any intervals." > + <option value="regular">Regular classes</option> + <option value="irregular">Irregular classes</option> + </param> + + <when value="regular"> + <param name="reg_class_value" label="Class size" type="float" value="" help="Must be between 0 and 1" /> + </when> + + <when value="irregular"> + <param name="irreg_class_vect" label="Vector with values for classes" type="text" value="" help="The vector must be of the following form: (value1,value2,value3,..). The values must be between -1 and 1 not included. For example: (-0.8,-0.5,-0.4,0,0.4,0.5,0.8)." /> + </when> + </conditional> + </when> + + <when value ="no"> + </when> + + </conditional> </when> + + <when value ="none"> + </when> + </conditional> + + </section> </inputs> <outputs> <data name="tabcorr_out" label="CorrTable" format="tabular" /> - <data name="heatmap_out" label="CT_plot" format="pdf" /> + <data name="heatmap_out" label="CT_plot" format="pdf" > + <filter>out_section['plot_cond']['plot_choice'] == 'auto' or out_section['plot_cond']['plot_choice'] == 'forced'</filter> + </data> </outputs> + + <tests> + <test> + <param name="tab1_in" value="input1_tab1.tabular"/> + <param name="tab1_samples" value="column"/> + <param name="tab2_in" value="input1_tab2.txt"/> + <param name="tab2_samples" value="row"/> + <param name="corr_method" value="pearson"/> + <param name="test_corr" value="no"/> + <param name="filter" value="yes"/> + <param name="filters_choice" value="filters_0_thr"/> + <param name="threshold" value="0.3"/> + <param name="reorder_var" value="no"/> + <param name="plot_choice" value="auto"/> + <param name="color_heatmap" value="yes"/> + <param name="type_classes" value="irregular"/> + <param name="irreg_class_vect" value="(-0.8,-0.7,-0.5,-0.4,-0.3,-0.2,0,0.2,0.3,0.4,0.5,0.7,0.8)"/> + <output name="tabcorr_out" file="output1_CorrTable.tabular"/> + <output name="heatmap_out" file="output1_CT_plot.pdf"/> + </test> + <test> + <param name="tab1_in" value="input2_dataMatrix_500.txt"/> + <param name="tab1_samples" value="column"/> + <param name="tab2_in" value="input2_dataMatrix_500.txt"/> + <param name="tab2_samples" value="column"/> + <param name="corr_method" value="pearson"/> + <param name="test_corr" value="no"/> + <param name="filter" value="yes"/> + <param name="filters_choice" value="filters_0_thr"/> + <param name="threshold" value="0.7"/> + <param name="reorder_var" value="no"/> + <param name="plot_choice" value="auto"/> + <param name="color_heatmap" value="no"/> + <output name="tabcorr_out" file="output2_CorrTable.tabular"/> + </test> + </tests> + + <help> .. class:: infomark **Author:** Ophelie Barbet for original code (PFEM - INRA) -Maintainer: Melanie Petera (PFEM - INRA - MetaboHUB) +**Maintainer:** Melanie Petera (PFEM - INRA - MetaboHUB) --------------------------------------------------- @@ -204,14 +296,12 @@ Positions of samples in table 1 and table 2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Essential to correctly calculate the correlations. - | Method for calculating the correlation coefficients ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - 'Pearson': Measures the intensity of the linear association between two continuous variables. - | - The 'Spearman' and 'Kendall' methods are explained in the R documentation of the 'cor' function as follows: " Kendall's tau or Spearman's rho statistic is used to estimate a rank-based measure of association. These are more robust and have been recommended if the data do not necessarily come from a bivariate normal distribution.". - | - + | - The 'Spearman' and 'Kendall' methods are explained in the R documentation of the 'cor' function as follows: " Kendall's tau or Spearman's rho statistic is used to estimate a rank-based measure of association. These are more robust and have been recommended if the data do not necessarily come from a bivariate normal distribution.". + Significance test for the correlation coefficients ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | This test is performed on each correlation coefficient, with the following hypotheses: @@ -219,7 +309,6 @@ | H1: The correlation coefficient is significantly different from zero. | | Coefficients whose null hypothesis (H0) are not rejected are replaced by zeros in the correlation table. - | | **Method for multiple testing correction (only if significance test is 'Yes'):** | The 7 methods implemented in the 'p.adjust' R function are available and documented as follows: @@ -233,7 +322,6 @@ Filter the correlation table ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Allows to reduce the correlation table size by keeping only variables considered relevant. - | | **Choose the filters to apply (only if filter is 'Yes'):** | - 'Only zero filter': Remove variables with all their correlation coefficients equal to zero. @@ -241,25 +329,34 @@ | *Choose a threshold (only threshold filter is used):* A value between 0 and 1. | + +Output options +^^^^^^^^^^^^^^ + | Allows to set some parameters for the correlation table output and the pdf file. -Reorder variables using Hierarchical Cluster Analysis (HCA) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | Allows the most linked variables to be close in the correlation table. - | A HCA is performed on each input tables, with: - | - 1 - correlation coefficient, as distance - | - Ward as aggregation method. - | +| **Reorder variables using Hierarchical Cluster Analysis (HCA):** +| Allows the most linked variables to be close in the correlation table. +| A HCA is performed on each input tables, with: +| - 1 - correlation coefficient, as distance +| - Ward as aggregation method. +| - +| **PDF output:** To determine whether a colored correlation table is plotted. +| - 'Default': generates a pdf file with a colored correlation table if the filtered table has no dimension above 1000 (number of lines or columns). +| - 'Always plot a colored table': used when you are not afraid of huge colored correlation table; to be used wisely. +| - 'No colored table': the module will generate the correlation table in tabular format only (no pdf file). +| + Colored correlation table strategy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | Allows to create a colored correlation table. Variables of table 1 and variables of table 2 are related using colored rectangles. - | About the colors, the negative correlations are in red, more or less intense according to their position between -1 and 0, and the positive correlations in green, more or less intense according to their position between 0 and 1. The coefficients equal to 0 are in white. - | - 'Standard': the graphical representation has a scale with a smooth gradient between three colors: red, white and green. - | - 'Customized': the colored correlation table has coefficient classes. It is possible to create regular or irregular classes. The scale is discreet. - | - + | *Only available when* **PDF output** *is set to 'Default' or 'Always plot a colored table'.* + | Allows to create a colored correlation table. Variables of table 1 and variables of table 2 are related using colored rectangles. + | About the colors, the negative correlations are in red, more or less intense according to their position between -1 and 0, and the positive correlations in green, more or less intense according to their position between 0 and 1. The coefficients equal to 0 are in white. + | - 'Standard': the graphical representation has a scale with a smooth gradient between three colors: red, white and green. + | - 'Customized': the colored correlation table has coefficient classes. It is possible to create regular or irregular classes. The scale is discreet. + | **Choose the type of classes (only if colored correlation table strategy is 'Customized'):** +| | - 'Regular': classes are all (or almost) the same size. | To realize these intervals, we start from 1 to go to 0 by taking a step of the size chosen by the user, and we make the symmetry for -1 towards 0. If the last step does not fall on the 0 value, we create a class between this last value and 0, smaller in size than the others. It is important to specify that 0 represents a class on its own, which is assigned the color white for the heatmap. @@ -267,7 +364,6 @@ | *Size of classes (if regular classes):* A value between 0 and 1. | Example: if the size is 0.4, classes are [-1;-0.6], ]-0.6;-0.2], ]-0.2;0[, 0, ]0;0.2], ]0.2;0.6] and ]0.6;1]. -| | - 'Irregular': classes have variable lengths. | It is possible to do as many classes as you want, and of any size. There is not necessarily symmetry between -1 and 0, and 0 and 1. You can choose to have a white class with only 0, or an interval which contains the value 0. @@ -276,7 +372,7 @@ | Example: if the vector is (-0.8,-0.5,-0.4,0,0.4,0.5,0.8), the classes are [-1;-0.8], ]-0.8;-0.5], ]-0.5;-0.4], ]-0.4;0[, 0, ]0;0.4], ]0.4;0.5], ]0.5;0.8] and ]0.8;1]. | - + ------------ Output files @@ -291,7 +387,7 @@ Heatmap (colored correlation table) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Pdf output - | Colored representation of the correlation table. The coefficients are replaced by colors. A coefficient close to -1 is red, close to 0 white, and close to 1 in green. + | Colored representation of the correlation table. The coefficients are replaced by colors. A coefficient close to -1 is red, close to 0 white, and close to 1 green. |
