Mercurial > repos > iuc > dimet_pca_plot
view dimet_pca_plot.xml @ 1:a06d1febf79e draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/DIMet commit 7568e92bfc4560d6e0287e7444455f55c86d135d
author | iuc |
---|---|
date | Tue, 23 Jan 2024 14:59:40 +0000 |
parents | 952808ffa842 |
children | 23f87b8cc62b |
line wrap: on
line source
<tool id="dimet_@EXECUTABLE@" name="dimet @TOOL_LABEL@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05"> <description> Figures of Principal Component Analysis for tracer metabolomics (by DIMet) </description> <macros> <token name="@TOOL_LABEL@">pca plot</token> <token name="@EXECUTABLE@">pca_plot</token> <import>macros.xml</import> </macros> <expand macro="requirements"/> <command detect_errors="exit_code"><![CDATA[ @INIT_CONFIG@ @INIT_PCA@ @INIT_IMPUTE_VALUES@ @INIT_CONDITIONS@ HYDRA_FULL_ERROR=1 python -m dimet -cp '$__new_file_path__/config' '++hydra.run.dir=pca-plot' '++figure_path=figures' '++table_path=tables' '++analysis={ dataset:{ _target_:dimet.data.DatasetConfig, name: "Galaxy DIMet run" }, method:{ _target_: dimet.method.PcaPlotConfig, label: pca-plot, name: "Generate Principal Component Analysis plots", pca_split_further:['timepoint'], draw_ellipses: null, run_iris_demo: false, color: condition, style: timepoint, figure_format:${output_options.figure_format}, impute_values:${impute_values} }, label: pca-plot }' '++analysis.dataset.subfolder=' '++analysis.dataset.label=' '++analysis.dataset.conditions=${conds}' #if $metadata_path: '++analysis.dataset.metadata=metadata' #end if #if $abundance_file: '++analysis.dataset.abundances=abundance' #end if #if $me_or_frac_contrib_file: '++analysis.dataset.mean_enrichment=me_or_frac_contrib' #end if @REMOVE_CONFIG@ ]]></command> <inputs> <expand macro="input_parameters_pca"/> <expand macro="conditions"/> <section name="output_options" title="Output options"> <param name="figure_format" type="select" value="pdf" display="radio" label="Select output figure format" help="Please enter at max 1 format"> <option value="pdf">Pdf</option> <option value="svg">Svg</option> </param> </section> </inputs> <outputs> <collection name="report" type="list"> <discover_datasets pattern="__designation_and_ext__" directory="figures"/> </collection> </outputs> <tests> <test> <param name="abundance_file" ftype="tabular" value="rawAbundances.csv" /> <param name="metadata_path" ftype="tabular" value="example2_metadata.csv"/> <param name="conditions" value='Control,L-Cycloserine'/> <section name="output_options"> <param name="figure_format" value="svg"/> </section> <output_collection name="report" type="list" count="18"> <element file="abundances--T0--cell_var.svg" name="abundances--T0--cell_var" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T0--cell--label-n_pc.svg" name="abundances--T0--cell--label-n_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T0--cell--label-y_pc.svg" name="abundances--T0--cell--label-y_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T0--med_var.svg" name="abundances--T0--med_var" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T0--med--label-n_pc.svg" name="abundances--T0--med--label-n_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T0--med--label-y_pc.svg" name="abundances--T0--med--label-y_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T2h--cell--label-n_pc.svg" name="abundances--T2h--cell--label-n_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T2h--cell--label-y_pc.svg" name="abundances--T2h--cell--label-y_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T2h--cell_var.svg" name="abundances--T2h--cell_var" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T2h--med--label-n_pc.svg" name="abundances--T2h--med--label-n_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T2h--med--label-y_pc.svg" name="abundances--T2h--med--label-y_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--T2h--med_var.svg" name="abundances--T2h--med_var" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--cell--label-n_pc.svg" name="abundances--cell--label-n_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--cell--label-y_pc.svg" name="abundances--cell--label-y_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--cell_var.svg" name="abundances--cell_var" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--med--label-n_pc.svg" name="abundances--med--label-n_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--med--label-y_pc.svg" name="abundances--med--label-y_pc" ftype="svg" compare="sim_size" delta="100"/> <element file="abundances--med_var.svg" name="abundances--med_var" ftype="svg" compare="sim_size" delta="100"/> </output_collection> </test> </tests> <help><![CDATA[ This module is part of DIMet: Differential analysis of Isotope-labeled targeted Metabolomics data (https://pypi.org/project/DIMet/). This tool performs the Principal Components Analysis (PCA) on your data, generating the figures with the results of the PCA, it is, the scatter-plot of the two first principal components or dimensions (eigenvalues), and the barplot of the percentage of explained variances across all the principal components detected in your data. The figures in .pdf format are of publication quality, and as they are vectorial images you can open them and customize aesthetics with a professional image software such as Inkscape, Adobe Illustrator, Sketch, CorelDRAW, etc. **Input data files** This tool requires (at max.) 3 tab-delimited .csv files as inputs. There are two types of files: - The measures' (or quantifications') files, that can be of 4 types. - The metadata, a unique file with the description of the samples in your measures' files. This is compulsory. For running DIMet @EXECUTABLE@ you need **at least one file** of measures: - The total **abundances** (of the metabolites) file - The mean **enrichment** or labelled fractional contributions and one metadata file, WHICH IS COMPULSORY, see section **Metadata File Information**. **Measures' files** The measure's files must be organized as matrices: - The first column must contain Metabolite IDs that are unique (not repeated) within the file. - The rest of the columns correspond to the samples - The rows correspond to the metabolites - The values must be tab separated, with the first row containing the sample/column labels. See the following examples of measures files: Example - Metabolites **abundances**: =============== ================== ================== ================== ================== ================== ================== ID **MCF001089_TD01** **MCF001089_TD02** **MCF001089_TD03** **MCF001089_TD04** **MCF001089_TD05** **MCF001089_TD06** =============== ================== ================== ================== ================== ================== ================== 2_3-PG 8698823.9926 10718737.7217 10724373.9 8536484.5 22060650 28898956 2-OHGLu 36924336 424336 92060650 45165 84951950 965165051 Glc6P 2310 2142 2683 1683 012532068 1252172 Gly3P 399298 991656565 525195 6365231 89451625 4952651963 IsoCit 0 0 0 84915613 856236 954651610 =============== ================== ================== ================== ================== ================== ================== Example - mean **enrichment** or labeled fractional contributions: =============== ================== ================== ================== ================== ================== ================== ID **MCF001089_TD01** **MCF001089_TD02** **MCF001089_TD03** **MCF001089_TD04** **MCF001089_TD05** **MCF001089_TD06** =============== ================== ================== ================== ================== ================== ================== 2_3-PG 0.9711 0.968 0.9909 0.991 0.40 0.9 2-OHGLu 0.01719 0.0246 0.554 0.555 0.73 0.68 Glc6P 0.06 0.66 2683 0.06 2068 2172 Gly3P 0.06 0.06 0.06 1 5 3 IsoCit 0.06 1 0.49 0.36 6 10 =============== ================== ================== ================== ================== ================== ================== **Metadata File Information** Provide a tab-separated file that has the names of the samples in the first column and one header row. Column names must be exactly in this order: name_to_plot condition timepoint timenum compartment original_name Example **Metadata File**: ==================== =============== ============= ============ ================ ================= **name_to_plot** **condition** **timepoint** **timenum** **compartment** **original_name** -------------------- --------------- ------------- ------------ ---------------- ----------------- Control_cell_T0-1 Control T0 0 cell MCF001089_TD01 Control_cell_T0-2 Control T0 0 cell MCF001089_TD02 Control_cell_T0-3 Control T0 0 cell MCF001089_TD03 Tumoral_cell_T0-1 Tumoral T0 0 cell MCF001089_TD04 Tumoral_cell_T0-2 Tumoral T0 0 cell MCF001089_TD05 Tumoral_cell_T0-3 Tumoral T0 0 cell MCF001089_TD06 Tumoral_cell_T24-1 Tumoral T24 24 cell MCF001089_TD07 Tumoral_cell_T24-2 Tumoral T24 24 cell MCF001089_TD08 Tumoral_cell_T24-3 Tumoral T24 24 cell MCF001090_TD01 Control_med_T24-1 Control T24 24 med MCF001090_TD02 Control_med_T24-2 Control T24 24 med MCF001090_TD03 Tumoral_med_T24-1 Tumoral T24 24 med MCF001090_TD04 Tumoral_med_T24-2 Tumoral T24 24 med MCF001090_TD05 Control_med_T0-1 Control T0 0 med MCF001090_TD06 Tumoral_med_T0-1 Tumoral T0 0 med MCF001090_TD07 Tumoral_med_T0-2 Tumoral T0 0 med MCF001090_TD08 ==================== =============== ============= ============ ================ ================= The column **original_name** must have the names of the samples as given in your data. The column **name_to_plot** must have the names as you want them to be (or set identical to original_name if you prefer). To set names that are meaningful is a better choice, as we will take them to display the results. The column **timenum** must contain only the numeric part of the timepoint, for example 2,0, 10, 100 (this means, without letters ("T", "t", "s", "h" etc) nor any other symbol). Make sure these time numbers are in the same units (but do not write the units here!). The column **compartment** is an abbreviation, coined by you, for the compartments. This will be used for the results' files names: the longer the compartments names are, the longer the output files' names! Please pick short and clear abbreviations to fill this column. **Running the analysis** You can precise how you want your analysis to be executed, there exist hints on use that will guide you, next to the parameters. Our tool automatically processes the integrality of your data (global PCA plots), and also splits your data by timepoint to generate PCA plots by timepoint (which is convenient to explore the "grouping" of conditions), but if you only have one condition you can discard them. The output, for the global PCA, and for each timepoint PCA, consists of : - a scatter-plot of the first two Principal Components (PC), with labels corresponding to 'name_to_plot'. - the same scatter-plot as above but without labels. - a bar-plot of the percentage of explained variances. **Available data for testing** You can test our tool with the data from our manuscript https://zenodo.org/record/8378887 (the pertinent files for you are located in the subfolders inside the data folder). You can also use the minimal data examples from https://zenodo.org/record/8380706 ]]> </help> <expand macro="citations" /> </tool>