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