Mercurial > repos > bgruening > hicexplorer_hicplotmatrix
comparison hicPlotMatrix.xml @ 9:653c6fead9f9 draft
planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit eec0a4d5a7c5ba4ec0fbd2ead8280c3d143bb9d8
author | iuc |
---|---|
date | Fri, 27 Apr 2018 03:36:47 -0400 |
parents | d398f5373c70 |
children | 40b33e101621 |
comparison
equal
deleted
inserted
replaced
8:d398f5373c70 | 9:653c6fead9f9 |
---|---|
1 <tool id="hicexplorer_hicplotmatrix" name="@BINARY@" version="@WRAPPER_VERSION@.0"> | 1 <tool id="hicexplorer_hicplotmatrix" name="@BINARY@" version="@WRAPPER_VERSION@.0"> |
2 <description>Plots a HiC matrix heatmap</description> | 2 <description>plot a Hi-C contact matrix heatmap</description> |
3 <macros> | 3 <macros> |
4 <token name="@BINARY@">hicPlotMatrix</token> | 4 <token name="@BINARY@">hicPlotMatrix</token> |
5 <import>macros.xml</import> | 5 <import>macros.xml</import> |
6 </macros> | 6 </macros> |
7 <expand macro="requirements" /> | 7 <expand macro="requirements" /> |
11 ln -s $pca_conditional.pca_bigwig pca.bw && | 11 ln -s $pca_conditional.pca_bigwig pca.bw && |
12 #set $pca = '--bigwig pca.bw' | 12 #set $pca = '--bigwig pca.bw' |
13 #elif str($pca_conditional.pca_type) == '': | 13 #elif str($pca_conditional.pca_type) == '': |
14 #set $pca = '' | 14 #set $pca = '' |
15 #end if | 15 #end if |
16 | 16 |
17 @BINARY@ | 17 @BINARY@ |
18 | 18 |
19 --matrix '$matrix_h5_cooler' | 19 --matrix '$matrix_h5_cooler' |
20 | 20 |
21 #if $title and $title is not None: | 21 #if $title and $title is not None: |
66 </command> | 66 </command> |
67 <inputs> | 67 <inputs> |
68 <expand macro='matrix_h5_cooler_macro' /> | 68 <expand macro='matrix_h5_cooler_macro' /> |
69 | 69 |
70 <param argument="--title" type="text" optional="true" label="Plot title"/> | 70 <param argument="--title" type="text" optional="true" label="Plot title"/> |
71 <param argument="--scoreName" type="text" optional="true" label="Score name"/> | 71 <param argument="--scoreName" type="text" optional="true" label="Score name" help="The label for the heatmap legend."/> |
72 <param argument="--perChromosome" type="boolean" truevalue="--perChromosome" falsevalue="" checked="false" | 72 <param argument="--perChromosome" type="boolean" truevalue="--perChromosome" falsevalue="" checked="false" |
73 label="Plot per chromosome" | 73 label="Plot per chromosome" |
74 help="Instead of plotting the whole matrix each chromosome is plotted next to the other. This parameter is not compatible with --region" /> | 74 help="Instead of plotting the whole matrix each chromosome is plotted next to the other. This parameter is not compatible with --region" /> |
75 <param argument="--clearMaskedBins" type="boolean" truevalue="--clearMaskedBins" falsevalue="" checked="false" | 75 <param argument="--clearMaskedBins" type="boolean" truevalue="--clearMaskedBins" falsevalue="" checked="false" |
76 label="Remove masked bins from the matrix" /> | 76 label="Remove masked bins from the matrix" /> |
84 | 84 |
85 <param argument="--region" type="text" optional="True" label="Plot only this region" | 85 <param argument="--region" type="text" optional="True" label="Plot only this region" |
86 help="The format is chr:start-end The plotted region contains the main diagonal and is symmetric unless --region2 is given"/> | 86 help="The format is chr:start-end The plotted region contains the main diagonal and is symmetric unless --region2 is given"/> |
87 <param argument="--region2" type="text" optional="True" label="Region two to plot" | 87 <param argument="--region2" type="text" optional="True" label="Region two to plot" |
88 help="If given then only the region defined by --region and --region2 is plotted. The format is the same as --region"/> | 88 help="If given then only the region defined by --region and --region2 is plotted. The format is the same as --region"/> |
89 <param argument="--log1p" type="boolean" truevalue="--log1p" falsevalue="" checked="false" label="Plot the log1p of the matrix values."/> | 89 <param argument="--log1p" type="boolean" truevalue="--log1p" falsevalue="" checked="false" label="Plot the log1p of the matrix values (log(Hi-C contacts+1)). This option is recommended."/> |
90 <param argument="--log" type="boolean" truevalue="--log" falsevalue="" checked="false" label="Plot the log of the matrix values."/> | 90 <param argument="--log" type="boolean" truevalue="--log" falsevalue="" checked="false" label="Plot the log of the matrix values. (log(Hi-C contacts))"/> |
91 | 91 |
92 <expand macro="colormap" /> | 92 <expand macro="colormap" /> |
93 | 93 |
94 <param argument="--vMin" type="float" optional="true" label="vMin"/> | 94 <param argument="--vMin" type="float" optional="true" label="vMin" help="Minimum value of the plotted score."/> |
95 <param argument="--vMax" type="float" optional="true" label="vMax"/> | 95 <param argument="--vMax" type="float" optional="true" label="vMax" help="Maximum value of the plotted score."/> |
96 | 96 |
97 <conditional name="pca_conditional"> | 97 <conditional name="pca_conditional"> |
98 <param name='pca_type' label='Datatype of eigenvector file' type='select'> | 98 <param name='pca_type' label='Datatype of eigenvector file' type='select'> |
99 <option value='' selected="true"></option> | 99 <option value='' selected="true"></option> |
100 <option value='bigwig'>bigwig</option> | 100 <option value='bigwig'>bigwig</option> |
101 </param> | 101 </param> |
102 <when value='' /> | 102 <when value='' /> |
103 <when value='bigwig'> | 103 <when value='bigwig'> |
104 <param name='pca_bigwig' type="data" format="bigwig" | 104 <param name='pca_bigwig' type="data" format="bigwig" |
105 label="Eigenvector file"/> | 105 label="Eigenvector file"/> |
106 </when> | 106 </when> |
107 </conditional> | 107 </conditional> |
108 <param name="image_file_format" type="select" label="Image output format"> | 108 <param name="image_file_format" type="select" label="Image output format"> |
109 <option value="png" selected="True">png</option> | 109 <option value="png" selected="True">png</option> |
110 <option value="svg">svg</option> | 110 <option value="svg">svg</option> |
111 </param> | 111 </param> |
112 </inputs> | 112 </inputs> |
113 <outputs> | 113 <outputs> |
114 <data format="png" name="outFileName" from_work_dir="plot" label="${tool.name} on ${on_string}"> | 114 <data format="png" name="outFileName" from_work_dir="plot" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: Plot"> |
115 <change_format> | 115 <change_format> |
116 <when input="image_file_format" value="svg" format="svg" /> | 116 <when input="image_file_format" value="svg" format="svg" /> |
117 </change_format> | 117 </change_format> |
118 </data> | 118 </data> |
119 </outputs> | 119 </outputs> |
156 <conditional name="pca_conditional"> | 156 <conditional name="pca_conditional"> |
157 <param name="pca_type" value='bigwig'/> | 157 <param name="pca_type" value='bigwig'/> |
158 <param name="pca_bigwig" value="pca1.bw"/> | 158 <param name="pca_bigwig" value="pca1.bw"/> |
159 </conditional> | 159 </conditional> |
160 <param name='colormap' value='hot'/> | 160 <param name='colormap' value='hot'/> |
161 | 161 |
162 <param name="image_file_format" value="svg" /> | 162 <param name="image_file_format" value="svg" /> |
163 <output name="outFileName" file="small_matrix_50kb_pearson_pca1_plot.svg" ftype="svg" compare="sim_size" delta='35000'/> | 163 <output name="outFileName" file="small_matrix_50kb_pearson_pca1_plot.svg" ftype="svg" compare="sim_size" delta='35000'/> |
164 </test> | 164 </test> |
165 </tests> | 165 </tests> |
166 <help><![CDATA[ | 166 <help><![CDATA[ |
167 Contact matrix plot | 167 Contact matrix plot |
168 ======================= | 168 ======================= |
169 | 169 |
170 ``hicPlotMatrix`` is a visualization tool for a contact matrix. It supports to plot the whole contact matrix, one or more chromosomes, a region or two regions against each other. | 170 **hicPlotMatrix** is a visualization tool for Hi-C contact matrices. It supports to plot genome-wide contact matrices, one or multiple chromosomes, a region or two regions against each other. |
171 Additional it can plot the result of a principal component analysis to have a better understanding of A / B compartments. | 171 Additionally it can plot the result of a principal component analysis obtained by ``hicPCA`` to have a better understanding of A / B compartments. |
172 | 172 |
173 Input | 173 _________________ |
174 | |
175 Usage | |
174 ----- | 176 ----- |
175 | 177 |
176 Parameters | 178 This tool can be used on any h5 or cool Hi-C contact matrix. It is noteworthy that for comparisons of 2 matrices or more, they must all have the same or similar number of contacts. |
177 __________ | 179 |
178 - the contact matrix: h5 or cool file format. | 180 _________________ |
179 - A title for the plot | |
180 - Score name | |
181 - per chromosome | |
182 - The chromosomes to include in the plot. | |
183 - What to show: | |
184 - The region(s) to plot. This parameter overrides 'chromosome'. If either 'chromosomes' or 'region' is given the full contact matrix is used. | |
185 - log / log1p of the values: It is recommended to use log1p. | |
186 - Colormaps_ for the heatmap. | |
187 - vMin / vMax | |
188 - principal component: a bigwig file containing eigenvector information | |
189 | 181 |
190 Output | 182 Output |
191 ------ | 183 ------ |
192 | 184 |
193 The contact matrix plotted for chromosome 1. | 185 **hicPlotMatrix** outputs a heatmap of a contact matrix in either png or svg format, below is an example of such a plot: |
194 | 186 |
195 .. image:: SRR027956.svg | 187 .. image:: $PATH_TO_IMAGES/hicPlotMatrix.png |
196 :width: 60% | 188 :width: 50% |
197 | 189 |
198 | 190 Contact matrix of *Drosophila melanogaster* embryos visualized using **hicPlotMatrix**. Hi-C matrix bins were merged to a 25 kb bin size using ``hicMergeMatrixBins`` and the matrix has then been corrected using ``hicCorrectMatrix`` before plotting. |
199 The contact matrix used with ``--perChr`` and the first eigenvector from the tool ``hicPCA``. For this plot a pearson correlated matrix was used which is computed by creating first an observed / expected matrix and second a pearson correlation matrix. These matricies can be computed with ``hicChangeMatrixType``. The used Hi-C data were published by `Lieberman-Aiden <https://doi.org/10.1126/science.1181369>`_ in 2009, `GSE18199 <https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE18199>`_. | 191 |
192 Another example is available below using Hi-C data published by `Lieberman-Aiden <https://doi.org/10.1126/science.1181369>`_ in 2009, (`GSE18199 <https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE18199>`_). A Hi-C contact matrix has been plotted with the ``--perChr`` option and the first eigenvector (pca1) computed by ``hicPCA``. For this plot a pearson correlated matrix was used, which is computed by first creating an observed / expected matrix and then a pearson correlation matrix with ``hicTransform``. | |
200 | 193 |
201 .. image:: $PATH_TO_IMAGES/SRR0279XX_perChr_eigenvector1.png | 194 .. image:: $PATH_TO_IMAGES/SRR0279XX_perChr_eigenvector1.png |
202 :width: 70 % | 195 :width: 70 % |
196 | |
197 _________________ | |
203 | 198 |
204 | For more information about HiCExplorer please consider our documentation on readthedocs.io_ | 199 | For more information about HiCExplorer please consider our documentation on readthedocs.io_ |
205 | 200 |
206 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html | 201 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html |
207 .. _Colormaps: https://matplotlib.org/examples/color/colormaps_reference.html | 202 .. _Colormaps: https://matplotlib.org/examples/color/colormaps_reference.html |
208 ]]></help> | 203 ]]></help> |
209 <expand macro="citations" /> | 204 <expand macro="citations" /> |
210 </tool> | 205 </tool> |
211 |