Mercurial > repos > q2d2 > qiime2__boots__core_metrics
changeset 0:75593c55ca60 draft default tip
planemo upload for repository https://github.com/qiime2/galaxy-tools/tree/main/tools/suite_qiime2__boots commit 64ed09f1f1c680ad8373d261bd6be43a4f8a8d5b
| author | q2d2 |
|---|---|
| date | Sat, 01 Nov 2025 17:07:18 +0000 |
| parents | |
| children | |
| files | qiime2__boots__core_metrics.xml test-data/alpha.test0.table.qza test-data/alpha.test1.table.qza test-data/beta_collection.test0.table.qza test-data/beta_collection.test1.table.qza test-data/core_metrics.test0.metadata.tsv test-data/core_metrics.test0.table.qza test-data/core_metrics.test1.metadata.tsv test-data/core_metrics.test1.table.qza test-data/kmer_diversity.test0.metadata.tsv test-data/kmer_diversity.test0.sequences.qza test-data/kmer_diversity.test0.table.qza test-data/resample.test0.table.qza test-data/resample.test1.table.qza |
| diffstat | 14 files changed, 290 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qiime2__boots__core_metrics.xml Sat Nov 01 17:07:18 2025 +0000 @@ -0,0 +1,272 @@ +<?xml version='1.0' encoding='utf-8'?> +<!-- +Copyright (c) 2025, QIIME 2 development team. + +Distributed under the terms of the Modified BSD License. (SPDX: BSD-3-Clause) +--> +<!-- +This tool was automatically generated by: + q2galaxy (version: 2025.10.0) +for: + qiime2 (version: 2025.10.0) +--> +<tool name="qiime2 boots core-metrics" id="qiime2__boots__core_metrics" version="2025.10.0+q2galaxy.2025.10.0" profile="22.05" license="BSD-3-Clause"> + <description>Perform resampled "core metrics" analysis.</description> + <xrefs> + <xref type="bio.tools">qiime2</xref> + </xrefs> + <requirements> + <container type="docker">quay.io/qiime2/amplicon:2025.10</container> + </requirements> + <version_command>q2galaxy version boots</version_command> + <command detect_errors="exit_code">q2galaxy run boots core_metrics '$inputs'</command> + <configfiles> + <inputs name="inputs" data_style="staging_path_and_source_path"/> + </configfiles> + <inputs> + <param name="table" type="data" format="qza" label="table: FeatureTable[Frequency | RelativeFrequency | PresenceAbsence]" help="[required] The input feature table."> + <options options_filter_attribute="metadata.semantic_type"> + <filter type="add_value" value="FeatureTable[RelativeFrequency]"/> + <filter type="add_value" value="FeatureTable[Frequency]"/> + <filter type="add_value" value="FeatureTable[PresenceAbsence]"/> + </options> + <validator type="expression" message="Incompatible type">hasattr(value.metadata, "semantic_type") and value.metadata.semantic_type in ['FeatureTable[Frequency]', 'FeatureTable[PresenceAbsence]', 'FeatureTable[RelativeFrequency]']</validator> + </param> + <param name="sampling_depth" type="integer" min="1" value="" label="sampling_depth: Int % Range(1, None)" help="[required] The total number of observations that each sample in `table` should be resampled to. Samples where the total number of observations in `table` is less than `sampling_depth` will be not be included in the output tables."/> + <repeat name="metadata" min="1" help="[required] The sample metadata used in generating Emperor plots." title="metadata: Metadata"> + <conditional name="__q2galaxy__GUI__conditional__metadata__"> + <param name="type" type="select" label="metadata: Metadata"> + <option value="tsv" selected="true">Metadata from TSV</option> + <option value="qza">Metadata from Artifact</option> + </param> + <when value="tsv"> + <param name="source" type="data" format="tabular,qiime2.tabular" label="Metadata Source"/> + </when> + <when value="qza"> + <param name="source" type="data" format="qza" label="Metadata Source"/> + </when> + </conditional> + </repeat> + <param name="n" type="integer" min="1" value="" label="n: Int % Range(1, None)" help="[required] The number of resampled tables that should be generated."/> + <param name="replacement" type="select" label="replacement: Bool" help="[required] Resample `table` with replacement (i.e., bootstrap) or without replacement (i.e., rarefaction)." display="radio"> + <option value="__q2galaxy__::literal::None">Selection required</option> + <option value="__q2galaxy__::literal::True">Yes</option> + <option value="__q2galaxy__::literal::False">No</option> + <validator type="expression" message="Please verify this parameter.">value != '__q2galaxy__::literal::None'</validator> + </param> + <section name="__q2galaxy__GUI__section__extra_opts__" title="Click here for additional options"> + <param name="phylogeny" type="data" format="qza" optional="true" label="phylogeny: Phylogeny[Rooted]" help="[optional] The phylogenetic tree to use in phylogenetic diversity calculations. All feature ids in `table` must be present in this tree, but this tree can contain feature ids that are not present in `table`."> + <options options_filter_attribute="metadata.semantic_type"> + <filter type="add_value" value="Phylogeny[Rooted]"/> + </options> + <validator type="expression" message="Incompatible type">hasattr(value.metadata, "semantic_type") and value.metadata.semantic_type in ['Phylogeny[Rooted]']</validator> + </param> + <param name="alpha_average_method" type="select" label="alpha_average_method: Str % Choices('mean', 'median')" display="radio"> + <option value="mean">mean</option> + <option value="median" selected="true">median</option> + </param> + <param name="beta_average_method" type="select" label="beta_average_method: Str % Choices('non-metric-mean', 'non-metric-median', 'medoid')" display="radio"> + <option value="non-metric-mean">non-metric-mean</option> + <option value="non-metric-median" selected="true">non-metric-median</option> + <option value="medoid">medoid</option> + </param> + <param name="pc_dimensions" type="integer" value="3" label="pc_dimensions: Int" help="[default: 3] Number of principal coordinate dimensions to present in the 2D scatterplot."/> + <conditional name="__q2galaxy__GUI__conditional__color_by__" label="color_by: Str"> + <param name="__q2galaxy__GUI__select__" type="select" label="color_by: Str" help="[optional] Categorical measure from the input Metadata that should be used for color-coding the 2D scatterplot."> + <option value="__q2galaxy__::control::default" selected="true">None (Use default behavior)</option> + <option value="__q2galaxy__::control::provide">Provide a value</option> + </param> + <when value="__q2galaxy__::control::default"> + <param name="color_by" type="hidden" value="__q2galaxy__::literal::None"/> + </when> + <when value="__q2galaxy__::control::provide"> + <param name="color_by" type="text"> + <sanitizer> + <valid initial="string.printable"/> + </sanitizer> + </param> + </when> + </conditional> + </section> + </inputs> + <outputs> + <collection name="resampled_tables" type="list"> + <discover_datasets directory="resampled_tables" pattern="__name_and_ext__"/> + </collection> + <collection name="alpha_diversities" type="list"> + <discover_datasets directory="alpha_diversities" pattern="__name_and_ext__"/> + </collection> + <collection name="distance_matrices" type="list"> + <discover_datasets directory="distance_matrices" pattern="__name_and_ext__"/> + </collection> + <collection name="pcoas" type="list"> + <discover_datasets directory="pcoas" pattern="__name_and_ext__"/> + </collection> + <collection name="emperor_plots" type="list"> + <discover_datasets directory="emperor_plots" pattern="__name_and_ext__"/> + </collection> + <data name="scatter_plot" format="qzv" label="${tool.name} on ${on_string}: scatter_plot.qzv" from_work_dir="scatter_plot.qzv"/> + </outputs> + <tests> + <test> + <param name="table" value="core_metrics.test0.table.qza" ftype="qza"/> + <param name="sampling_depth" value="20"/> + <repeat name="metadata"> + <conditional name="__q2galaxy__GUI__conditional__metadata__"> + <param name="type" value="tsv"/> + <param name="source" value="core_metrics.test0.metadata.tsv" ftype="qiime2.tabular"/> + </conditional> + </repeat> + <param name="n" value="10"/> + <param name="replacement" value="__q2galaxy__::literal::True"/> + <param name="alpha_average_method" value="median"/> + <param name="beta_average_method" value="medoid"/> + <output_collection name="resampled_tables" type="list"/> + <output_collection name="alpha_diversities" type="list"/> + <output_collection name="distance_matrices" type="list"/> + <output_collection name="pcoas" type="list"/> + <output_collection name="emperor_plots" type="list"/> + <output name="scatter_plot" ftype="qzv"/> + </test> + <test> + <param name="table" value="core_metrics.test1.table.qza" ftype="qza"/> + <param name="sampling_depth" value="20"/> + <repeat name="metadata"> + <conditional name="__q2galaxy__GUI__conditional__metadata__"> + <param name="type" value="tsv"/> + <param name="source" value="core_metrics.test1.metadata.tsv" ftype="qiime2.tabular"/> + </conditional> + </repeat> + <param name="n" value="10"/> + <param name="replacement" value="__q2galaxy__::literal::False"/> + <param name="alpha_average_method" value="median"/> + <param name="beta_average_method" value="medoid"/> + <output_collection name="resampled_tables" type="list"/> + <output_collection name="alpha_diversities" type="list"/> + <output_collection name="distance_matrices" type="list"/> + <output_collection name="pcoas" type="list"/> + <output_collection name="emperor_plots" type="list"/> + <output name="scatter_plot" ftype="qzv"/> + </test> + </tests> + <help> +QIIME 2: boots core-metrics +=========================== +Perform resampled "core metrics" analysis. + + +Outputs: +-------- +:resampled_tables.qza: The `n` resampled tables. +:alpha_diversities.qza: Average alpha diversity vector for each metric. +:distance_matrices.qza: Average beta diversity distance matrix for each metric. +:pcoas.qza: PCoA matrix for each beta diversity metric. +:emperor_plots.qzv: Emperor plot for each beta diversity metric. +:scatter_plot.qzv: 2D scatter plot including alpha diversity and pcoa results for all selected metrics. + +| + +Description: +------------ +Given a single feature table as input, this action resamples the feature table `n` times to a total frequency of `sampling depth` per sample, and then computes common alpha and beta diversity on each resulting `table`. The resulting artifacts are then averaged using the method specified by `alpha_average_method` and `beta_average_method` parameters. The resulting average alpha and beta diversity artifacts are returned, along with PCoA matrices, Emperor plots, and a 2D scatter plot including alpha diversity values and PCoA of all beta diversity metrics. + +Examples: +--------- + +Bootstrapped core metrics. +************************** +Using the ``qiime2 boots core-metrics`` tool: + #. Set *"table"* to ``#: table.qza`` + #. Set *"sampling_depth"* to ``20`` + #. For *"metadata"*: + + - Perform the following steps. + + #. Leave as ``Metadata from TSV`` + #. Set *"Metadata Source"* to ``metadata.tsv`` + + + #. Set *"n"* to ``10`` + #. Set *"replacement"* to ``Yes`` + #. Expand the ``additional options`` section + + #. Leave *"alpha_average_method"* as its default value of ``median`` + #. Set *"beta_average_method"* to ``medoid`` + + #. Press the ``Execute`` button. + +Once completed, for each new entry in your history, use the ``Edit`` button to set the name as follows: + (Renaming is optional, but it will make any subsequent steps easier to complete.) + + .. list-table:: + :align: left + :header-rows: 1 + + * - History Name + - *"Name"* to set (be sure to press ``Save``) + * - ``#: qiime2 boots core-metrics [...] : resampled_tables.qza`` + - ``bootstrap-tables/`` + * - ``#: qiime2 boots core-metrics [...] : alpha_diversities.qza`` + - ``bootstrap-alpha-diversities/`` + * - ``#: qiime2 boots core-metrics [...] : distance_matrices.qza`` + - ``bootstrap-distance-matrices/`` + * - ``#: qiime2 boots core-metrics [...] : pcoas.qza`` + - ``bootstrap-pcoas/`` + * - ``#: qiime2 boots core-metrics [...] : emperor_plots.qza`` + - ``bootstrap-emperor-plots/`` + * - ``#: qiime2 boots core-metrics [...] : scatter_plot.qzv`` + - ``scatter-plot.qzv`` + +Rarefaction-based core metrics. +******************************* +Using the ``qiime2 boots core-metrics`` tool: + #. Set *"table"* to ``#: table.qza`` + #. Set *"sampling_depth"* to ``20`` + #. For *"metadata"*: + + - Perform the following steps. + + #. Leave as ``Metadata from TSV`` + #. Set *"Metadata Source"* to ``metadata.tsv`` + + + #. Set *"n"* to ``10`` + #. Set *"replacement"* to ``No`` + #. Expand the ``additional options`` section + + #. Leave *"alpha_average_method"* as its default value of ``median`` + #. Set *"beta_average_method"* to ``medoid`` + + #. Press the ``Execute`` button. + +Once completed, for each new entry in your history, use the ``Edit`` button to set the name as follows: + (Renaming is optional, but it will make any subsequent steps easier to complete.) + + .. list-table:: + :align: left + :header-rows: 1 + + * - History Name + - *"Name"* to set (be sure to press ``Save``) + * - ``#: qiime2 boots core-metrics [...] : resampled_tables.qza`` + - ``rarefaction-tables/`` + * - ``#: qiime2 boots core-metrics [...] : alpha_diversities.qza`` + - ``rarefaction-alpha-diversities/`` + * - ``#: qiime2 boots core-metrics [...] : distance_matrices.qza`` + - ``rarefaction-distance-matrices/`` + * - ``#: qiime2 boots core-metrics [...] : pcoas.qza`` + - ``rarefaction-pcoas/`` + * - ``#: qiime2 boots core-metrics [...] : emperor_plots.qza`` + - ``rarefaction-emperor-plots/`` + * - ``#: qiime2 boots core-metrics [...] : scatter_plot.qzv`` + - ``scatter-plot.qzv`` + + +| + +</help> + <citations> + <citation type="doi">https://doi.org/10.12688/f1000research.156295.1</citation> + <citation type="doi">10.1038/s41587-019-0209-9</citation> + </citations> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/core_metrics.test0.metadata.tsv Sat Nov 01 17:07:18 2025 +0000 @@ -0,0 +1,6 @@ +sample-id even-or-odd +#q2:types categorical +S1 odd +S2 even +S3 odd +S4 even
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/core_metrics.test1.metadata.tsv Sat Nov 01 17:07:18 2025 +0000 @@ -0,0 +1,6 @@ +sample-id even-or-odd +#q2:types categorical +S1 odd +S2 even +S3 odd +S4 even
