diff qiime2-2020.8/qiime_longitudinal_maturity-index.xml @ 20:d93d8888f0b0 draft

Uploaded
author florianbegusch
date Fri, 04 Sep 2020 12:44:24 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qiime2-2020.8/qiime_longitudinal_maturity-index.xml	Fri Sep 04 12:44:24 2020 +0000
@@ -0,0 +1,299 @@
+<?xml version="1.0" ?>
+<tool id="qiime_longitudinal_maturity-index" name="qiime longitudinal maturity-index"
+      version="2020.8">
+  <description>Microbial maturity index prediction.</description>
+  <requirements>
+    <requirement type="package" version="2020.8">qiime2</requirement>
+  </requirements>
+  <command><![CDATA[
+qiime longitudinal maturity-index
+
+--i-table=$itable
+# if $input_files_mmetadatafile:
+  # def list_dict_to_string(list_dict):
+    # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
+    # for d in list_dict[1:]:
+      # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
+    # end for
+    # return $file_list
+  # end def
+--m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
+# end if
+
+#if '__ob__' in str($pstatecolumn):
+  #set $pstatecolumn_temp = $pstatecolumn.replace('__ob__', '[')
+  #set $pstatecolumn = $pstatecolumn_temp
+#end if
+#if '__cb__' in str($pstatecolumn):
+  #set $pstatecolumn_temp = $pstatecolumn.replace('__cb__', ']')
+  #set $pstatecolumn = $pstatecolumn_temp
+#end if
+#if 'X' in str($pstatecolumn):
+  #set $pstatecolumn_temp = $pstatecolumn.replace('X', '\\')
+  #set $pstatecolumn = $pstatecolumn_temp
+#end if
+#if '__sq__' in str($pstatecolumn):
+  #set $pstatecolumn_temp = $pstatecolumn.replace('__sq__', "'")
+  #set $pstatecolumn = $pstatecolumn_temp
+#end if
+#if '__db__' in str($pstatecolumn):
+  #set $pstatecolumn_temp = $pstatecolumn.replace('__db__', '"')
+  #set $pstatecolumn = $pstatecolumn_temp
+#end if
+
+--p-state-column=$pstatecolumn
+
+
+--p-group-by=$pgroupby
+
+--p-control=$pcontrol
+
+#if '__ob__' in str($pindividualidcolumn):
+  #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__ob__', '[')
+  #set $pindividualidcolumn = $pindividualidcolumn_temp
+#end if
+#if '__cb__' in str($pindividualidcolumn):
+  #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__cb__', ']')
+  #set $pindividualidcolumn = $pindividualidcolumn_temp
+#end if
+#if 'X' in str($pindividualidcolumn):
+  #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('X', '\\')
+  #set $pindividualidcolumn = $pindividualidcolumn_temp
+#end if
+#if '__sq__' in str($pindividualidcolumn):
+  #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__sq__', "'")
+  #set $pindividualidcolumn = $pindividualidcolumn_temp
+#end if
+#if '__db__' in str($pindividualidcolumn):
+  #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__db__', '"')
+  #set $pindividualidcolumn = $pindividualidcolumn_temp
+#end if
+
+#if str($pindividualidcolumn):
+  --p-individual-id-column=$pindividualidcolumn
+#end if
+
+#if str($pestimator) != 'None':
+--p-estimator=$pestimator
+#end if
+
+--p-n-estimators=$pnestimators
+
+--p-test-size=$ptestsize
+
+--p-step=$pstep
+
+--p-cv=$pcv
+
+#if str($prandomstate):
+  --p-random-state=$prandomstate
+#end if
+--p-n-jobs=$pnjobs
+
+#if $pparametertuning:
+ --p-parameter-tuning
+#end if
+
+#if $poptimizefeatureselection:
+ --p-optimize-feature-selection
+#end if
+
+#if $pstratify:
+ --p-stratify
+#end if
+
+#if str($pmissingsamples) != 'None':
+--p-missing-samples=$pmissingsamples
+#end if
+
+--p-feature-count=$pfeaturecount
+
+--o-sample-estimator=osampleestimator
+
+--o-feature-importance=ofeatureimportance
+
+--o-predictions=opredictions
+
+--o-model-summary=omodelsummary
+
+--o-accuracy-results=oaccuracyresults
+
+--o-maz-scores=omazscores
+
+--o-clustermap=oclustermap
+
+--o-volatility-plots=ovolatilityplots
+
+#if str($examples) != 'None':
+--examples=$examples
+#end if
+
+;
+cp omazscores.qza $omazscores
+
+;
+qiime tools export  oclustermap.qzv --output-path out
+&& mkdir -p '$oclustermap.files_path'
+&& cp -r out/* '$oclustermap.files_path'
+&& mv '$oclustermap.files_path/index.html' '$oclustermap'
+
+;
+qiime tools export  ovolatilityplots.qzv --output-path out
+&& mkdir -p '$ovolatilityplots.files_path'
+&& cp -r out/* '$ovolatilityplots.files_path'
+&& mv '$ovolatilityplots.files_path/index.html' '$ovolatilityplots'
+
+  ]]></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" />
+    <repeat name="input_files_mmetadatafile" optional="False" title="--m-metadata-file">
+      <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA... (multiple arguments will be merged)                                                        [required]" name="additional_input" optional="False" type="data" />
+    </repeat>
+    <param label="--p-state-column: TEXT  Numeric metadata column containing sampling time (state) data to use as prediction target.  [required]" name="pstatecolumn" optional="False" type="text" />
+    <param label="--p-group-by: TEXT      Categorical metadata column to use for plotting and significance testing between main treatment groups. [required]" name="pgroupby" optional="False" type="text" />
+    <param label="--p-control: TEXT       Value of group-by to use as control group. The regression model will be trained using only control group data, and the maturity scores of other groups consequently will be assessed relative to this group. [required]" name="pcontrol" optional="False" type="text" />
+    <param label="--p-individual-id-column: TEXT Optional metadata column containing IDs for individual subjects. Adds individual subject (spaghetti) vectors to volatility charts if a column name is provided.                          [optional]" name="pindividualidcolumn" optional="False" type="text" />
+    <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-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]" min="1" name="pnestimators" optional="True" type="integer" value="100" />
+    <param exclude_min="True" 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.5]" max="1.0" min="0.0" name="ptestsize" optional="True" type="float" value="0.5" />
+    <param exclude_min="True" 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]" max="1.0" min="0.0" name="pstep" optional="True" type="float" value="0.05" />
+    <param label="--p-cv: INTEGER         Number of k-fold cross-validations to perform. Range(1, None)                                                [default: 5]" min="1" name="pcv" optional="True" type="integer" value="5" />
+    <param label="--p-random-state: INTEGER Seed used by random number generator.      [optional]" name="prandomstate" optional="False" type="text" />
+    <param label="--p-parameter-tuning: --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-optimize-feature-selection: --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-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-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="--p-feature-count: INTEGER Range(0, None)       Filter feature table to include top N most important features. Set to zero to include all features. [default: 50]" min="0" name="pfeaturecount" optional="True" type="integer" value="50" />
+    <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
+    
+  </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.html" name="omodelsummary" />
+    <data format="html" label="${tool.name} on ${on_string}: accuracyresults.html" name="oaccuracyresults" />
+    <data format="qza" label="${tool.name} on ${on_string}: mazscores.qza" name="omazscores" />
+    <data format="html" label="${tool.name} on ${on_string}: clustermap.html" name="oclustermap" />
+    <data format="html" label="${tool.name} on ${on_string}: volatilityplots.html" name="ovolatilityplots" />
+    
+  </outputs>
+
+  <help><![CDATA[
+Microbial maturity index prediction.
+###############################################################
+
+Calculates a "microbial maturity" index from a regression model trained on
+feature data to predict a given continuous metadata column, e.g., to
+predict age as a function of microbiota composition. The model is trained
+on a subset of control group samples, then predicts the column value for
+all samples. This visualization computes maturity index z-scores to compare
+relative "maturity" between each group, as described in
+doi:10.1038/nature13421. This method can be used to predict between-group
+differences in relative trajectory across any type of continuous metadata
+gradient, e.g., intestinal microbiome development by age, microbial
+succession during wine fermentation, or microbial community differences
+along environmental gradients, as a function of two or more different
+"treatment" groups.
+
+Parameters
+----------
+table : FeatureTable[Frequency]
+    Feature table containing all features that should be used for target
+    prediction.
+metadata : Metadata
+state_column : Str
+    Numeric metadata column containing sampling time (state) data to use as
+    prediction target.
+group_by : Str
+    Categorical metadata column to use for plotting and significance
+    testing between main treatment groups.
+control : Str
+    Value of group_by to use as control group. The regression model will be
+    trained using only control group data, and the maturity scores of other
+    groups consequently will be assessed relative to this group.
+individual_id_column : Str, optional
+    Optional metadata column containing IDs for individual subjects. Adds
+    individual subject (spaghetti) vectors to volatility charts if a column
+    name is provided.
+estimator : Str % Choices('RandomForestRegressor', 'ExtraTreesRegressor', 'GradientBoostingRegressor', 'AdaBoostRegressor', 'ElasticNet', 'Ridge', 'Lasso', 'KNeighborsRegressor', 'LinearSVR', 'SVR'), optional
+    Regression model to use for prediction.
+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.
+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_jobs : Int, optional
+    Number of jobs to run in parallel.
+parameter_tuning : Bool, optional
+    Automatically tune hyperparameters using random grid search.
+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.
+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.
+feature_count : Int % Range(0, None), optional
+    Filter feature table to include top N most important features. Set to
+    zero to include all features.
+
+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.
+maz_scores : SampleData[RegressorPredictions]
+    Microbiota-for-age z-score predictions.
+clustermap : Visualization
+    Heatmap of important feature abundance at each time point in each
+    group.
+volatility_plots : Visualization
+    Interactive volatility plots of MAZ and maturity scores, target
+    (column) predictions, and the sample metadata.
+  ]]></help>
+  <macros>
+    <import>qiime_citation.xml</import>
+  </macros>
+  <expand macro="qiime_citation"/>
+</tool>
\ No newline at end of file