annotate macros.xml @ 0:293a939f28c8 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
author iuc
date Wed, 14 May 2025 08:39:42 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
1 <macros>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
2 <token name="@TOOL_VERSION@">0.13.2</token>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
3 <token name="@VERSION_SUFFIX@">0</token>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
4
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
5 <xml name="edam">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
6 <edam_topics>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
7 <edam_topic>topic_0092</edam_topic>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
8 </edam_topics>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
9 <edam_operations>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
10 <edam_operation>operation_0337</edam_operation>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
11 </edam_operations>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
12 </xml>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
13
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
14 <xml name="requirements">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
15 <requirements>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
16 <requirement type="package" version="@TOOL_VERSION@">seaborn</requirement>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
17 <yield/>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
18 </requirements>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
19 </xml>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
20
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
21 <xml name="inputs">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
22 <param argument="--input_data" type="data" format="tsv,tabular,csv,parquet" label="Input data table" help="Provide the input data file in one of the supported formats: TSV, TXT, CSV, or Parquet. This file will be used to generate the plot." />
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
23 </xml>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
24
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
25 <xml name="transformation">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
26 <param name="transformation" type="select" label="Transformation" help="Choose a transformation function to apply to the numerical data in the input file. This can be useful for scaling or normalizing the data before plotting.">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
27 <option value="lambda x: x" selected="true">no transformation</option>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
28 <option value="np.log10">log10</option>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
29 <option value="np.log2">log2</option>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
30 </param>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
31 </xml>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
32
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
33 <xml name="columns" tokens="header">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
34 <param name="xcol" type="data_column" data_ref="input_data" label="x-axis" optional="true" use_header_names="@HEADER@" help="Select the column from the input data to use for the x-axis of the plot."/>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
35 <param name="ycol" type="data_column" data_ref="input_data" label="y-axis" optional="true" use_header_names="@HEADER@" help="Select the column from the input data to use for the y-axis of the plot."/>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
36 <section name="advanced_input" title="Advanced">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
37 <param name="hue" type="data_column" data_ref="input_data" label="hue" optional="true" use_header_names="@HEADER@" help="Select a column to group data by color (hue) in the plot. This is useful for visualizing categorical data."/>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
38 <param name="col" type="data_column" data_ref="input_data" label="column-facetting" optional="true" use_header_names="@HEADER@" help="Select a column to create facets (subplots) along the columns of the plot grid. This is useful for visualizing how data varies across different categories or groups in the selected column."/>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
39 <param name="row" type="data_column" data_ref="input_data" label="row-facetting" optional="true" use_header_names="@HEADER@" help="Select a column to create facets (subplots) along the rows of the plot grid. This allows you to compare data across different categories or groups in the selected column."/>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
40 </section>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
41 </xml>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
42
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
43 <token name="@INIT@">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
44 import pandas as pd
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
45 import seaborn as sns
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
46 import numpy as np
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
47 import matplotlib.pyplot as plt
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
48
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
49 file_name = "$input_data"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
50 file_extension = "$input_data.ext"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
51
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
52 transformation = $transformation
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
53 output_format = "png"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
54 output_file = "${output_file}"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
55
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
56 # load and transform data
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
57 if file_extension == "csv":
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
58 df = pd.read_csv(file_name, index_col=index_col)
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
59 elif file_extension in ["tsv", "tabular"]:
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
60 df = pd.read_csv(file_name, sep="\t", index_col=index_col)
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
61 elif file_extension == "parquet":
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
62 df = pd.read_parquet(file_name, index_col=index_col)
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
63 else:
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
64 raise ValueError(f"Unsupported file format: {file_extension}")
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
65 data = df.apply(lambda x: transformation(x) if np.issubdtype(x.dtype, np.number) else x)
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
66 </token>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
67
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
68 <xml name="creator">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
69 <creator>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
70 <person
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
71 givenName="Helge"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
72 familyName="Hecht"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
73 url="https://github.com/hechth"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
74 identifier="0000-0001-6744-996X" />
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
75 <organization
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
76 url="https://www.recetox.muni.cz/"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
77 email="GalaxyToolsDevelopmentandDeployment@space.muni.cz"
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
78 name="RECETOX MUNI" />
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
79 </creator>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
80 </xml>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
81
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
82 <xml name="citation">
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
83 <citations>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
84 <citation type="doi">10.21105/joss.03021</citation>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
85 </citations>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
86 </xml>
293a939f28c8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seaborn commit 24dc6373560bd5e409fca84154634f5a528001c3
iuc
parents:
diff changeset
87 </macros>