Skip to content
Merged
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: 0 additions & 1 deletion tools/ampvis2/.lint_skip

This file was deleted.

10 changes: 5 additions & 5 deletions tools/ampvis2/alpha_diversity.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="ampvis2_alpha_diversity" name="ampvis2 alpha diversity" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@" license="MIT">
<tool id="ampvis2_alpha_diversity" name="ampvis2 alpha diversity" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
<description></description>
<macros>
<import>macros.xml</import>
Expand Down Expand Up @@ -42,7 +42,7 @@
<inputs>
<expand macro="rds_input_macro"/>
<param argument="measure" type="select" multiple="true" optional="false" label="Alpha-diversity measure(s) to be included">
<option value="observed" selected="true">observed</option>
<option value="uniqueotus" selected="true">unique OTUs</option>
<option value="shannon" selected="true">shannon</option>
<option value="simpson" selected="true">simpson</option>
<option value="invsimpson" selected="true">invsimpson</option>
Expand Down Expand Up @@ -79,18 +79,18 @@
</test>
<test>
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
<param name="measure" value="observed,shannon"/>
<param name="measure" value="uniqueotus,shannon"/>
<param name="richness" value="true"/>
<param name="rarefy" value="500"/>
<param name="group_by" value="Plant"/>
<param name="plot_scatter" value="true"/>
<output name="alphadiv">
<assert_contents>
<has_line line="SampleID&#9;Plant&#9;Date&#9;Year&#9;Period&#9;RawReads&#9;Reads&#9;uniqueOTUs&#9;Shannon&#9;Simpson&#9;invSimpson&#9;Chao1&#9;ACE"/>
<has_line line="SampleID&#9;Plant&#9;Date&#9;Year&#9;Period&#9;RawReads&#9;Reads&#9;uniqueOTUs&#9;Shannon&#9;Chao1&#9;ACE"/>
<has_text text="16SAMP-536&#9;"/>
<has_text text="&#9;Aalborg West&#9;"/>
<has_n_lines n="68"/>
<has_n_columns n="13"/>
<has_n_columns n="11"/>
<has_text text="&#9;500&#9;"/>
</assert_contents>
</output>
Expand Down
4 changes: 3 additions & 1 deletion tools/ampvis2/boxplot.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@
<param name="metadata_list" value="AalborgWWTPs-metadata.list"/>
<param name="group_by" value="Plant"/>
<param name="sort_by" value="sum"/>
<param name="tax_show" value="5"/>
<conditional name="tax_show_cond">
<param name="tax_show" value="5"/>
</conditional>
<param name="plot_flip" value="true"/>
<param name="plot_log" value="true"/>
<param name="adjust_zero" value="100000"/>
Expand Down
2 changes: 1 addition & 1 deletion tools/ampvis2/export_otu.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="ampvis2_export_otu" name="ampvis2 export otu" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@" license="MIT">
<tool id="ampvis2_export_otu" name="ampvis2 export otu" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
<description></description>
<macros>
<import>macros.xml</import>
Expand Down
17 changes: 7 additions & 10 deletions tools/ampvis2/frequency.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
data <- readRDS("$data")
plot <- amp_frequency(
data,
## https://github.com/KasperSkytte/ampvis2/issues/167
## #if $group_by
## group_by = "$group_by",
## #end if
#if $group_by
group_by = "$group_by",
#end if
## tax_class = NULL,
tax_empty = "$tax_empty",
tax_aggregate = "$tax_aggregate",
Expand All @@ -30,8 +29,7 @@
</configfiles>
<inputs>
<expand macro="rds_metadata_input_macro"/>
<!-- https://github.com/KasperSkytte/ampvis2/issues/167
<expand macro="metadata_select_discrete" argument="group_by" label="Group the samples by "/> -->
<expand macro="metadata_select_discrete" argument="group_by" label="Group the samples by "/>
<expand macro="tax_empty_macro"/>
<expand macro="taxlevel_macro" argument="tax_aggregate" label="The taxonomic level to aggregate the OTUs">
<option value="OTU" selected="true">OTU/ASV</option>
Expand All @@ -50,13 +48,12 @@
<output name="plot" value="AalborgWWTPs-frequency.pdf" ftype="pdf" compare="sim_size"/>
</test>
<!-- group_by -->
<!-- https://github.com/KasperSkytte/ampvis2/issues/167
<test expect_num_outputs="1">
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
<param name="metadata_list" value="AalborgWWTPs-metadata.list"/>
<param name="group_by" value="Plant"/>
<output name="plot" value="AalborgWWTPs-frequency-group_by.pdf" ftype="pdf"/>
</test> -->
<param name="group_by" value="Period"/>
<output name="plot" value="AalborgWWTPs-frequency-group_by.pdf" ftype="pdf" compare="sim_size"/>
</test>
</tests>
<help><![CDATA[
What it does
Expand Down
93 changes: 70 additions & 23 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@+galaxy1" profile="@PROFILE@" license="MIT">
<tool id="ampvis2_heatmap" name="ampvis2 heatmap" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
<description></description>
<macros>
<import>macros.xml</import>
Expand Down Expand Up @@ -37,9 +37,13 @@
showRemainingTaxa = $showRemainingTaxa,
## tax_class = NULL,
tax_empty = "$tax_empty",
## TODO giving the order of the columns is difficult but "cluster" would be nice I guess
## order_x_by = NULL,
## order_y_by = NULL,
## TODO giving the order of the columns is difficult, currently only "cluster"
#if $order_x_by
order_x_by = "$order_x_by",
#end if
#if $order_y_by
order_y_by = "$order_y_by",
#end if
plot_values = $plot_values_cond.plot_values,
#if $plot_values_cond.plot_values == "TRUE"
plot_values_size = $plot_values_cond.plot_values_size,
Expand All @@ -57,8 +61,10 @@
#if $sort_by_cond.sort_by_sel != 'no'
sort_by = "$sort_by_cond.sort_by",
#end if
#if $normalise_by
normalise_by = "$normalise_by",
#if $normalise_by_cond.normalise_by_sel == "no"
normalise_by = NULL,
#else
normalise_by = "$normalise_by_cond.normalise_by",
#end if
#if $scale_by
scale_by = "$scale_by",
Expand Down Expand Up @@ -92,13 +98,43 @@
<expand macro="metadata_select_discrete" argument="group_by" label="Group samples" help="By a categorical variable in the metadata"/>
<expand macro="metadata_select_discrete" argument="facet_by" label="Facet the samples" help="By a categorical variable in the metadata."/>
<expand macro="normalise_macro" checked="true"/>
<conditional name="normalise_by_cond">
<param name="normalise_by_sel" type="select">
<option value="no">No</option>
<option value="variable">Metadata variable</option>
<option value="sample">Specific sample</option>
</param>
<when value="no"/>
<when value="variable">
<param argument="normalise_by" type="select" optional="false" label="Metadata value" help="In order to select values a metadata list needs to be selected first. And group_by needs to be selected">
<options from_dataset="metadata_list">
<column name="name" index="1"/>
<column name="value" index="1"/>
<filter type="param_value" column="0" ref="group_by"/>
<filter type="unique_value" column="1"/>
</options>
</param>
</when>
<when value="sample">
<param argument="normalise_by" type="select" optional="false">
<options from_dataset="metadata_list">
<column name="name" index="1"/>
<column name="value" index="1"/>
<filter type="static_value" value="TRUE" column="2"/>
<filter type="unique_value" column="1"/>
</options>
</param>
</when>
</conditional>
<expand macro="taxlevel_macro" argument="tax_aggregate" label="The taxonomic level to aggregate the OTUs">
<option value="Phylum" selected="true">Phylum</option>
</expand>
<expand macro="taxlevel_macro" argument="tax_add" multiple="true" optional="true" label="Additional taxonomic level(s) to display"/>
<expand macro="tax_show_macro" value="10"/>
<param argument="showRemainingTaxa" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Display sum of remaining taxa" help="Add an additional row at the bottom displaying the sum of all remaining taxa that are not part of the top tax_show most abundant taxa."/>
<expand macro="tax_empty_macro"/>
<param argument="order_x_by" type="boolean" truevalue="cluster" falsevalue="" checked="false" label="hierarchical clustering of X axis"/>
<param argument="order_y_by" type="boolean" truevalue="cluster" falsevalue="" checked="false" label="hierarchical clustering of Y axis"/>
<conditional name="plot_values_cond">
<param argument="plot_values" type="select" label="Plot the values on the heatmap">
<option value="TRUE">Yes</option>
Expand Down Expand Up @@ -152,9 +188,6 @@
</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 macro="metadata_select_discrete" argument="scale_by" label="Scale the abundances by a variable in the metadata"/>

<conditional name="plot_functions_cond">
Expand Down Expand Up @@ -218,9 +251,19 @@
<param name="metadata_list" value="AalborgWWTPs-metadata.list"/>
<param name="group_by" value="Plant"/>
<param name="facet_by" value="Year"/>
<param name="out_format" value="tabular"/>
<section name="output_options">
<param name="out_format" value="tabular"/>
</section>
<output name="plot_raw" value="AalborgWWTPs-heatmap-group-facet.tsv" ftype="tabular"/>
</test>
<!-- order_*_by: cluster -->
<test expect_num_outputs="1">
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
<param name="order_x_by" value="true"/>
<param name="order_y_by" value="true"/>
<output name="plot" value="AalborgWWTPs-heatmap-order-by-cluster.pdf" ftype="pdf" compare="sim_size"/>
</test>

<!-- normalise -->
<test expect_num_outputs="1">
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
Expand All @@ -230,29 +273,33 @@
<!-- normalise by a specific sample -->
<test expect_num_outputs="1">
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
<param name="metadata_list" value="AalborgWWTPs-metadata.list"/>
<param name="normalise" value="true"/>
<param name="normalise_by" value="16SAMP-747"/>
<param name="metadata_list" value="AalborgWWTPs-metadata.list"/>
<conditional name="normalise_by_cond">
<param name="normalise_by_sel" value="sample"/>
<param name="normalise_by" value="16SAMP-747"/>
</conditional>
<output name="plot" value="AalborgWWTPs-heatmap-normalise_by_sample.pdf" ftype="pdf" compare="sim_size"/>
</test>
<!-- normalise by a metadata variable
https://github.com/KasperSkytte/ampvis2/issues/168 -->
<!-- <test expect_num_outputs="1">
<!-- normalise by a metadata variable -->
<test expect_num_outputs="1">
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
<param name="metadata_list" value="AalborgWWTPs-metadata.list"/>
<param name="group_by" value="Plant"/>
<conditional name="normalise_by_cond">
<param name="normalise_by_sel" value="variable"/>
<param name="normalise_by" value="Plant"/>
<param name="normalise_by" value="Aalborg West"/>
</conditional>
<output name="plot" value="AalborgWWTPs-heatmap-normalise_by_variable.pdf" ftype="pdf"/>
</test> -->
</test>
<!-- tax options -->
<test expect_num_outputs="1">
<param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
<param name="tax_aggregate" value="Order"/>
<param name="tax_add" value="Class"/>
<param name="tax_show" value="5"/>
<conditional name="tax_show_cond">
<param name="tax_show_sel" value="number"/>
<param name="tax_show" value="5"/>
</conditional>
<param name="showRemainingTaxa" value="true"/>
<output name="plot" value="AalborgWWTPs-heatmap-tax.pdf" ftype="pdf" compare="sim_size"/>
</test>
Expand Down Expand Up @@ -299,14 +346,14 @@
<!-- 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"/>
<param name="color_palette_start" value="#ff0000"/>
<param name="color_palette_end" value="#ffff00"/>
<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"/>
<param name="color_palette_start" value="#0000ff"/>
<param name="color_palette_end" value="#00ff00"/>
<output name="plot" value="AalborgWWTPs-heatmap-blue-green.pdf" ftype="pdf" compare="sim_size"/>
</test>

Expand Down
Loading
Loading