comparison hicAggregateContacts.xml @ 11:ee370ade24cd draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 2a0943e78bdc8ebb13f181399206a9eea37ed78f"
author iuc
date Tue, 16 Mar 2021 15:21:53 +0000
parents ce16a538ab46
children e30485c5e93b
comparison
equal deleted inserted replaced
10:8286e361f89c 11:ee370ade24cd
1 1 <tool id="hicexplorer_hicaggregatecontacts" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
2 <tool id="hicexplorer_hicaggregatecontacts" name="@BINARY@" version="@WRAPPER_VERSION@.0">
3 <description>allow plotting of aggregated Hi-C contacts between regions specified in a file</description> 2 <description>allow plotting of aggregated Hi-C contacts between regions specified in a file</description>
4 <macros> 3 <macros>
5 <token name="@BINARY@">hicAggregateContacts</token> 4 <token name="@BINARY@">hicAggregateContacts</token>
6 <import>macros.xml</import> 5 <import>macros.xml</import>
7 </macros> 6 </macros>
8 <expand macro="requirements" /> 7 <expand macro="requirements" />
9 <command detect_errors="exit_code"><![CDATA[ 8 <command detect_errors="exit_code"><![CDATA[
10 ln -s '$matrix_h5_cooler' 'matrix.$matrix_h5_cooler.ext' && 9 ln -s '$matrix_h5_cooler' 'matrix.$matrix_h5_cooler.ext' &&
11 @BINARY@ 10 @BINARY@
12 --matrix 'matrix.$matrix_h5_cooler.ext' 11 --matrix 'matrix.$matrix_h5_cooler.ext'
13 --BED $BED 12 --BED '$BED'
14 #if $BED2: 13 #if $BED2:
15 --BED2 $BED2 14 --BED2 '$BED2'
16 #end if 15 #end if
17 16
18 --range '$range_min:$range_max' 17 --range '$range_min:$range_max'
19
20 --numberOfBins '$numberOfBins' 18 --numberOfBins '$numberOfBins'
21 19
22 --transform $transform 20 --transform $transform
23 --avgType $avgType 21 --operationType $operationType
24 22 --mode $mode
23 $row_wise
24 $perChr
25 --largeRegionsOperation $largeRegionsOperation
25 #if $outputs and 'PrefixMatrix' in $outputs: 26 #if $outputs and 'PrefixMatrix' in $outputs:
26 --outFilePrefixMatrix 'matrix_values' 27 --outFilePrefixMatrix 'matrix_values'
27 #end if 28 #end if
28 29
29 #if $outputs and 'ClusterContactPositions' in $outputs: 30 #if $outputs and 'outFileContactPairs' in $outputs:
30 --outFilePrefixClusterContactPositions 'contact_positions' 31 --outFileContactPairs 'contact_positions'
31 #end if 32 #end if
32 33
33 #if $outputs and 'HeatmapFile' in $outputs: 34 #if $outputs and 'HeatmapFile' in $outputs:
34 --diagnosticHeatmapFile 'heatmap' 35 --diagnosticHeatmapFile 'heatmap'
35 #end if 36 #end if
36 37
38 #if $outputs and 'outFileObsExp' in $outputs:
39 --outFileObsExp 'ObsExp.$matrix_h5_cooler.ext'
40 #end if
41
37 #if $clustering: 42 #if $clustering:
38 $clustering 43 $clustering
39 #end if 44 #end if
40 $clusterOnDiagonal 45
46 #if $howToCluster:
47 --howToCluster $howToCluster
48 #end if
41 49
42 #if $chromosomes: 50 #if $chromosomes:
43 --chromosomes #echo "' '".join([ "'%s'" % $chrom.chromosome for $chrom in $chromosomes ])# 51 --chromosomes #echo "' '".join([ "'%s'" % $chrom.chromosome for $chrom in $chromosomes ])#
44 #end if 52 #end if
45 53
58 #if $vMax: 66 #if $vMax:
59 --vMax $vMax 67 --vMax $vMax
60 #end if 68 #end if
61 69
62 --outFileName plot.$image_file_format 70 --outFileName plot.$image_file_format
63 && mv plot.$image_file_format plot 71 &&
72 mv plot.$image_file_format plot
73 #if $outputs and 'outFileObsExp' in $outputs:
74 && mv 'ObsExp.$matrix_h5_cooler.ext' matrix
75 #end if
64 76
65 ]]> 77 ]]>
66 </command> 78 </command>
67 <inputs> 79 <inputs>
68 <expand macro='matrix_h5_cooler_macro' /> 80 <expand macro='matrix_h5_cooler_macro' />
69 <param argument="--BED" type="data" format="bed" label="Interactions between regions in this BED file are plotted"/> 81 <param argument="--BED" type="data" format="bed" label="Interactions between regions in this BED file are plotted" />
70 <param argument="--BED2" type="data" format="bed" optional="true" 82 <param argument="--BED2" type="data" format="bed" optional="true" label="Interactions between regions in first and second BED file are plotted" />
71 label="Interactions between regions in first and second BED file are plotted"/>
72 83
73 <expand macro='range' /> 84 <expand macro='range' />
85 <param argument="--mode" type="select" label="Regions to consider.">
86 <option value="inter-chr">inter-chr</option>
87 <option value="intra-chr">intra-chr</option>
88 <option value="all" selected="true">all</option>
89 </param>
90
91 <param argument="--row_wise" type="boolean" truevalue="--row_wise" falsevalue="" label="Row wise" help="If given,the insteractions between each row of the BED file and its
92 corresponding row of the BED2 file are computed. If intra-chromosomal
93 contacts are computed, the rows with different chromosomes are ignored.
94 If inter-chromosomal, the rows with same chromosomes are ignored.
95 It keeps all the rows if `all`." />
96
97 <param argument="--perChr" type="boolean" truevalue="--perChr" falsevalue="" label="Per chromosome" help="If set, it generates a plot per chromosome. It is only affected if intra-chromosomal contacts are of interest." />
74 98
75 <repeat name="chromosomes" title="List of chromosomes to plot" min="0"> 99 <repeat name="chromosomes" title="List of chromosomes to plot" min="0">
76 <param name="chromosome" type="text" label="chromosome (one per field)"> 100 <param name="chromosome" type="text" label="chromosome (one per field)">
77 <validator type="empty_field" /> 101 <validator type="empty_field" />
78 </param> 102 </param>
79 </repeat> 103 </repeat>
80 104
81 <param argument="--numberOfBins" type="integer" optional="true" label="Number of bins to include in the submatrix" 105 <param argument="--numberOfBins" type="integer" optional="true" label="Number of bins to include in the submatrix" help="The bed regions will be centered between -half number of bins and +half number of bins indicated." />
82 help="The bed regions will be centered between -half number of bins 106
83 and +half number of bins indicated." /> 107 <param argument="--transform" type="select" label="Type of transformation for the matrix" help="If total counts are selected, then the sub-matrix values
84
85 <param argument="--transform" type="select" label="Type of transformation for the matrix"
86 help="If total counts are selected, then the sub-matrix values
87 are divided by the total counts for normalization. If 108 are divided by the total counts for normalization. If
88 z-score or obs/exp are selected, then H-C matrix is 109 z-score or obs/exp are selected, then H-C matrix is
89 converted into a z-score or observed / expected matrix."> 110 converted into a z-score or observed / expected matrix.">
90 <option value="none" selected="true">none</option> 111 <option value="none" selected="true">none</option>
91 <option value="total-counts">total-counts</option> 112 <option value="total-counts">total-counts</option>
92 <option value="z-score">z-score</option> 113 <option value="z-score">z-score</option>
93 <option value="obs/exp">obs/exp</option> 114 <option value="obs/exp">obs/exp</option>
94 </param> 115 </param>
95 116
96 <param argument="--avgType" type="select" label="Type of average to compute final matrix"> 117 <param argument="--operationType" type="select" label="Type of operation to compute final matrix">
97 <option value="median" selected="true">median</option> 118 <option value="median" selected="true">median</option>
98 <option value="mean">mean</option> 119 <option value="mean">mean</option>
99 </param> 120 <option value="sum">sum</option>
100 121 </param>
101 <param name="clustering" type="select" optional="true" label="Number of clusters per chromosome" 122
102 help="When this option is set, then the matrix is split into 123 <param argument="--largeRegionsOperation" type="select" label="Large regions operation" help="If a given coordinate in the bed file is larger than
124 a bin of the input matrix, by default only the first bin
125 is taken into account. However there are more posibilities
126 to handel such a case. Users can ask for the last bin or
127 for center of the region. As an example if a region falls into bins [4,5,6]
128 and `--numberOfBins = 2` then if first, bins [3,4,5] are kept.
129 If last: [5,6,7] and if center: [4,5,6].">
130 <option value="first" selected="true">first</option>
131 <option value="last">last</option>
132 <option value="center">center</option>
133 </param>
134
135 <param name="clustering" type="select" optional="true" label="Number of clusters per chromosome" help="When this option is set, then the matrix is split into
103 clusters using the hierarchical clustering algorithm, 136 clusters using the hierarchical clustering algorithm,
104 using 'ward linkage'. hclust could be very slow if 137 using 'ward linkage'. hclust could be very slow if
105 you have >1000 submatrices per chromosome. In those 138 you have >1000 submatrices per chromosome. In those
106 cases, you might prefer kmeans."> 139 cases, you might prefer kmeans.">
107 <option value="--kmeans">kmeans</option> 140 <option value="--kmeans">kmeans</option>
108 <option value="--hclust">hclust (#clusters per chromosome)</option> 141 <option value="--hclust">hclust (#clusters per chromosome)</option>
109 </param> 142 <option value="--spectral">spectral</option>
110 143 </param>
111 <param argument="--clusterOnDiagonal" type="boolean" truevalue="--clusterOnDiagonal" falsevalue="" 144
112 label="Perform clustering on the submatrix diagonal" 145 <param argument="--howToCluster" type="select" optional="true" label="How to cluster" help="Options are 'full', 'center' and 'diagonal'. The full clustering '
113 help="Clustering is by default carried out on the whole 146 'takes all values of each submatrix for clustering. center, takes only a square of '
114 submatrices. If this parameter is given, the 147 'length 3x3 from each submatrix and uses only this values for clustering. With the '
115 clustering is only carried out based on the submatrix 148 'diagonal option the clustering is only carried out based on the submatrix diagonal '
116 diagonal (representing values at the same distance to each other)." /> 149 '(representing values at the same distance to each other)">
117 150 <option value="full">full</option>
151 <option value="center">center</option>
152 <option value="diagonal">diagonal</option>
153 </param>
118 <param argument="--plotType" type="select" optional="true" label="Plot type"> 154 <param argument="--plotType" type="select" optional="true" label="Plot type">
119 <option value="2d">2D</option> 155 <option value="2d">2D</option>
120 <option value="3d">3D</option> 156 <option value="3d">3D</option>
121 </param> 157 </param>
122 <expand macro="colormap" /> 158 <expand macro="colormap" />
123 <param argument="--vMin" type="float" optional="true" label="vMin" 159 <param argument="--vMin" type="float" optional="true" label="vMin" help= "Minimum value of the plotted score." />
124 help= "Minimum value of the plotted score." /> 160 <param argument="--vMax" type="float" optional="true" label="vMax" help= "Maximum value of the plotted score." />
125
126 <param argument="--vMax" type="float" optional="true" label="vMax"
127 help= "Maximum value of the plotted score." />
128
129 <param name="image_file_format" type="select" label="Image output format"> 161 <param name="image_file_format" type="select" label="Image output format">
130 <option value="png" selected="True">png</option> 162 <option value="png" selected="True">png</option>
131 <option value="svg">svg</option> 163 <option value="svg">svg</option>
132 <option value="pdf">pdf</option> 164 <option value="pdf">pdf</option>
133
134 </param> 165 </param>
135 166
136 <param name="outputs" type="select" optional="true" multiple="true" label="Optional output files"> 167 <param name="outputs" type="select" optional="true" multiple="true" label="Optional output files">
137 <option value="PrefixMatrix">Save values underlying the final matrix</option> 168 <option value="PrefixMatrix">Save values underlying the final matrix</option>
138 <option value="ClusterContactPositions">Save the position of the contacts</option> 169 <option value="outFileContactPairs">Save the position of the contacts</option>
139 <option value="HeatmapFile">Heatmap file per chromosome</option> 170 <option value="HeatmapFile">Heatmap file per chromosome</option>
171 <option value="outFileObsExp">Save obs/exp matrix</option>
140 </param> 172 </param>
141 173
142 </inputs> 174 </inputs>
143 <outputs> 175 <outputs>
144 <data name="outFileName" from_work_dir="plot" format="png" label="${tool.name} on ${on_string}: Plot"> 176 <data name="outFileName" from_work_dir="plot" format="png" label="${tool.name} on ${on_string}: Plot">
145 <change_format> 177 <change_format>
146 <when input="image_file_format" value="svg" format="svg" /> 178 <when input="image_file_format" value="svg" format="svg" />
147 <when input="image_file_format" value="pdf" format="pdf" /> 179 <when input="image_file_format" value="pdf" format="pdf" />
148
149 </change_format> 180 </change_format>
150 </data> 181 </data>
151 <collection name="matrix_values" type="list" label="${tool.name} on ${on_string}: Matrix values"> 182 <collection name="matrix_values" type="list" label="${tool.name} on ${on_string}: Matrix values">
152 <discover_datasets pattern="matrix_values_(?P&lt;designation&gt;.*)\..*" directory="./" format="tabular" /> 183 <discover_datasets pattern="matrix_values_(?P&lt;designation&gt;.*)\..*" directory="./" format="tabular" />
153 </collection> 184 </collection>
155 <discover_datasets pattern="contact_positions_(?P&lt;designation&gt;.*)\..*" directory="./" format="tabular" /> 186 <discover_datasets pattern="contact_positions_(?P&lt;designation&gt;.*)\..*" directory="./" format="tabular" />
156 </collection> 187 </collection>
157 <collection name="heatmap" type="list" label="${tool.name} on ${on_string}: Matrix values"> 188 <collection name="heatmap" type="list" label="${tool.name} on ${on_string}: Matrix values">
158 <discover_datasets pattern="heatmap_(?P&lt;designation&gt;.*)\..*" directory="./" format="tabular" /> 189 <discover_datasets pattern="heatmap_(?P&lt;designation&gt;.*)\..*" directory="./" format="tabular" />
159 </collection> 190 </collection>
191 <data name="matrix_obs_exp_output" from_work_dir="matrix" format="h5" label="${tool.name} MATRIX on ${on_string}">
192 <filter>'outFileObsExp' in outputs</filter>
193 <change_format>
194 <when input="matrix_h5_cooler.ext" value="cool" format="cool" />
195 </change_format>
196 </data>
160 </outputs> 197 </outputs>
161 <tests> 198 <tests>
162 <test> 199 <test>
163 <param name="matrix_h5_cooler" value="Li_et_al_2015.cool" ftype="cool"/> 200 <param name="matrix_h5_cooler" value="Li_et_al_2015.cool" ftype="cool" />
164 <param name="BED" value="hicAggregateContacts/test_regions.bed" ftype="bed"/> 201 <param name="BED" value="hicAggregateContacts/test_regions.bed" ftype="bed" />
165 <param name="numberOfBins" value="30" /> 202 <param name="numberOfBins" value="30" />
166 <param name="range_max" value="900000" /> 203 <param name="range_max" value="900000" />
167 <param name="range_min" value="50000" /> 204 <param name="range_min" value="50000" />
205 <param name="howToCluster" value="center" />
168 <param name="image_file_format" value="png" /> 206 <param name="image_file_format" value="png" />
169 <output name="outFileName" value="hicAggregateContacts_results1.png" compare="sim_size" delta='35000'/> 207 <output name="outFileName" value="hicAggregateContacts_results1.png" compare="sim_size" />
170 </test> 208 </test>
171 </tests> 209 </tests>
172 <help><![CDATA[ 210 <help><![CDATA[
211
173 Aggregation of Hi-C contacts 212 Aggregation of Hi-C contacts
174 ============================ 213 ============================
175 214
176 **hicAggregateContacts** allows plotting of aggregated Hi-C sub-matrices of a specified list of positions. Positions of interest can for example be binding sites of a specific protein that were determined by ChIP-seq or genetic elements as transcription start sites of active genes. 215 **hicAggregateContacts** allows plotting of aggregated Hi-C sub-matrices of a specified list of positions. Positions of interest can for example be binding sites of a specific protein that were determined by ChIP-seq or genetic elements as transcription start sites of active genes.
177 216
213 252
214 | For more information about HiCExplorer please consider our documentation on readthedocs.io_ 253 | For more information about HiCExplorer please consider our documentation on readthedocs.io_
215 254
216 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html 255 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
217 .. _Colormaps: https://matplotlib.org/examples/color/colormaps_reference.html 256 .. _Colormaps: https://matplotlib.org/examples/color/colormaps_reference.html
218 ]]></help> 257 ]]> </help>
219 <expand macro="citations" /> 258 <expand macro="citations" />
220 </tool> 259 </tool>