Skip to content

Commit

Permalink
help and description updated
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinaGomoryova committed Jan 31, 2025
1 parent 8a86c51 commit 2f67dbb
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 7 deletions.
48 changes: 45 additions & 3 deletions tools/boxplot/help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,55 @@
<token name="@GENERAL_HELP@">
recetox-boxplot help
=====================
recetox-boxplot tool can be used to plot boxplots for the tabular data. On the input, a dataframe containing only columns to be plotted (i.e. we recommend to pre-filter the table for only numerical column with eventually first column holding the rownames) is expected.

Typically, rows are features, columns are samples - if one wishes to plot the boxplots for the features, we recommend to transpose the table beforehand.
Overview
--------

It is possible to use also different variable for the plotting - in that case, a metadata table can be supplied. The metadata table must contain a column which will map to the data table (e.g. SampleName).
recetox-boxplot tool can be used to plot boxplots for the tabular data. On the input, a dataframe in tabular/csv/parquet format, containing only columns to be plotted (the pre-filtering can be achieved e.g. using the `Cut` Galaxy tool) is expected. If the data contains as the first column the rownames - meaning identificators, ProteinID, etc., please do set the `Does the first column of input table contain rownames?` to TRUE.

Typically, a table where rows are features and columns are samples is expected - if one wishes to plot the boxplots for the features, we recommend to transpose the table beforehand.

Sometimes, it is better to transform the data for the visualization (or processing) purposes (`Should the quantitative variable be transformed?`). If no transformation option is selected, the data will be plotted as it is. Otherwise, one can choose from replacing all zero values by NA, log2 transformation or log10 transformation. Please note, that NA values are omitted while plotting.

`Plot the boxplots horizontally?` option means flipping the axes: a categorical variable (e.g. samples) would be on y-axis, whereas quantitative variable (e.g. intensity) would be on x-axis. This improves the legibility in case of larger datasets.

It is possible to use also a different variable for the plotting and coloring - in that case, a metadata table (in a tabular format) can be supplied. The metadata table must contain a column which will map to the data table column names (e.g. SampleName).

It is also possible to use faceting, meaning splitting the plot based on multiple variables. One can then choose which variable to split the x axis and y axis on.

Example data table
-------------------

+----------------------+-------------------+-----------------------+--------------------+
| RowID | sample1 | sample2 | sample3 |
+======================+===================+=======================+====================+
| 1 | 350.58 | 211.33 | 288.90 |
+----------------------+-------------------+-----------------------+--------------------+
| 2 | 130.17 | 287.54 | 100.11 |
+----------------------+-------------------+-----------------------+--------------------+
| 3 | 134.80 | 683.15 | 112.34 |
+----------------------+-------------------+-----------------------+--------------------+
| 4 | 183.99 | 920.57 | 590.44 |
+----------------------+-------------------+-----------------------+--------------------+
| ... | ... | ... | ... |
+----------------------+-------------------+-----------------------+--------------------+


Example metadata table
-----------------------

+----------------------+-------------------+-----------------------+--------------------+
| SampleName | replicate | condition | batch |
+======================+===================+=======================+====================+
| sample1 | 1 | control | A |
+----------------------+-------------------+-----------------------+--------------------+
| sample2 | 1 | treatment | A |
+----------------------+-------------------+-----------------------+--------------------+
| sample3 | 2 | treatment | A |
+----------------------+-------------------+-----------------------+--------------------+




</token>
</macros>
8 changes: 4 additions & 4 deletions tools/boxplot/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
</xml>

<xml name="boxplot_param">
<param name="input_data" type="data" format="csv,tsv,txt,tabular,parquet" label="Input table" help= "Input file in a tabular format"/>
<param name="has_rownames" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Does the first column of input table contain rownames?" help="Whether the first column of the input data table identifies the rownames."/>
<param name="input_data" type="data" format="csv,tsv,txt,tabular,parquet" label="Input table" help= "Input file in a tabular/tsv/csv/parquet format"/>
<param name="has_rownames" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Does the first column of input table contain rownames?" help="Whether the first column of the input data table identifies the rownames (e.g. proteinID) - i.e. it is not a part of data matrix to be plotted."/>
<param name="transform_data" type="select" display="radio" label="Should the quantitative variable be transformed?" optional="false" help="Whether to transform the quantitative variable (e.g. intensity, counts, etc.)">
<option value="none" selected="true">No transformation</option>
<option value="replace_zero">Replace zeroes with NA values</option>
Expand All @@ -39,14 +39,14 @@
</param>
<param name="flip_axes" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Plot the boxplots horizontally? (flip the axes)" help="Whether to flip the axes, so the boxplots will be horizontal instead of vertical."/>
<conditional name="grouping_boxplot">
<param type="select" name="use_grouping" label="Plot boxplot based on column from the metadata table?" help="Whether to base the boxplot on a different variable than column names from the input table.">
<param type="select" name="use_grouping" label="Plot boxplot based on a column from the metadata table?" help="Whether to base the boxplot on a different variable than column names (usually corresponding to the samples) from the input table.">
<option value="no" selected="true">no</option>
<option value="yes">yes</option>
</param>
<when value="yes">
<param name="input_metadata" type="data" format="tabular" label="Input metadata table" help= "Input metadata file in a tabular format"/>
<param name="sampleID" type="data_column" data_ref="input_metadata" use_header_names="true" label="Sample identification column in metadata table" help="Column containing sample names - it should correspond to the colNames in the data table."/>
<param name="groupingCol" type="data_column" data_ref="input_metadata" use_header_names="true" label="Plotting column" help="Which column from the metadata table should be plotted on x axis?"/>
<param name="groupingCol" type="data_column" data_ref="input_metadata" use_header_names="true" label="Which variable column to plot on the x-axis?" help="Which column from the metadata table should be plotted on x axis?"/>
<param name="colorCol" type="data_column" data_ref="input_metadata" use_header_names="true" label="Color the boxplot based on a variable?" help="Which column from the metadata table should be used for coloring?" optional = "true"/>
<param name="facet_x" type="data_column" data_ref="input_metadata" use_header_names="true" label="Column to use as facet on x-axis" optional="true" help="If using faceting, which column should be plotted on x-axis? Default 'Nothing selected' means no faceting will be done on x-axis."/>
<param name="facet_y" type="data_column" data_ref="input_metadata" use_header_names="true" label="Column to use as facet on y-axis" optional="true" help="If using faceting, which column should be plotted on y-axis? Default 'Nothing selected' means no faceting will be done on y-axis."/>
Expand Down

0 comments on commit 2f67dbb

Please sign in to comment.