Mercurial > repos > bgruening > hicexplorer_hicplotmatrix
comparison hicPlotMatrix.xml @ 5:c3703afea1b1 draft
planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 80462804e4fd7deafbcf8e8c5283cc7a98fa7dd5
author | bgruening |
---|---|
date | Sat, 30 Dec 2017 09:21:50 -0500 |
parents | fd5e51d2b558 |
children | f93a78bc045e |
comparison
equal
deleted
inserted
replaced
4:fd5e51d2b558 | 5:c3703afea1b1 |
---|---|
1 <tool id="hicexplorer_hicplotmatrix" name="@BINARY@" version="@WRAPPER_VERSION@.1"> | 1 <tool id="hicexplorer_hicplotmatrix" name="@BINARY@" version="@WRAPPER_VERSION@.0"> |
2 <description>Plots a HiC matrix heatmap</description> | 2 <description>Plots a HiC 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" /> |
8 <command detect_errors="exit_code"><![CDATA[ | 8 <command detect_errors="exit_code"><![CDATA[ |
9 ln -s '$matrix' input_matrix.h5 && | 9 |
10 | 10 #if str($pca_conditional.pca_type) == 'bedgraph': |
11 ln -s $pca_conditional.pca_bedgraph pca.bedgraph && | |
12 #set $pca = '--pca pca.bedgraph' | |
13 #elif str($pca_conditional.pca_type) == 'bigwig': | |
14 ln -s $pca_conditional.pca_bigwig pca.bw && | |
15 #set $pca = '--pca pca.bw' | |
16 #elif str($pca_conditional.pca_type) == '': | |
17 #set $pca = '' | |
18 #end if | |
19 | |
11 @BINARY@ | 20 @BINARY@ |
12 | 21 |
13 --matrix input_matrix.h5 | 22 --matrix '$matrix_h5_cooler' |
14 | 23 |
15 #if $title and $title is not None: | 24 #if $title and $title is not None: |
16 --title '$title' | 25 --title '$title' |
17 #end if | 26 #end if |
18 | 27 |
19 #if $scoreName and $scoreName is not None: | 28 #if $scoreName and $scoreName is not None: |
20 --scoreName '$scoreName' | 29 --scoreName '$scoreName' |
21 #end if | 30 #end if |
22 | 31 |
23 | |
24 --outFileName plot.$image_file_format | 32 --outFileName plot.$image_file_format |
25 | 33 |
26 $perChromosome | 34 $perChromosome |
27 $clearMaskedBins | 35 $clearMaskedBins |
28 | |
29 --whatToShow heatmap | |
30 | |
31 | 36 |
32 ## special: --chromosomeOrder is optional, but if given needs at least one argument | 37 ## special: --chromosomeOrder is optional, but if given needs at least one argument |
33 #set chroms = '" "'.join([ str($var.chromosome) for $var in $chromosomeOrder ]) | 38 #set chroms = '" "'.join([ str($var.chromosome) for $var in $chromosomeOrder ]) |
34 #if chroms: | 39 #if chroms: |
35 --chromosomeOrder '$chroms' | 40 --chromosomeOrder '$chroms' |
55 | 60 |
56 #if $vMax: | 61 #if $vMax: |
57 --vMax $vMax | 62 --vMax $vMax |
58 #end if | 63 #end if |
59 | 64 |
65 $pca | |
66 | |
60 && mv plot.$image_file_format plot | 67 && mv plot.$image_file_format plot |
61 ]]> | 68 ]]> |
62 </command> | 69 </command> |
63 <inputs> | 70 <inputs> |
64 <param argument="--matrix" type="data" format="h5" label="Hi-C matrix to plot"/> | 71 <expand macro='matrix_h5_cooler_macro' /> |
72 | |
65 <param argument="--title" type="text" optional="true" label="Plot title"/> | 73 <param argument="--title" type="text" optional="true" label="Plot title"/> |
66 <param argument="--scoreName" type="text" optional="true" label="Score name"/> | 74 <param argument="--scoreName" type="text" optional="true" label="Score name"/> |
67 <param argument="--perChromosome" type="boolean" truevalue="--perChromosome" falsevalue="" checked="false" | 75 <param argument="--perChromosome" type="boolean" truevalue="--perChromosome" falsevalue="" checked="false" |
68 label="Plot per chromosome" | 76 label="Plot per chromosome" |
69 help="Instead of plotting the whole matrix each chromosome is plotted next to the other. This parameter is not compatible with --region" /> | 77 help="Instead of plotting the whole matrix each chromosome is plotted next to the other. This parameter is not compatible with --region" /> |
86 | 94 |
87 <expand macro="colormap" /> | 95 <expand macro="colormap" /> |
88 | 96 |
89 <param argument="--vMin" type="float" optional="true" label="vMin"/> | 97 <param argument="--vMin" type="float" optional="true" label="vMin"/> |
90 <param argument="--vMax" type="float" optional="true" label="vMax"/> | 98 <param argument="--vMax" type="float" optional="true" label="vMax"/> |
99 | |
100 <conditional name="pca_conditional"> | |
101 <param name='pca_type' label='Datatype of eigenvector file' type='select'> | |
102 <option value='' selected="true"></option> | |
103 <option value='bedgraph'>bedgraph</option> | |
104 <option value='bigwig'>bigwig</option> | |
105 </param> | |
106 <when value='' /> | |
107 <when value='bedgraph'> | |
108 <param name='pca_bedgraph' type="data" format="bedgraph" | |
109 label="Eigenvector file"/> | |
110 </when> | |
111 <when value='bigwig'> | |
112 <param name='pca_bigwig' type="data" format="bigwig" | |
113 label="Eigenvector file"/> | |
114 </when> | |
115 </conditional> | |
91 <param name="image_file_format" type="select" label="Image output format"> | 116 <param name="image_file_format" type="select" label="Image output format"> |
92 <option value="png" selected="True">png</option> | 117 <option value="png" selected="True">png</option> |
93 <option value="svg">svg</option> | 118 <option value="svg">svg</option> |
94 </param> | 119 </param> |
95 </inputs> | 120 </inputs> |
100 </change_format> | 125 </change_format> |
101 </data> | 126 </data> |
102 </outputs> | 127 </outputs> |
103 <tests> | 128 <tests> |
104 <test> | 129 <test> |
105 <param name="matrix" ftype="h5" value="Li_et_al_2015.h5"/> | 130 <param name="matrix_h5_cooler" value="Li_et_al_2015.h5"/> |
131 <conditional name="pca_conditional"> | |
132 <param name="pca_type" value=''/> | |
133 </conditional> | |
106 <param name="region" value="chrX:3000000-3500000"/> | 134 <param name="region" value="chrX:3000000-3500000"/> |
107 <param name="region2" value="chrX:3100000-3600000"/> | 135 <param name="region2" value="chrX:3100000-3600000"/> |
108 <param name="log1p" value="True"/> | 136 <param name="log1p" value="True"/> |
109 <param name="clearMaskedBins" value="True"/> | 137 <param name="clearMaskedBins" value="True"/> |
110 <!-- <param name="whatToShow_select" value="heatmap"/> --> | |
111 <param name="image_file_format" value="png" /> | 138 <param name="image_file_format" value="png" /> |
112 <output name="outFileName" file="master_matrix_plot.png" ftype="png" compare="sim_size"/> | 139 <output name="outFileName" file="master_matrix_plot.png" ftype="png" compare="sim_size"/> |
140 </test> | |
141 <test> | |
142 <param name="matrix_h5_cooler" value="Li_et_al_2015.cool"/> | |
143 <conditional name="pca_conditional"> | |
144 <param name="pca_type" value=''/> | |
145 </conditional> | |
146 <param name="region" value="X:3000000-3500000"/> | |
147 <param name="image_file_format" value="png" /> | |
148 <output name="outFileName" file="Li_chrX30-35_cool.png" ftype="png" compare="sim_size"/> | |
149 </test> | |
150 <test> | |
151 <param name="matrix_h5_cooler" value="pearson_small_50kb.cool"/> | |
152 <param name="perChromosome" value="True"/> | |
153 <conditional name="pca_conditional"> | |
154 <param name="pca_type" value='bedgraph'/> | |
155 <param name="pca_bedgraph" value="pca1.bedgraph"/> | |
156 </conditional> | |
157 <param name='colormap' value='hot'/> | |
158 <param name="image_file_format" value="svg" /> | |
159 <output name="outFileName" file="small_matrix_50kb_pearson_pca1_plot.svg" ftype="svg" compare="sim_size" delta='35000'/> | |
160 </test> | |
161 <test> | |
162 <param name="matrix_h5_cooler" value="pearson_small_50kb.h5"/> | |
163 <param name="perChromosome" value="True"/> | |
164 <conditional name="pca_conditional"> | |
165 <param name="pca_type" value='bigwig'/> | |
166 <param name="pca_bigwig" value="pca1.bw"/> | |
167 </conditional> | |
168 <param name='colormap' value='hot'/> | |
169 | |
170 <param name="image_file_format" value="svg" /> | |
171 <output name="outFileName" file="small_matrix_50kb_pearson_pca1_plot.svg" ftype="svg" compare="sim_size" delta='35000'/> | |
113 </test> | 172 </test> |
114 </tests> | 173 </tests> |
115 <help><![CDATA[ | 174 <help><![CDATA[ |
116 Contact matrix plot | 175 Contact matrix plot |
117 ======================= | 176 ======================= |
118 | 177 |
119 ``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. | 178 ``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. |
120 | 179 Additional it can plot the result of a principal component analysis to have a better understanding of A / B compartments. |
121 .. Additional it can plot the result of a principal component analysis to have a better understanding of A / B compartments. | |
122 | 180 |
123 Input | 181 Input |
124 ----- | 182 ----- |
125 | 183 |
126 Parameters | 184 Parameters |
127 __________ | 185 __________ |
128 - the contact matrix | 186 - the contact matrix: h5 or cool file format. |
129 - A title for the plot | 187 - A title for the plot |
130 - Score name | 188 - Score name |
131 - per chromosome | 189 - per chromosome |
132 - The chromosomes to include in the plot. | 190 - The chromosomes to include in the plot. |
133 - What to show: | 191 - What to show: |
134 - The region(s) to plot. This parameter overrides 'chromosome'. If either 'chromosomes' or 'region' is given the full contact matrix is used. | 192 - The region(s) to plot. This parameter overrides 'chromosome'. If either 'chromosomes' or 'region' is given the full contact matrix is used. |
135 - log / log1p of the values: It is recommended to use log1p. | 193 - log / log1p of the values: It is recommended to use log1p. |
136 - Colormaps_ for the heatmap. | 194 - Colormaps_ for the heatmap. |
137 - vMin / vMax | 195 - vMin / vMax |
138 | 196 - principal component: a bedgraph or bigwig file containing eigenvector information |
139 .. - principal component: a bedgraph file | |
140 | 197 |
141 Output | 198 Output |
142 ------ | 199 ------ |
143 | 200 |
144 The contact matrix plotted for chromosome 1. | 201 The contact matrix plotted for chromosome 1. |
145 | 202 |
146 .. image:: SRR027956.svg | 203 .. image:: SRR027956.svg |
147 :width: 70% | 204 :width: 60% |
148 | 205 |
149 | 206 |
150 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>`_. | 207 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>`_. |
151 | 208 |
152 .. image:: $PATH_TO_IMAGES/SRR0279XX_perChr_eigenvector1.png | 209 .. image:: $PATH_TO_IMAGES/SRR0279XX_perChr_eigenvector1.png |