Skip to content

Commit

Permalink
Merge pull request #6130 from MaraBesemer/main
Browse files Browse the repository at this point in the history
add color palette to ampvis2 heatmap
  • Loading branch information
bgruening authored Nov 16, 2024
2 parents 64c7062 + 0807ba5 commit 94142a1
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions tools/ampvis2/heatmap.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="ampvis2_heatmap" name="ampvis2 heatmap" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
<tool id="ampvis2_heatmap" name="ampvis2 heatmap" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@" license="MIT">
<description></description>
<macros>
<import>macros.xml</import>
Expand Down Expand Up @@ -63,7 +63,7 @@
#if $scale_by
scale_by = "$scale_by",
#end if
## color_vector = NULL
color_vector = c("$color_palette_start", "$color_palette_end"),
## round = 1,
#if $output_options.out_format == "tabular"
textmap = TRUE,
Expand Down Expand Up @@ -150,6 +150,8 @@
</param>
</when>
</conditional>
<param argument="color_palette_start" type="color" label="Start color for the heatmap" help="Choose the start color for the heatmap."/>
<param argument="color_palette_end" type="color" label="End color for the heatmap" help="Choose the end color for the heatmap."/>
<!-- https://github.com/KasperSkytte/ampvis2/issues/168
if this is possible again reuse: metadata_sample_or_variable_select ? -->
<expand macro="metadata_sample_select" argument="normalise_by" label="Normalize counts by a variable or a specific sample"/>
Expand Down Expand Up @@ -294,6 +296,19 @@
</conditional>
<output name="plot" value="AalborgWWTPs-heatmap-plot_foo_file.pdf" ftype="pdf" compare="sim_size"/>
</test>
<!-- test with different color palettes -->
<test expect_num_outputs="1">
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
<param name="color_palette_start" value="red"/>
<param name="color_palette_end" value="yellow"/>
<output name="plot" value="AalborgWWTPs-heatmap-red-yellow.pdf" ftype="pdf" compare="sim_size"/>
</test>
<test expect_num_outputs="1">
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
<param name="color_palette_start" value="blue"/>
<param name="color_palette_end" value="green"/>
<output name="plot" value="AalborgWWTPs-heatmap-blue-green.pdf" ftype="pdf" compare="sim_size"/>
</test>

</tests>
<help><![CDATA[
Expand Down Expand Up @@ -330,4 +345,4 @@ Heatmap in the chosen output format.
If table output is chosen the data presented in the heatmap is written into a tabular dataset.
]]></help>
<expand macro="citations"/>
</tool>
</tool>

0 comments on commit 94142a1

Please # to comment.