From b34f41d503006307caf4fb7a6276508af5292390 Mon Sep 17 00:00:00 2001 From: johaGL Date: Tue, 6 Aug 2024 19:17:47 +0200 Subject: [PATCH] Metabologram fix (#6210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update(metabologram): add user output option 'show_values' to write the values in the plots or not * metabologram: deleted metabolites selector as is not pertinent * input explanation: only abundances and mean enrichment accepted; improved Help text * metabologram: lint error solved, also more improvement of Help * update macros dimet: citation and suffix version; also for differential analysis improved Help * Update tools/dimet/macros.xml --------- Co-authored-by: Björn Grüning --- tools/dimet/dimet_differential_analysis.xml | 6 +- tools/dimet/dimet_metabologram.xml | 46 +- tools/dimet/macros.xml | 45 +- ...l-T0--DEG_comparison1-abundances-cell.svg} | 585 +++++------------- ...l-T0--DEG_comparison1-abundances-cell.svg} | 576 +++++------------ 5 files changed, 376 insertions(+), 882 deletions(-) rename tools/dimet/test-data/{AMINOACIDS-Control-T0-L-Cycloserine-T0--DEG_comparison1-abundances-cell.svg => AMINOACIDS-L-Cycloserine-T0-Control-T0--DEG_comparison1-abundances-cell.svg} (74%) rename tools/dimet/test-data/{CENTRAL_CARBON_METABOLISM-Control-T0-L-Cycloserine-T0--DEG_comparison1-abundances-cell.svg => CENTRAL_CARBON_METABOLISM-L-Cycloserine-T0-Control-T0--DEG_comparison1-abundances-cell.svg} (75%) diff --git a/tools/dimet/dimet_differential_analysis.xml b/tools/dimet/dimet_differential_analysis.xml index cd6e011860d..634536cfb7f 100644 --- a/tools/dimet/dimet_differential_analysis.xml +++ b/tools/dimet/dimet_differential_analysis.xml @@ -266,11 +266,11 @@ compartments names are, the longer the output files' names! Please pick short an You can precise how you want your analysis to be executed, with the parameters: -- **conditions**: the conditions present in your data, to perform the pairwise comparison. +- **datatypes** : the measures type(s) that you want to run (see above in Input data files section) -- **comparisons** : the pairs of [condition, timepoint] groups to compare +- **conditions**: the two 'Conditions' boxes must be filled in a coherent order, keeping in mind that the last specified condition is the reference or control. -- **datatypes** : the measures type(s) that you want to run (see above in Input data files section) +- **timepoint** : the time point at which the two conditions will be compared. - **statistical_test** : choose, by type of measure, the specific statistical test to be applied. diff --git a/tools/dimet/dimet_metabologram.xml b/tools/dimet/dimet_metabologram.xml index fdf6f59a583..289e0077a68 100644 --- a/tools/dimet/dimet_metabologram.xml +++ b/tools/dimet/dimet_metabologram.xml @@ -32,7 +32,7 @@ colors_divergent_palette: ['royalblue', 'white', 'red'], edge_color: ['black','black'], line_width:['1','1.2'], - display_label_and_value: true, + display_label_and_value: ${output_options.write_values}, font_size: ${output_options.font_size}, fig_width: ${output_options.fig_width}, figure_format:${output_options.figure_format}, @@ -76,6 +76,7 @@ + @@ -93,6 +94,8 @@ + - @@ -124,21 +126,22 @@ - + - +
+
- - + + @@ -171,7 +174,8 @@ This tool requires the following tab-delimited .csv files: 2. **The transcriptomics data**: - 2.1 The table with the results of the differential expression analysis (performed with an external tool) + 2.1 The table with the results of the differential expression analysis (performed with an external tool). Please provide the file with the results of the differential expression analysis of your transcriptomics data. It is recommended to use only the statistically significant **Differentially Expressed Genes (DEG)**. We provide examples in the zenodo (see section **Available data for testing**) + 3. **The pathways files**: @@ -296,16 +300,17 @@ compartments names are, the longer the output files' names! Please pick short an **Running the analysis** -You can precise how you want your analysis to be executed, with the parameters: - +You can precise how you want your analysis to be executed with the parameters, which are of two types: -a. Parameters proper to the metabolomics analysis (that runs automatically before the integration): +**a. Parameters proper to the metabolome differential analysis (that runs automatically before the integration)**: -- **comparisons** : the pairs of [condition, timepoint] groups to compare +- **Conditions and timepoint**: -- **datatypes** : the measures type that you want to run, that must be only one (see above in **Input data files** section) +For each comparison to run on the metabolomics data, you can define the Conditions to compare, at a chosen time point, through the box 'Deregulated gene set': follow the instructions and choose the correct order of Conditions (the last must be the reference or control). +To add a second comparison, click the 'Insert Deregulated gene set' button. +You can insert and define as many boxes ('Deregulated gene set') as comparisons you want to perform. -- **statistical_test** : choose the specific statistical test to be applied. +- **statistical_test**: choose the specific statistical test to be applied. Kruskal-Wallis, Mann-Whitney, Wilcoxon’s signed rank test, Wilcoxon’s rank sum test t-test, and permutation test are currently offered (we use the trusted functions from scipy library https://docs.scipy.org/doc/scipy/reference/stats.html). @@ -318,19 +323,24 @@ considering a minimal acceptable "separation", and therefore, to be suitable for whereas if 'distance/span' < 0 there is no separation. To use with caution in case of important dispersion of your intra-group values. Default is -0.3 (not stringent) -- **correction_method** : one of the methods for multiple testing correction available in statsmodels library (bonferroni, fdr_bh, sidak, among others, see https://www.statsmodels.org/dev/generated/statsmodels.stats.multitest.multipletests.html). +- **correction_method**: one of the methods for multiple testing correction available in statsmodels library (bonferroni, fdr_bh, sidak, among others, see https://www.statsmodels.org/dev/generated/statsmodels.stats.multitest.multipletests.html). -- **compartment** : one of the compartments present in your data. +- **compartment**: one of the compartments present in your data. -b. Parameters proper to the integration (that runs automatically after the metabolites analysis): +**b. Parameters proper to the integration with transcriptomics (that runs automatically after the metabolome differential analysis)**: +- **Deregulated genes set file**: Corresponds to the transcriptomics data, as explained in **Input data files** section. -- **transcripts** : the file(s) with the results of the differential expression analysis. They must be as many as the number of comparisons (metabolomics analysis) and keep a coherent order with them. +For each 'Deregulated gene set' box, a single **Differentially Expressed Genes (DEG)** file must be added, and must match with the metabolomics comparison set in the same box. Additional files can be added with the 'Insert deregulated gene set' button, +see also the subsection 'Conditions and timepoint' above. - **pathways** : files for the pathways, as explained in **Input data files** section -There exist hints on use that will guide you, next to the parameters. +Overall, the metabologram module provides hints on use that will guide you, in the same menus and boxes of the parameters. + + +**Output** The output consists of one figure by metabologram, and a color key bar legend valid for all metabolograms produced diff --git a/tools/dimet/macros.xml b/tools/dimet/macros.xml index b280795bafe..1e33c03c468 100644 --- a/tools/dimet/macros.xml +++ b/tools/dimet/macros.xml @@ -1,6 +1,6 @@ 0.2.4 - 3 + 4 dimet @@ -49,6 +49,7 @@ + 10.1093/bioinformatics/btae282 @software{Galvis_Rodriguez_DIMet, author = {Galvis Rodriguez, Johanna and Guyon, Joris and Dartigues, Benjamin and Specque, Florian and Daubon, Thomas and Karkar, Slim and Nikolski, Macha}, @@ -56,7 +57,6 @@ title = {{DIMet}}, url = {https://github.com/cbib/DIMet} } - @@ -95,58 +95,23 @@ - + - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + - diff --git a/tools/dimet/test-data/AMINOACIDS-Control-T0-L-Cycloserine-T0--DEG_comparison1-abundances-cell.svg b/tools/dimet/test-data/AMINOACIDS-L-Cycloserine-T0-Control-T0--DEG_comparison1-abundances-cell.svg similarity index 74% rename from tools/dimet/test-data/AMINOACIDS-Control-T0-L-Cycloserine-T0--DEG_comparison1-abundances-cell.svg rename to tools/dimet/test-data/AMINOACIDS-L-Cycloserine-T0-Control-T0--DEG_comparison1-abundances-cell.svg index 121a29e41f8..0962932722a 100644 --- a/tools/dimet/test-data/AMINOACIDS-Control-T0-L-Cycloserine-T0--DEG_comparison1-abundances-cell.svg +++ b/tools/dimet/test-data/AMINOACIDS-L-Cycloserine-T0-Control-T0--DEG_comparison1-abundances-cell.svg @@ -6,11 +6,11 @@ - 2023-10-08T10:15:25.308103 + 2024-08-05T11:22:36.862829 image/svg+xml - Matplotlib v3.7.3, https://matplotlib.org/ + Matplotlib v3.9.1, https://matplotlib.org/ @@ -37,7 +37,7 @@ L 258.3 254.52 C 258.3 254.52 258.3 254.52 258.3 254.52 C 258.3 254.52 258.3 254.52 258.3 254.52 z -" style="fill: #ff8c8c; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #a9bbf1; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #5d7fe5; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #7793e9; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #4169e1; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #b7c6f4; stroke: #000000; stroke-linejoin: miter"/> - - + + - - - - - - - - @@ -485,19 +344,11 @@ z - - - - - - - - - - + + - - @@ -705,19 +493,11 @@ z - - - - - - - - - - + + - @@ -821,17 +569,11 @@ z - - - - - - - - + + - @@ -941,14 +664,6 @@ z - - - - - - - - @@ -1005,8 +720,8 @@ z - - + + @@ -1016,18 +731,10 @@ z - - - - - - - - - + - @@ -1082,30 +803,36 @@ z - - - - - - + + + + - - - - - - + - - - - - - - + - - - - - - + - - - - - - - + - - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - @@ -1308,7 +991,7 @@ C 190.250869 214.998843 182.23632 234.347676 182.23632 254.52 C 182.23632 274.692324 190.250869 294.041157 204.514856 308.305144 C 218.778843 322.569131 238.127676 330.58368 258.3 330.58368 z -" clip-path="url(#p7d219f3c34)" style="fill: #1f77b4; stroke: #000000; stroke-width: 1.6; stroke-linejoin: miter"/> +" clip-path="url(#p1744b957a6)" style="fill: #1f77b4; stroke: #000000; stroke-width: 1.6; stroke-linejoin: miter"/> +" clip-path="url(#p1744b957a6)" style="fill: #ffffff; stroke: #ffffff; stroke-linejoin: miter"/> +" style="fill: #7e99eb; stroke: #000000; stroke-width: 1.2; stroke-linejoin: miter"/> - - - - - + + + + + + + + + + + @@ -1371,7 +1124,7 @@ z - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -1535,7 +1288,7 @@ z - + diff --git a/tools/dimet/test-data/CENTRAL_CARBON_METABOLISM-Control-T0-L-Cycloserine-T0--DEG_comparison1-abundances-cell.svg b/tools/dimet/test-data/CENTRAL_CARBON_METABOLISM-L-Cycloserine-T0-Control-T0--DEG_comparison1-abundances-cell.svg similarity index 75% rename from tools/dimet/test-data/CENTRAL_CARBON_METABOLISM-Control-T0-L-Cycloserine-T0--DEG_comparison1-abundances-cell.svg rename to tools/dimet/test-data/CENTRAL_CARBON_METABOLISM-L-Cycloserine-T0-Control-T0--DEG_comparison1-abundances-cell.svg index 19f623953ef..b49b1069776 100644 --- a/tools/dimet/test-data/CENTRAL_CARBON_METABOLISM-Control-T0-L-Cycloserine-T0--DEG_comparison1-abundances-cell.svg +++ b/tools/dimet/test-data/CENTRAL_CARBON_METABOLISM-L-Cycloserine-T0-Control-T0--DEG_comparison1-abundances-cell.svg @@ -6,11 +6,11 @@ - 2023-10-08T10:15:25.255483 + 2024-08-05T11:22:36.765125 image/svg+xml - Matplotlib v3.7.3, https://matplotlib.org/ + Matplotlib v3.9.1, https://matplotlib.org/ @@ -37,7 +37,7 @@ L 258.3 254.52 C 258.3 254.52 258.3 254.52 258.3 254.52 C 258.3 254.52 258.3 254.52 258.3 254.52 z -" style="fill: #ff9696; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #b1c1f3; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #819ceb; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #819ceb; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #94abee; stroke: #000000; stroke-linejoin: miter"/> +" style="fill: #99aeef; stroke: #000000; stroke-linejoin: miter"/> - - + + - - - - - - - @@ -500,19 +405,11 @@ z - - - - - - - - - - + + - - @@ -627,19 +462,11 @@ z - - - - - - - - - - + + - @@ -835,93 +637,22 @@ z - - - - - - - - - - - - - - + + - - - - - - - - - - + + - - - - - - - - @@ -1029,7 +752,7 @@ z - + + @@ -1112,32 +859,37 @@ z - - - - - - + + + + - - - - - - - + - - - - - - + - - - - - - + - - - - - - - + - - - - - - + - - - - - - - + - - - - - - + - - - - - - + - - - - - - - + - - - - - @@ -1377,7 +1081,7 @@ C 190.250869 214.998843 182.23632 234.347676 182.23632 254.52 C 182.23632 274.692324 190.250869 294.041157 204.514856 308.305144 C 218.778843 322.569131 238.127676 330.58368 258.3 330.58368 z -" clip-path="url(#pa5f6097314)" style="fill: #1f77b4; stroke: #000000; stroke-width: 1.6; stroke-linejoin: miter"/> +" clip-path="url(#pe5bb0ceaef)" style="fill: #1f77b4; stroke: #000000; stroke-width: 1.6; stroke-linejoin: miter"/> +" clip-path="url(#pe5bb0ceaef)" style="fill: #ffffff; stroke: #ffffff; stroke-linejoin: miter"/> +" style="fill: #93aaee; stroke: #000000; stroke-width: 1.2; stroke-linejoin: miter"/> - - - - - + + + + + + + + + + + + + + @@ -1440,9 +1206,16 @@ z - + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -1647,7 +1413,7 @@ z - +