view qiime2/qiime_sample-classifier_regress-samples.xml @ 7:85b520815e85 draft

Uploaded
author florianbegusch
date Tue, 13 Aug 2019 07:53:59 -0400
parents de4c22a52df4
children f190567fe3f6
line wrap: on
line source

<?xml version="1.0" ?>
<tool id="qiime_sample-classifier_regress-samples" name="qiime sample-classifier regress-samples" version="2019.4">
	<description> - Train and test a cross-validated supervised learning regressor.</description>
	<requirements>
		<requirement type="package" version="2019.4">qiime2</requirement>
	</requirements>
	<command><![CDATA[
qiime sample-classifier regress-samples

--i-table=$itable
--m-metadata-column="$mmetadatacolumn"

#if str($ptestsize):
 --p-test-size=$ptestsize
#end if

#if str($pstep):
 --p-step=$pstep
#end if

#if str($pcv):
 --p-cv=$pcv
#end if

#if str($prandomstate):
 --p-random-state="$prandomstate"
#end if

#set $pnjobs = '${GALAXY_SLOTS:-4}'

#if str($pnjobs):
 --p-n-jobs="$pnjobs"
#end if


#if str($pnestimators):
 --p-n-estimators=$pnestimators
#end if

#if str($pestimator) != 'None':
 --p-estimator=$pestimator
#end if

#if $poptimizefeatureselection:
 --p-optimize-feature-selection
#end if

#if $pstratify:
 --p-stratify
#end if

#if $pparametertuning:
 --p-parameter-tuning
#end if

#if str($pmissingsamples) != 'None':
 --p-missing-samples=$pmissingsamples
#end if




#if $metadatafile:
 --m-metadata-file=$metadatafile
#end if




--o-sample-estimator=osampleestimator
--o-feature-importance=ofeatureimportance
--o-predictions=opredictions
--o-model-summary=omodelsummary
--o-accuracy-results=oaccuracyresults
;
cp osampleestimator.qza $osampleestimator;
cp ofeatureimportance.qza $ofeatureimportance;
cp opredictions.qza $opredictions;
qiime tools export --input-path omodelsummary.qzv --output-path out   && mkdir -p '$omodelsummary.files_path'
&& cp -r out/* '$omodelsummary.files_path'
&& mv '$omodelsummary.files_path/index.html' '$omodelsummary';
qiime tools export --input-path oaccuracyresults.qzv --output-path out   && mkdir -p '$oaccuracyresults.files_path'
&& cp -r out/* '$oaccuracyresults.files_path'
&& mv '$oaccuracyresults.files_path/index.html' '$oaccuracyresults'
	]]></command>
	<inputs>
		<param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency] Feature table containing all features that should be used for target prediction.                  [required]" name="itable" optional="False" type="data"/>
		<param label="--m-metadata-column: COLUMN  MetadataColumn[Numeric] Numeric metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text"/>
		<param label="--p-test-size: PROPORTION Range(0.0, 1.0, inclusive_start=False) Fraction of input samples to exclude from training set and use for classifier testing.          [default: 0.2]" name="ptestsize" optional="True" type="float" value="0.2" min="0" max="1" />
		<param label="--p-step: PROPORTION Range(0.0, 1.0, inclusive_start=False) If optimize-feature-selection is True, step is the percentage of features to remove at each iteration. [default: 0.05]" name="pstep" optional="True" type="float" value="0.05" min="0" max="1" />
		<param label="--p-cv: INTEGER       Number of k-fold cross-validations to perform. Range(1, None)                                                [default: 5]" name="pcv" optional="True" type="integer" value="5" min="1"/>
		<param label="--p-random-state: INTEGER Seed used by random number generator.        [optional]" name="prandomstate" optional="True" type="integer"/>
		<param label="--p-n-estimators: INTEGER Range(1, None)     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.        [default: 100]" name="pnestimators" optional="True" type="integer" value="100" min="1"/>
		<param label="--p-estimator: " name="pestimator" optional="True" type="select">
			<option selected="True" value="None">Selection is Optional</option>
			<option value="RandomForestRegressor">RandomForestRegressor</option>
			<option value="ExtraTreesRegressor">ExtraTreesRegressor</option>
			<option value="GradientBoostingRegressor">GradientBoostingRegressor</option>
			<option value="AdaBoostRegressor">AdaBoostRegressor</option>
			<option value="ElasticNet">ElasticNet</option>
			<option value="Ridge">Ridge</option>
			<option value="Lasso">Lasso</option>
			<option value="KNeighborsRegressor">KNeighborsRegressor</option>
			<option value="LinearSVR">LinearSVR</option>
			<option value="SVR">SVR</option>
		</param>
		<param label="--p-optimize-feature-selection: --p-no-optimize-feature-selection Automatically optimize input feature selection using recursive feature elimination.         [default: False]" name="poptimizefeatureselection" selected="False" type="boolean"/>
		<param label="--p-stratify: --p-no-stratify Evenly stratify training and test data among metadata categories. If True, all values in column must match at least two samples.                     [default: False]" name="pstratify" selected="False" type="boolean"/>
		<param label="--p-parameter-tuning: --p-no-parameter-tuning Automatically tune hyperparameters using random grid search.                                [default: False]" name="pparametertuning" selected="False" type="boolean"/>
		<param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
			<option selected="True" value="None">Selection is Optional</option>
			<option value="error">error</option>
			<option value="ignore">ignore</option>
		</param>


		<param label="--m-metadata-file METADATA" name="metadatafile" type="data" format="tabular,qza,no_unzip.zip" />


	</inputs>
	<outputs>
		<data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator"/>
		<data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance"/>
		<data format="qza" label="${tool.name} on ${on_string}: predictions.qza" name="opredictions"/>
		<data format="html" label="${tool.name} on ${on_string}: modelsummary.qzv" name="omodelsummary"/>
		<data format="html" label="${tool.name} on ${on_string}: accuracyresults.qzv" name="oaccuracyresults"/>
	</outputs>
	<help><![CDATA[
Train and test a cross-validated supervised learning regressor.
###############################################################

Predicts a continuous sample metadata column using a supervised learning
regressor. 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

Parameters
----------
table : FeatureTable[Frequency]
    Feature table containing all features that should be used for target
    prediction.
metadata : MetadataColumn[Numeric]
    Numeric metadata column to use as prediction target.
test_size : Float % Range(0.0, 1.0, inclusive_start=False), optional
    Fraction of input samples to exclude from training set and use for
    classifier testing.
step : Float % Range(0.0, 1.0, inclusive_start=False), optional
    If optimize_feature_selection is True, step is the percentage of
    features to remove at each iteration.
cv : Int % Range(1, None), optional
    Number of k-fold cross-validations to perform.
random_state : Int, optional
    Seed used by random number generator.
n_estimators : Int % Range(1, None), optional
    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.
estimator : Str % Choices('RandomForestRegressor', 'ExtraTreesRegressor', 'GradientBoostingRegressor', 'AdaBoostRegressor', 'ElasticNet', 'Ridge', 'Lasso', 'KNeighborsRegressor', 'LinearSVR', 'SVR'), optional
    Estimator method to use for sample prediction.
optimize_feature_selection : Bool, optional
    Automatically optimize input feature selection using recursive feature
    elimination.
stratify : Bool, optional
    Evenly stratify training and test data among metadata categories. If
    True, all values in column must match at least two samples.
parameter_tuning : Bool, optional
    Automatically tune hyperparameters using random grid search.
missing_samples : Str % Choices('error', 'ignore'), optional
    How to handle missing samples in metadata. "error" will fail if missing
    samples are detected. "ignore" will cause the feature table and
    metadata to be filtered, so that only samples found in both files are
    retained.

Returns
-------
sample_estimator : SampleEstimator[Regressor]
    Trained sample estimator.
feature_importance : FeatureData[Importance]
    Importance of each input feature to model accuracy.
predictions : SampleData[RegressorPredictions]
    Predicted target values for each input sample.
model_summary : Visualization
    Summarized parameter and (if enabled) feature selection information for
    the trained estimator.
accuracy_results : Visualization
    Accuracy results visualization.
	]]></help>
<macros>
    <import>qiime_citation.xml</import>
</macros>
<expand macro="qiime_citation"/>
</tool>