0
|
1 <?xml version="1.0" ?>
|
|
2 <tool id="qiime_longitudinal_first-differences" name="qiime longitudinal first-differences" version="2018.4">
|
|
3 <description> - Compute first differences or difference from baseline between sequential states</description>
|
|
4 <requirements>
|
|
5 <requirement type="package" version="2018.4">qiime2</requirement>
|
|
6 </requirements>
|
|
7 <command>
|
|
8 <![CDATA[
|
|
9
|
|
10 qiime longitudinal first-differences --p-state-column="$pstatecolumn"
|
|
11
|
|
12 #if '__pd__' in str($pindividualidcolumn):
|
|
13 #set $pwhere_temp = $pindividualidcolumn.replace('__pd__', "#")
|
|
14 #set $pindividualidcolumn = $pwhere_temp
|
|
15 #end if
|
|
16
|
|
17 #def list_dict_to_string(list_dict):
|
|
18 #set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
|
|
19 #for d in list_dict[1:]:
|
|
20 #set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
|
|
21 #end for
|
|
22 #return $file_list
|
|
23 #end def
|
|
24
|
|
25
|
|
26 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile) --p-individual-id-column="$pindividualidcolumn" --p-metric="$pmetric"
|
|
27 #if str($itable) != 'None':
|
|
28 --i-table=$itable
|
|
29 #end if
|
|
30
|
|
31 #if str($cmdconfig) != 'None':
|
|
32 --cmd-config=$cmdconfig
|
|
33 #end if
|
|
34
|
|
35 #if str($preplicatehandling) != 'None':
|
|
36 --p-replicate-handling=$preplicatehandling
|
|
37 #end if
|
|
38 --o-first-differences=ofirstdifferences
|
|
39 #if str($pbaseline):
|
|
40 --p-baseline="$pbaseline"
|
|
41 #end if
|
|
42 ;
|
|
43 cp ofirstdifferences.qza $ofirstdifferences;
|
|
44 ]]>
|
|
45 </command>
|
|
46 <inputs>
|
|
47 <repeat name="input_files_mmetadatafile" optional="False" title="--m-metadata-file">
|
|
48 <param label="--m-metadata-file: Metadata file or artifact viewable as metadata. This option may be supplied multiple times to merge metadata. Sample metadata file containing individual_id_column. [required]" name="additional_input" type="data" format="tabular,qza,no_unzip.zip" />
|
|
49 </repeat>
|
|
50
|
|
51 <param label="--p-state-column: Metadata column containing state (e.g., Time) across which samples are paired. [required]" name="pstatecolumn" optional="False" type="text"/>
|
|
52 <param label="--p-individual-id-column: Metadata column containing IDs for individual subjects. [required]" name="pindividualidcolumn" optional="False" type="text"/>
|
|
53
|
|
54 <param label="--p-metric: Numerical metadata or artifact column to test. [required]" name="pmetric" optional="False" type="text"/>
|
|
55
|
|
56 <param label="--p-replicate-handling: Choose how replicate samples are handled. If
|
|
57 replicates are detected, 'error' causes
|
|
58 method to fail; 'drop'' will discard all
|
|
59 replicated samples; 'random' chooses one
|
|
60 representative at random from among
|
|
61 replicates. [default: error]" name="preplicatehandling" optional="True" type="select">
|
|
62 <option selected="True" value="None">Selection is Optional</option>
|
|
63 <option value="error">error</option>
|
|
64 <option value="random">random</option>
|
|
65 <option value="drop">drop</option>
|
|
66 </param>
|
|
67
|
|
68 <param label="--p-baseline: A value listed in the state_column metadata column against which all other states should be compared. Toggles calculation of static differences instead of first differences (which are calculated if no value is given for baseline). If a 'baseline' value is provided, sample differences at each state are compared against the baseline state, instead of the previous state. Must be a value listed in the state_column. [optional]" name="pbaseline" optional="True" type="text"/>
|
|
69
|
|
70 <param format="qza,no_unzip.zip" label="--i-table: FeatureTable[RelativeFrequency] Feature table to optionally use for computing first differences. [optional]" name="itable" optional="True" type="data"/>
|
|
71
|
|
72 <param label="--cmd-config: Use config file for command options" name="cmdconfig" optional="True" type="data"/>
|
|
73 </inputs>
|
|
74 <outputs>
|
|
75 <data format="qza" label="${tool.name} on ${on_string}: first-differences.qza" name="ofirstdifferences"/>
|
|
76 </outputs>
|
|
77 <help>
|
|
78 <![CDATA[
|
|
79 Compute first differences or difference from baseline between sequential states
|
|
80 --------------------------------------------------------------------------------
|
|
81
|
|
82 Calculates first differences in "metric" between sequential states for
|
|
83 samples collected from individual subjects sampled repeatedly at two or
|
|
84 more states. First differences can be performed on a metadata column
|
|
85 (including artifacts that can be input as metadata) or a feature in a
|
|
86 feature table. Outputs a data series of first differences for each
|
|
87 individual subject at each sequential pair of states, labeled by the
|
|
88 SampleID of the second state (e.g., paired differences between time 0 and
|
|
89 time 1 would be labeled by the SampleIDs at time 1). This file can be used
|
|
90 as input to linear mixed effects models or other longitudinal or diversity
|
|
91 methods to compare changes in first differences across time or among groups
|
|
92 of subjects. Also supports differences from baseline (or other static
|
|
93 comparison state) by setting the "baseline" parameter.
|
|
94
|
|
95 Parameters
|
|
96 ----------
|
|
97 table : FeatureTable[RelativeFrequency], optional
|
|
98 Feature table to optionally use for computing first differences.
|
|
99 metadata : Metadata
|
|
100 Sample metadata file containing individual_id_column.
|
|
101 state_column : Str
|
|
102 Metadata column containing state (e.g., Time) across which samples are
|
|
103 paired.
|
|
104 individual_id_column : Str
|
|
105 Metadata column containing IDs for individual subjects.
|
|
106 metric : Str
|
|
107 Numerical metadata or artifact column to test.
|
|
108 replicate_handling : Str % Choices({'drop', 'error', 'random'}), optional
|
|
109 Choose how replicate samples are handled. If replicates are detected,
|
|
110 "error" causes method to fail; "drop" will discard all replicated
|
|
111 samples; "random" chooses one representative at random from among
|
|
112 replicates.
|
|
113 baseline : Float, optional
|
|
114 A value listed in the state_column metadata column against which all
|
|
115 other states should be compared. Toggles calculation of static
|
|
116 differences instead of first differences (which are calculated if no
|
|
117 value is given for baseline). If a "baseline" value is provided, sample
|
|
118 differences at each state are compared against the baseline state,
|
|
119 instead of the previous state. Must be a value listed in the
|
|
120 state_column.
|
|
121
|
|
122 Returns
|
|
123 -------
|
|
124 first_differences : SampleData[FirstDifferences]
|
|
125 Series of first differences.
|
|
126 ]]>
|
|
127 </help>
|
|
128 <macros>
|
|
129 <import>qiime_citation.xml</import>
|
|
130 </macros>
|
|
131 <expand macro="qiime_citation" />
|
|
132 </tool>
|