comparison qiime2/qiime_diversity_beta-correlation.xml @ 29:3ba9833030c1 draft

Uploaded
author florianbegusch
date Fri, 04 Sep 2020 13:12:49 +0000
parents
children
comparison
equal deleted inserted replaced
28:c28331a63dfd 29:3ba9833030c1
1 <?xml version="1.0" ?>
2 <tool id="qiime_diversity_beta-correlation" name="qiime diversity beta-correlation"
3 version="2020.8">
4 <description>Beta diversity correlation</description>
5 <requirements>
6 <requirement type="package" version="2020.8">qiime2</requirement>
7 </requirements>
8 <command><![CDATA[
9 qiime diversity beta-correlation
10
11 --i-distance-matrix=$idistancematrix
12 # if $input_files_mmetadatafile:
13 # def list_dict_to_string(list_dict):
14 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
15 # for d in list_dict[1:]:
16 # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
17 # end for
18 # return $file_list
19 # end def
20 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
21 # end if
22
23 #if '__ob__' in str($mmetadatacolumn):
24 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[')
25 #set $mmetadatacolumn = $mmetadatacolumn_temp
26 #end if
27 #if '__cb__' in str($mmetadatacolumn):
28 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']')
29 #set $mmetadatacolumn = $mmetadatacolumn_temp
30 #end if
31 #if 'X' in str($mmetadatacolumn):
32 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\')
33 #set $mmetadatacolumn = $mmetadatacolumn_temp
34 #end if
35 #if '__sq__' in str($mmetadatacolumn):
36 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'")
37 #set $mmetadatacolumn = $mmetadatacolumn_temp
38 #end if
39 #if '__db__' in str($mmetadatacolumn):
40 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"')
41 #set $mmetadatacolumn = $mmetadatacolumn_temp
42 #end if
43
44 --m-metadata-column=$mmetadatacolumn
45
46
47 #if str($pmethod) != 'None':
48 --p-method=$pmethod
49 #end if
50
51 --p-permutations=$ppermutations
52
53 #if $pintersectids:
54 --p-intersect-ids
55 #end if
56
57 #if str($plabel1):
58 --p-label1=$plabel1
59 #end if
60 #if str($plabel2):
61 --p-label2=$plabel2
62 #end if# if $input_files_ometadatadistancematrix:
63 # def list_dict_to_string(list_dict):
64 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
65 # for d in list_dict[1:]:
66 # set $file_list = $file_list + ' --o-metadata-distance-matrix=' + d['additional_input'].__getattr__('file_name')
67 # end for
68 # return $file_list
69 # end def
70 --o-metadata-distance-matrix=$list_dict_to_string($input_files_ometadatadistancematrix)
71 # end if
72
73 --o-mantel-scatter-visualization=omantelscattervisualization
74
75 #if str($examples) != 'None':
76 --examples=$examples
77 #end if
78
79 ;
80 cp odistancematrix.qza $odistancematrix
81
82 ;
83 qiime tools export omantelscattervisualization.qzv --output-path out
84 && mkdir -p '$omantelscattervisualization.files_path'
85 && cp -r out/* '$omantelscattervisualization.files_path'
86 && mv '$omantelscattervisualization.files_path/index.html' '$omantelscattervisualization'
87
88 ]]></command>
89 <inputs>
90 <param format="qza,no_unzip.zip" label="--i-distance-matrix: ARTIFACT DistanceMatrix Matrix of distances between pairs of samples. [required]" name="idistancematrix" optional="False" type="data" />
91 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
92 <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" />
93 </repeat>
94 <param label="--m-metadata-column: COLUMN MetadataColumn[Numeric] Numeric metadata column from which to compute pairwise Euclidean distances [required]" name="mmetadatacolumn" optional="False" type="text" />
95 <param label="--p-method: " name="pmethod" optional="True" type="select">
96 <option selected="True" value="None">Selection is Optional</option>
97 <option value="spearman">spearman</option>
98 <option value="pearson">pearson</option>
99 </param>
100 <param label="--p-permutations: INTEGER Range(0, None) The number of permutations to be run when computing p-values. Supplying a value of zero will disable permutation testing and p-values will not be calculated (this results in *much* quicker execution time if p-values are not desired). [default: 999]" min="0" name="ppermutations" optional="True" type="integer" value="999" />
101 <param label="--p-intersect-ids: --p-intersect-ids: / --p-no-intersect-ids If supplied, IDs that are not found in both distance matrices will be discarded before applying the Mantel test. Default behavior is to error on any mismatched IDs. [default: False]" name="pintersectids" selected="False" type="boolean" />
102 <param label="--p-label1: TEXT Label for `distance-matrix` in the output visualization. [default: \'Metadata\']" name="plabel1" optional="False" type="text" value="\'Metadata\'" />
103 <param label="--p-label2: TEXT Label for `metadata-distance-matrix` in the output visualization. [default: \'Distance Matrix\']" name="plabel2" optional="False" type="text" value="\'Distance Matrix\'" />
104 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
105
106 </inputs>
107
108 <outputs>
109 <repeat name="input_files_ometadatadistancematrix" optional="False" title="--o-metadata-distance-matrix">
110 <param format="tabular,qza,no_unzip.zip" label="--o-metadata-distance-matrix: ARTIFACT DistanceMatrix The Distance Matrix produced from the metadata column and used in the mantel test [required]" name="additional_input" optional="False" type="data" />
111 </repeat>
112 <data format="html" label="${tool.name} on ${on_string}: mantelscattervisualization.html" name="omantelscattervisualization" />
113
114 </outputs>
115
116 <help><![CDATA[
117 Beta diversity correlation
118 ###############################################################
119
120 Create a distance matrix from a numeric metadata column and apply a two-
121 sided Mantel test to identify correlation between two distance matrices.
122 Actions used internally: `distance-matrix` from q2-metadata and `mantel`
123 from q2-diversity.
124
125 Parameters
126 ----------
127 metadata : MetadataColumn[Numeric]
128 Numeric metadata column from which to compute pairwise Euclidean
129 distances
130 distance_matrix : DistanceMatrix
131 Matrix of distances between pairs of samples.
132 method : Str % Choices('spearman', 'pearson'), optional
133 The correlation test to be applied in the Mantel test.
134 permutations : Int % Range(0, None), optional
135 The number of permutations to be run when computing p-values. Supplying
136 a value of zero will disable permutation testing and p-values will not
137 be calculated (this results in *much* quicker execution time if
138 p-values are not desired).
139 intersect_ids : Bool, optional
140 If supplied, IDs that are not found in both distance matrices will be
141 discarded before applying the Mantel test. Default behavior is to error
142 on any mismatched IDs.
143 label1 : Str, optional
144 Label for `distance_matrix` in the output visualization.
145 label2 : Str, optional
146 Label for `metadata_distance_matrix` in the output visualization.
147
148 Returns
149 -------
150 metadata_distance_matrix : DistanceMatrix
151 The Distance Matrix produced from the metadata column and used in the
152 mantel test
153 mantel_scatter_visualization : Visualization
154 Scatter plot rendering of the manteltest results
155 ]]></help>
156 <macros>
157 <import>qiime_citation.xml</import>
158 </macros>
159 <expand macro="qiime_citation"/>
160 </tool>