annotate qiime2/qiime_sample-classifier_metatable.xml @ 0:370e0b6e9826 draft

Uploaded
author florianbegusch
date Wed, 17 Jul 2019 03:05:17 -0400
parents
children f190567fe3f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
1 <?xml version="1.0" ?>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
2 <tool id="qiime_sample-classifier_metatable" name="qiime sample-classifier metatable" version="2019.4">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
3 <description> - Convert (and merge) positive numeric metadata (in)to feature table.</description>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
4 <requirements>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
5 <requirement type="package" version="2019.4">qiime2</requirement>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
6 </requirements>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
7 <command><![CDATA[
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
8 qiime sample-classifier metatable
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
9
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
10
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
11 #if str($itable) != 'None':
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
12 --i-table=$itable
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
13 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
14
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
15 #if str($pmissingsamples) != 'None':
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
16 --p-missing-samples=$pmissingsamples
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
17 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
18
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
19 #if str($pmissingvalues) != 'None':
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
20 --p-missing-values=$pmissingvalues
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
21 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
22
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
23
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
24 #if $input_files_mmetadatafile:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
25 #def list_dict_to_string(list_dict):
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
26 #set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
27 #for d in list_dict[1:]:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
28 #set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
29 #end for
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
30 #return $file_list
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
31 #end def
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
32 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
33 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
34
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
35
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
36 --o-converted-table=oconvertedtable
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
37 ;
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
38 cp oconvertedtable.qza $oconvertedtable
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
39 ]]></command>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
40 <inputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
41 <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency] Feature table containing all features that should be used for target prediction. [optional]" name="itable" optional="True" type="data"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
42 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
43 <option selected="True" value="None">Selection is Optional</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
44 <option value="error">error</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
45 <option value="ignore">ignore</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
46 </param>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
47 <param label="--p-missing-values: " name="pmissingvalues" optional="True" type="select">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
48 <option selected="True" value="None">Selection is Optional</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
49 <option value="drop_samples">drop_samples</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
50 <option value="drop_features">drop_features</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
51 <option value="error">error</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
52 <option value="fill">fill</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
53 </param>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
54
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
55 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
56 <param label="--m-metadata-file: Metadata file or artifact viewable as metadata. This option may be supplied multiple times to merge metadata. [optional]" name="additional_input" type="data" format="tabular,qza,no_unzip.zip" />
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
57 </repeat>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
58
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
59 </inputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
60 <outputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
61 <data format="qza" label="${tool.name} on ${on_string}: convertedtable.qza" name="oconvertedtable"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
62 </outputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
63 <help><![CDATA[
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
64 Convert (and merge) positive numeric metadata (in)to feature table.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
65 ###################################################################
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
66
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
67 Convert numeric sample metadata from TSV file into a feature table.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
68 Optionally merge with an existing feature table. Only numeric metadata will
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
69 be converted; categorical columns will be silently dropped. By default, if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
70 a table is used as input only samples found in both the table and metadata
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
71 (intersection) are merged, and others are silently dropped. Set
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
72 missing_samples="error" to raise an error if samples found in the table are
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
73 missing from the metadata file. The metadata file can always contain a
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
74 superset of samples. Note that columns will be dropped if they are non-
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
75 numeric, contain only unique values, contain no unique values (zero
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
76 variance), contain only empty cells, or contain negative values. This
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
77 method currently only converts postive numeric metadata into feature data.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
78 Tip: convert categorical columns to dummy variables to include them in the
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
79 output feature table.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
80
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
81 Parameters
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
82 ----------
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
83 metadata : Metadata
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
84 Metadata file to convert to feature table.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
85 table : FeatureTable[Frequency], optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
86 Feature table containing all features that should be used for target
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
87 prediction.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
88 missing_samples : Str % Choices('error', 'ignore'), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
89 How to handle missing samples in metadata. "error" will fail if missing
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
90 samples are detected. "ignore" will cause the feature table and
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
91 metadata to be filtered, so that only samples found in both files are
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
92 retained.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
93 missing_values : Str % Choices('drop_samples', 'drop_features', 'error', 'fill'), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
94 How to handle missing values (nans) in metadata. Either "drop_samples"
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
95 with missing values, "drop_features" with missing values, "fill"
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
96 missing values with zeros, or "error" if any missing values are found.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
97
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
98 Returns
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
99 -------
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
100 converted_table : FeatureTable[Frequency]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
101 Converted feature table
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
102 ]]></help>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
103 <macros>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
104 <import>qiime_citation.xml</import>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
105 </macros>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
106 <expand macro="qiime_citation"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
107 </tool>