Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
GALAXY_BRANCH: release_24.2
MAX_CHUNKS: 4
MAX_FILE_SIZE: 1M
FAIL_LEVEL: warn
concurrency:
# Group runs by PR, but keep runs on the default branch separate
# because we do not want to cancel ToolShed uploads
Expand Down
9 changes: 0 additions & 9 deletions tools/recetox_boxplot/.shed.yml

This file was deleted.

66 changes: 0 additions & 66 deletions tools/recetox_boxplot/macros.xml

This file was deleted.

16 changes: 16 additions & 0 deletions tools/recetox_plots/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: recetox_plots
owner: recetox
remote_repository_url: "https://github.com/RECETOX/galaxytools/tree/master/tools"
homepage_url: "https://github.com/RECETOX/galaxytools"
categories:
- Visualization
description: "recetox_plots is a suite comprising various plotting tools."
long_description: "recetox_plots comprises different visualization tools including boxplot, barplot and upset plot. For the input, any tabular, csv or parquet file is supported."
type: unrestricted
auto_tool_repositories:
name_template: "{{ tool_id }}"
description_template: "{{ tool_name }} tool from the recetox_plots"
suite:
name: suite_recetox_plots
description: Visualization tools developed at RECETOX.
type: repository_suite_definition
46 changes: 45 additions & 1 deletion tools/recetox_boxplot/help.xml → tools/recetox_plots/help.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>

<token name="@GENERAL_HELP@">
<token name="@BOXPLOT_HELP@">
recetox-boxplot help
=====================

Expand Down Expand Up @@ -50,4 +50,48 @@ Example metadata table
| sample3 | 2 | treatment | A |
+----------------------+-------------------+-----------------------+--------------------+
</token>

<token name="@BARPLOT_HELP@">
recetox-barplot help
=====================

Overview
--------

recetox-barplot allows creating barplots from tabular/csv/parquet data. On the input, data in a long format are expected, meaning that each column represents a variable, each row represents an observation as shown below.

User has to define which column holds the quantitative information (e.g. counts for particular category) and which column contains the categories to be plotted. It is also possible to use another variable to color the bars. Finally, `Use position dodge?` parameter defines whether the bars will be stacked above each other (default behavior when set to FALSE) or will be placed side-by-side (when set to TRUE). If no color column is supplied, setting this parameter will have no effect on the resulting barplots.

Example barplot input
----------------------

+----------------------+-------------------+-----------------------+--------------------+
| SampleName | replicate | condition | Value |
+======================+===================+=======================+====================+
| sample1 | 1 | control | 20 |
+----------------------+-------------------+-----------------------+--------------------+
| sample2 | 1 | treatment | 40 |
+----------------------+-------------------+-----------------------+--------------------+
| sample3 | 2 | treatment | 10 |
+----------------------+-------------------+-----------------------+--------------------+
| ... | ... | ... | ... |
+----------------------+-------------------+-----------------------+--------------------+

</token>

<token name="@UPSETPLOT_HELP@">
recetox-upsetplot help
======================

Overview
--------

recetox-upsetplot tool allows to create UpSet plots. UpSet plots similarly as Venn diagrams can be used to visualize intersections of sets. They are in particular advantageous when plotting more than 3 sets, where Venn diagram become very complicated. UpSet plot is composed of 3 main parts: on the left, there are sets (our samples, conditions, ...) and their respective size. In the central part, there are intersections visualized - position of the black dot represent which sets belong to the particular intersection. On the top, there is barplot, visualizing the size of the particular intersections. More information can be found in the [documentation](https://github.com/hms-dbmi/UpSetR).

On the input, a dataframe in csv/tabular/parquet format is expected, where the columns correspond to sets to be plotted (i.e. intersections between columns will be done). If user does not supply the binary matrix, all non-zero values will be by default converted to 1.

There are several options which can be adjusted. The bars can be sorted either by frequency (order by the size, most frequent first) or degree (order by the number of sets involved, e.g. 3 intersections, then 2 intersection combinations, ...). `Empty intersections` argument specifies whether to plot also intersections which have zero elements, which are by default hidden. `Number of intersects` argument allows to limit the number of intersections which will be displayed - default 0 value resuls in showing all intersections. Finally, `Group by sets?` option allows ordering intersections in the plot according to the original sets, whereas by default the grouping is done by the number of sets in the intersection.

</token>

</macros>
106 changes: 106 additions & 0 deletions tools/recetox_plots/macros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<macros>
<token name="@TOOL_VERSION@">3.5.1</token>
<xml name="creator">
<creator>
<person
givenName="Kristina"
familyName="Gomoryova"
url="https://github.com/KristinaGomoryova"
identifier="0000-0003-4407-3917" />
<person
givenName="Helge"
familyName="Hecht"
url="https://github.com/hechth"
identifier="0000-0001-6744-996X" />
<organization
url="https://www.recetox.muni.cz/"
email="GalaxyToolsDevelopmentandDeployment@space.muni.cz"
name="RECETOX MUNI" />
</creator>
</xml>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">r-ggplot2</requirement>
<requirement type="package" version="1.3.1">r-tidyr</requirement>
<requirement type="package" version="19.0.0">r-arrow</requirement>
<requirement type="package" version="1.1.5">r-rlang</requirement>
</requirements>
</xml>

<xml name="data_input">
<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"/>
</xml>

<xml name="axes_labels">
<param name="xlab" type="text" label="Label for the x axis" optional="true"/>
<param name="ylab" type="text" label="Label for the y axis" optional="true"/>
</xml>

<xml name="boxplot_param">
<expand macro="data_input"/>
<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>
<option value="log2">Log2 transformation</option>
<option value="log10">Log10 transformation</option>
</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 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="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."/>
</when>
<when value="no"/>
</conditional>
<expand macro="axes_labels"/>
<expand macro="export_data"/>
</xml>

<xml name="upsetplot_param">
<expand macro="data_input"/>
<param type="select" name="sort_by" display="radio" label="Sort the bars based on frequency, degree or both?" help="Whether to sort the bars in UpSet plot based on frequency (largest frequency first), or degree (largest overlap first)">
<option value="freq" selected="true">frequency</option>
<option value="degree">degree</option>
</param>
<param label="Number of intersections to plot" optional="true" name="nintersects" type="integer" value="0" help="Number of intersections to plot. If value set to 0, all intersections will be plotted."/>
<param name="group_by_sets" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Group bars by sets?" help="Whether group bars for each set (based on their set size)."/>
<param name="empty_intersections" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Include empty intersections?" help="Whether to plot also empty intersections to the limit of number of intersections. Otherwise, empty intersections are by default omitted."/>
<expand macro="export_data"/>
</xml>

<xml name="barplot_param">
<param name="input_data" type="data" format="csv,tsv,txt,tabular,parquet" label="Input table in a long format" help= "Input file in a tabular/tsv/csv/parquet format"/>
<param name="quant_col" type="data_column" data_ref="input_data" use_header_names="true" label="Which column contains the quantitative information?" help="Select the column containing quantitative information."/>
<param name="grouping_col" type="data_column" data_ref="input_data" use_header_names="true" label="Which column contains the categories?" help="Select the column which contains the categories."/>
<param name="color_col" type="data_column" data_ref="input_data" use_header_names="true" optional="true" label="Which column to color according to?" help="Select the column which contains levels for color."/>
<param name="position" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Use position dodge?" help="If a column for color is specified, should be the categories placed side-by-side or stacked (default)?"/>
<expand macro="axes_labels"/>
<expand macro="export_data"/>
</xml>

<xml name="export_data">
<param name="export_R_script" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Export the R script to reproduce the analysis"
help="Check this box to export the script executed in the Galaxy tool as an R file to be able to reproduce the same processing offline. Not that in this case, the file paths need to be altered and all the dependencies have to be managed manually."/>
</xml>

<xml name="citations">
<citations>
<citation type="doi">https://doi.org/10.1007/978-0-387-98141-3</citation>
</citations>
</xml>

<xml name="citations_upset">
<citations>
<citation type="doi">https://doi.org/10.1093/bioinformatics/btx364</citation>
</citations>
</xml>
</macros>
Loading
Loading