view qiime2__sample_classifier__classify_samples.xml @ 5:6c18cbbf0f5b draft default tip

planemo upload for repository https://github.com/qiime2/galaxy-tools/tree/main/tools/suite_qiime2__sample_classifier commit 5f71b597c9495eae67a447744fded834f56ca1f7
author q2d2
date Wed, 30 Oct 2024 19:56:04 +0000
parents 84156d6e1291
children
line wrap: on
line source

<?xml version='1.0' encoding='utf-8'?>
<!--
Copyright (c) 2024, 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: 2024.10.0)
for:
    qiime2 (version: 2024.10.1)
-->
<tool name="qiime2 sample-classifier classify-samples" id="qiime2__sample_classifier__classify_samples" version="2024.10.0+q2galaxy.2024.10.0" profile="22.05" license="BSD-3-Clause">
    <description>Train and test a cross-validated supervised learning classifier.</description>
    <xrefs>
        <xref type="bio.tools">qiime2</xref>
    </xrefs>
    <requirements>
        <container type="docker">quay.io/qiime2/amplicon:2024.10</container>
    </requirements>
    <version_command>q2galaxy version sample_classifier</version_command>
    <command detect_errors="exit_code">q2galaxy run sample_classifier classify_samples '$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 | Composition]" help="[required]  Feature table containing all features that should be used for target prediction.">
            <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]"/>
                <filter type="add_value" value="FeatureTable[Composition]"/>
            </options>
            <validator type="expression" message="Incompatible type">hasattr(value.metadata, "semantic_type") and value.metadata.semantic_type in ['FeatureTable[Composition]', 'FeatureTable[Frequency]', 'FeatureTable[PresenceAbsence]', 'FeatureTable[RelativeFrequency]']</validator>
        </param>
        <conditional name="metadata">
            <param name="type" type="select" label="metadata: MetadataColumn[Categorical]" help="[required]  Categorical metadata column to use as prediction target.">
                <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"/>
                <param name="column" type="data_column" label="Column Name" data_ref="source" use_header_names="true">
                    <validator type="expression" message="The first column cannot be selected (they are IDs).">value != "1"</validator>
                </param>
            </when>
            <when value="qza">
                <param name="source" type="data" format="qza" label="Metadata Source"/>
                <param name="column" type="text" label="Column Name">
                    <validator type="empty_field"/>
                </param>
            </when>
        </conditional>
        <section name="__q2galaxy__GUI__section__extra_opts__" title="Click here for additional options">
            <param name="test_size" type="float" min="0.0" max="0.999999" value="0.2" label="test_size: Float % Range(0.0, 1.0)" help="[default: 0.2]  Fraction of input samples to exclude from training set and use for classifier testing."/>
            <param name="step" type="float" min="1e-06" max="0.999999" value="0.05" label="step: Float % Range(0.0, 1.0, inclusive_start=False)" help="[default: 0.05]  If optimize_feature_selection is True, step is the percentage of features to remove at each iteration."/>
            <param name="cv" type="integer" min="1" value="5" label="cv: Int % Range(1, None)" help="[default: 5]  Number of k-fold cross-validations to perform."/>
            <param name="random_state" type="integer" optional="true" label="random_state: Int" help="[optional]  Seed used by random number generator."/>
            <param name="n_estimators" type="integer" min="1" value="100" label="n_estimators: Int % Range(1, None)" help="[default: 100]  Number of trees to grow for estimation. More trees will improve predictive accuracy up to a threshold level, but will also increase time and memory requirements. This parameter only affects ensemble estimators, such as Random Forest, AdaBoost, ExtraTrees, and GradientBoosting."/>
            <param name="estimator" type="select" label="estimator: Str % Choices('RandomForestClassifier', 'ExtraTreesClassifier', 'GradientBoostingClassifier', 'AdaBoostClassifier[DecisionTree]', 'AdaBoostClassifier[ExtraTrees]', 'KNeighborsClassifier', 'LinearSVC', 'SVC')">
                <option value="RandomForestClassifier" selected="true">RandomForestClassifier</option>
                <option value="ExtraTreesClassifier">ExtraTreesClassifier</option>
                <option value="GradientBoostingClassifier">GradientBoostingClassifier</option>
                <option value="AdaBoostClassifier__ob__DecisionTree__cb__">AdaBoostClassifier[DecisionTree]</option>
                <option value="AdaBoostClassifier__ob__ExtraTrees__cb__">AdaBoostClassifier[ExtraTrees]</option>
                <option value="KNeighborsClassifier">KNeighborsClassifier</option>
                <option value="LinearSVC">LinearSVC</option>
                <option value="SVC">SVC</option>
            </param>
            <param name="optimize_feature_selection" type="boolean" truevalue="__q2galaxy__::literal::True" falsevalue="__q2galaxy__::literal::False" label="optimize_feature_selection: Bool" help="[default: No]  Automatically optimize input feature selection using recursive feature elimination."/>
            <param name="parameter_tuning" type="boolean" truevalue="__q2galaxy__::literal::True" falsevalue="__q2galaxy__::literal::False" label="parameter_tuning: Bool" help="[default: No]  Automatically tune hyperparameters using random grid search."/>
            <param name="palette" type="select" label="palette: Str % Choices('YellowOrangeBrown', 'YellowOrangeRed', 'OrangeRed', 'PurpleRed', 'RedPurple', 'BluePurple', 'GreenBlue', 'PurpleBlue', 'YellowGreen', 'summer', 'copper', 'viridis', 'cividis', 'plasma', 'inferno', 'magma', 'sirocco', 'drifting', 'melancholy', 'enigma', 'eros', 'spectre', 'ambition', 'mysteriousstains', 'daydream', 'solano', 'navarro', 'dandelions', 'deepblue', 'verve', 'greyscale')">
                <option value="YellowOrangeBrown">YellowOrangeBrown</option>
                <option value="YellowOrangeRed">YellowOrangeRed</option>
                <option value="OrangeRed">OrangeRed</option>
                <option value="PurpleRed">PurpleRed</option>
                <option value="RedPurple">RedPurple</option>
                <option value="BluePurple">BluePurple</option>
                <option value="GreenBlue">GreenBlue</option>
                <option value="PurpleBlue">PurpleBlue</option>
                <option value="YellowGreen">YellowGreen</option>
                <option value="summer">summer</option>
                <option value="copper">copper</option>
                <option value="viridis">viridis</option>
                <option value="cividis">cividis</option>
                <option value="plasma">plasma</option>
                <option value="inferno">inferno</option>
                <option value="magma">magma</option>
                <option value="sirocco" selected="true">sirocco</option>
                <option value="drifting">drifting</option>
                <option value="melancholy">melancholy</option>
                <option value="enigma">enigma</option>
                <option value="eros">eros</option>
                <option value="spectre">spectre</option>
                <option value="ambition">ambition</option>
                <option value="mysteriousstains">mysteriousstains</option>
                <option value="daydream">daydream</option>
                <option value="solano">solano</option>
                <option value="navarro">navarro</option>
                <option value="dandelions">dandelions</option>
                <option value="deepblue">deepblue</option>
                <option value="verve">verve</option>
                <option value="greyscale">greyscale</option>
            </param>
            <param name="missing_samples" type="select" label="missing_samples: Str % Choices('error', 'ignore')" display="radio">
                <option value="error" selected="true">error</option>
                <option value="ignore">ignore</option>
            </param>
        </section>
    </inputs>
    <outputs>
        <data name="sample_estimator" format="qza" label="${tool.name} on ${on_string}: sample_estimator.qza" from_work_dir="sample_estimator.qza"/>
        <data name="feature_importance" format="qza" label="${tool.name} on ${on_string}: feature_importance.qza" from_work_dir="feature_importance.qza"/>
        <data name="predictions" format="qza" label="${tool.name} on ${on_string}: predictions.qza" from_work_dir="predictions.qza"/>
        <data name="model_summary" format="qzv" label="${tool.name} on ${on_string}: model_summary.qzv" from_work_dir="model_summary.qzv"/>
        <data name="accuracy_results" format="qzv" label="${tool.name} on ${on_string}: accuracy_results.qzv" from_work_dir="accuracy_results.qzv"/>
        <data name="probabilities" format="qza" label="${tool.name} on ${on_string}: probabilities.qza" from_work_dir="probabilities.qza"/>
        <data name="heatmap" format="qzv" label="${tool.name} on ${on_string}: heatmap.qzv" from_work_dir="heatmap.qzv"/>
        <data name="training_targets" format="qza" label="${tool.name} on ${on_string}: training_targets.qza" from_work_dir="training_targets.qza"/>
        <data name="test_targets" format="qza" label="${tool.name} on ${on_string}: test_targets.qza" from_work_dir="test_targets.qza"/>
    </outputs>
    <tests/>
    <help>
QIIME 2: sample-classifier classify-samples
===========================================
Train and test a cross-validated supervised learning classifier.


Outputs:
--------
:sample_estimator.qza: Trained sample estimator.
:feature_importance.qza: Importance of each input feature to model accuracy.
:predictions.qza: Predicted target values for each input sample.
:model_summary.qzv: Summarized parameter and (if enabled) feature selection information for the trained estimator.
:accuracy_results.qzv: Accuracy results visualization.
:probabilities.qza: Predicted class probabilities for each input sample.
:heatmap.qzv: A heatmap of the top 50 most important features from the table.
:training_targets.qza: Series containing true target values of train samples
:test_targets.qza: Series containing true target values of test samples

|  

Description:
------------
Predicts a categorical sample metadata column using a supervised learning classifier. Splits input data into training and test sets. The training set is used to train and test the estimator using a stratified k-fold cross-validation scheme. This includes optional steps for automated feature extraction and hyperparameter optimization. The test set validates classification accuracy of the optimized estimator. Outputs classification results for test set. For more details on the learning algorithm, see http://scikit-learn.org/stable/supervised_learning.html


|  

</help>
    <citations>
        <citation type="doi">10.21105/joss.00934</citation>
        <citation type="bibtex">@article{cite2,
 author = {Pedregosa, Fabian and Varoquaux, Gaël and Gramfort, Alexandre and Michel, Vincent and Thirion, Bertrand and Grisel, Olivier and Blondel, Mathieu and Prettenhofer, Peter and Weiss, Ron and Dubourg, Vincent and Vanderplas, Jake and Passos, Alexandre and Cournapeau, David and Brucher, Matthieu and Perrot, Matthieu and Duchesnay, Édouard},
 journal = {Journal of machine learning research},
 number = {Oct},
 pages = {2825--2830},
 title = {Scikit-learn: Machine learning in Python},
 volume = {12},
 year = {2011}
}
</citation>
        <citation type="doi">10.1038/s41587-019-0209-9</citation>
    </citations>
</tool>