Mercurial > repos > bgruening > hicexplorer_hicpca
comparison hicPCA.xml @ 9:942b71f45588 draft
"planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 91a0182476a7fc26be7bef1677790518c4e88348-dirty"
author | bgruening |
---|---|
date | Mon, 16 Dec 2019 13:11:35 +0000 |
parents | f1d44f593337 |
children | b0f5c30425c2 |
comparison
equal
deleted
inserted
replaced
8:f1d44f593337 | 9:942b71f45588 |
---|---|
4 <token name="@BINARY@">hicPCA</token> | 4 <token name="@BINARY@">hicPCA</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_h5_cooler' 'matrix.$matrix_h5_cooler.ext' && | |
10 @BINARY@ --matrix 'matrix.$matrix_h5_cooler.ext' | |
11 | 9 |
12 @CHROMOSOME_LIST@ | 10 hicPCA --matrix '$matrix_h5_cooler' |
13 | 11 |
14 --outputFileName pca1.$outputFormat pca2.$outputFormat | 12 --outputFileName pca1.$outputFormat pca2.$outputFormat |
15 --format $outputFormat | 13 --format $outputFormat |
16 | 14 |
17 #if $norm: | |
18 $norm | |
19 #end if | |
20 | |
21 #if $extra_track_conditional.extra_track_selection == 'gene_density': | |
22 --extraTrack '$extra_track_conditional.extraTrack' | |
23 #elif $extra_track_conditional.extra_track_selection == 'histon_mark': | |
24 --extraTrack '$extra_track_conditional.extraTrack' | |
25 --histonMarkType '$extra_track_conditional.histonMarkType' | |
26 #end if | |
27 | |
28 #if $pearsonMatrix: | |
29 --pearsonMatrix pearson.$matrix_h5_cooler.ext | |
30 #end if | |
31 | |
32 #if $obsexpMatrix: | |
33 --obsexpMatrix obsexp.$matrix_h5_cooler.ext | |
34 #end if | |
35 | |
36 && mv pca1.$outputFormat pca1 | 15 && mv pca1.$outputFormat pca1 |
37 && mv pca2.$outputFormat pca2 | 16 && mv pca2.$outputFormat pca2 |
38 #if $pearsonMatrix: | |
39 && mv pearson.$matrix_h5_cooler.ext pearson | |
40 #end if | |
41 | |
42 #if $obsexpMatrix: | |
43 && mv obsexp.$matrix_h5_cooler.ext obsexp | |
44 #end if | |
45 | 17 |
46 ]]> | 18 ]]> |
47 </command> | 19 </command> |
48 <inputs> | 20 <inputs> |
49 <expand macro='matrix_h5_cooler_macro' /> | 21 <expand macro='matrix_h5_cooler_macro' /> |
50 <param name='outputFormat' type='select' label="Output file format"> | 22 <param name='outputFormat' type='select' label="Output file format"> |
51 <option value='bigwig' selected="true">bigwig</option> | 23 <option value='bigwig' selected="true">bigwig</option> |
52 <option value="bedgraph">bedgraph</option> | 24 <option value="bedgraph">bedgraph</option> |
53 </param> | 25 </param> |
54 | 26 |
55 <expand macro="chromosome_list" /> | |
56 | |
57 <param name='norm' type='boolean' truevalue='--norm' label='Use different expected value computation'/> | |
58 | |
59 <conditional name="extra_track_conditional"> | |
60 <param name='extra_track_selection' label='Extra track type' type='select'> | |
61 <option value='' selected='true'>No track</option> | |
62 <option value='gene_density'>Gene density</option> | |
63 <option value='histon_mark'>Histon mark coverage</option> | |
64 </param> | |
65 <when value='gene_density' > | |
66 <param name='extraTrack' type='data' format='bed' label='Correlate PCA with e.g. gene density or histon marks to flip sign'/> | |
67 </when> | |
68 <when value='histon_mark'> | |
69 <param name='extraTrack' type='data' format='bed' label='Correlate PCA with e.g. gene density or histon marks to flip sign'/> | |
70 <param name='histonMarkType' type='select' label="Histon mark type"> | |
71 <option value='active' selected="true">active</option> | |
72 <option value="inactive">inactive</option> | |
73 </param> | |
74 </when> | |
75 <when value='' /> | |
76 </conditional> | |
77 | |
78 <param name='pearsonMatrix' type='boolean' truevalue='--pearsonMatrix' falsevalue='' label='Return internally used Pearson matrix'/> | |
79 <param name='obsexpMatrix' type='boolean' truevalue='--obsexpMatrix' falsevalue='' label='Return internally used observed / expected matrix'/> | |
80 | |
81 </inputs> | 27 </inputs> |
82 <outputs> | 28 <outputs> |
29 | |
83 <data name="pca1" from_work_dir="pca1" format="bigwig" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: PC1"> | 30 <data name="pca1" from_work_dir="pca1" format="bigwig" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: PC1"> |
31 <filter>outputFormat == 'bigwig'</filter> | |
84 <change_format> | 32 <change_format> |
85 <when input="outputFormat" value="bedgraph" format="bedgraph" /> | 33 <when input="outputFormat" value="bedgraph" format="bedgraph" /> |
86 </change_format> | 34 </change_format> |
87 </data> | 35 </data> |
88 <data name="pca2" from_work_dir="pca2" format="bigwig" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: PC2"> | 36 <data name="pca2" from_work_dir="pca2" format="bigwig" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: PC2"> |
89 <change_format> | 37 <change_format> |
90 <when input="outputFormat" value="bedgraph" format="bedgraph" /> | 38 <when input="outputFormat" value="bedgraph" format="bedgraph" /> |
91 </change_format> | 39 </change_format> |
92 </data> | 40 </data> |
93 | 41 |
94 <data name="pearson_outfile" from_work_dir="pearson" format="cool"> | 42 |
95 <filter>pearsonMatrix</filter> | |
96 <change_format> | |
97 <when input_dataset="matrix_h5_cooler" attribute="ext" value="h5" format="h5"/> | |
98 </change_format> | |
99 </data> | |
100 <data name="obsexp_outfile" from_work_dir="obsexp" format="cool"> | |
101 <filter>obsexpMatrix</filter> | |
102 <change_format> | |
103 <when input_dataset="matrix_h5_cooler" attribute="ext" value="h5" format="h5"/> | |
104 </change_format> | |
105 </data> | |
106 </outputs> | 43 </outputs> |
107 <tests> | 44 <tests> |
108 <test> | 45 <test> |
109 <param name="matrix_h5_cooler" value="small_test_matrix.cool"/> | 46 <param name="matrix_h5_cooler" value="small_test_matrix_50kb_res.h5"/> |
110 <param name="outputFormat" value="bigwig" /> | 47 <param name="outputFormat" value="bedgraph" /> |
111 <conditional name="extra_track_conditional"> | 48 <output name="pca1" file="pca1.bedgraph" ftype="bedgraph" compare="sim_size"/> |
112 <param name="extra_track_selection" value=""/> | 49 <output name="pca2" file="pca2.bedgraph" ftype="bedgraph" compare="sim_size"/> |
113 </conditional> | |
114 | |
115 <output name="pca1" file="hicPCA/pca1_test1.bw" ftype="bigwig" compare="sim_size" delta='40000'/> | |
116 <output name="pca2" file="hicPCA/pca2_test1.bw" ftype="bigwig" compare="sim_size" delta='40000'/> | |
117 </test> | 50 </test> |
118 <test> | 51 <test> |
119 <param name="matrix_h5_cooler" value="small_test_matrix.h5"/> | 52 <param name="matrix_h5_cooler" value="small_test_matrix_50kb_res.h5"/> |
120 <param name="outputFormat" value="bigwig" /> | |
121 <conditional name="extra_track_conditional"> | |
122 <param name="extra_track_selection" value="gene_density"/> | |
123 <param name="extraTrack" value="dm3_genes.bed.gz" /> | |
124 </conditional> | |
125 | |
126 <repeat name="chromosome_list"> | |
127 <param name="chromosomes" value="chrX"/> | |
128 </repeat> | |
129 <repeat name="chromosome_list"> | |
130 <param name="chromosomes" value="chrXHet"/> | |
131 </repeat> | |
132 | |
133 <output name="pca1" file="hicPCA/pca1_test2.bw" ftype="bigwig" compare="sim_size" delta='40000'/> | |
134 <output name="pca2" file="hicPCA/pca2_test2.bw" ftype="bigwig" compare="sim_size" delta='40000'/> | |
135 </test> | |
136 <test> | |
137 <param name="matrix_h5_cooler" value="small_test_matrix.h5"/> | |
138 | 53 |
139 <param name="outputFormat" value="bigwig" /> | 54 <param name="outputFormat" value="bigwig" /> |
140 <conditional name="extra_track_conditional"> | 55 <output name="pca1" file="pca1.bw" ftype="bigwig" compare="sim_size"/> |
141 <param name="extra_track_selection" value=""/> | 56 <output name="pca2" file="pca2.bw" ftype="bigwig" compare="sim_size"/> |
142 </conditional> | |
143 <param name='norm' value='True'/> | |
144 <param name='pearsonMatrix' value='True'/> | |
145 <param name='obsexpMatrix' value='True'/> | |
146 | |
147 <repeat name="chromosome_list"> | |
148 <param name="chromosomes" value="chrX"/> | |
149 </repeat> | |
150 <repeat name="chromosome_list"> | |
151 <param name="chromosomes" value="chrXHet"/> | |
152 </repeat> | |
153 | |
154 <output name="pca1" file="hicPCA/pca1_test3.bw" ftype="bigwig" compare="sim_size" delta='40000'/> | |
155 <output name="pca2" file="hicPCA/pca2_test3.bw" ftype="bigwig" compare="sim_size" delta='40000'/> | |
156 | |
157 <output name="pearson_outfile" ftype="h5"> | |
158 <assert_contents> | |
159 <has_h5_keys keys='intervals,matrix'/> | |
160 </assert_contents> | |
161 </output> | |
162 <output name="obsexp_outfile" ftype="h5"> | |
163 <assert_contents> | |
164 <has_h5_keys keys='intervals,matrix'/> | |
165 </assert_contents> | |
166 </output> | |
167 </test> | 57 </test> |
168 </tests> | 58 </tests> |
169 <help><![CDATA[ | 59 <help><![CDATA[ |
170 Principal component analysis | 60 Principal component analysis |
171 ============================ | 61 ============================ |
186 | 76 |
187 _________________ | 77 _________________ |
188 | 78 |
189 Output | 79 Output |
190 ------ | 80 ------ |
191 Two files are outputed by **hicPCA**, one with the first (pca1) and one with the second (pca2) eigenvector as bigwig or bedgraph. These files can be plotted alongside Hi-C heatmaps, gene density or external datasets such as open chromatin or histone marks enrichment using ``pyGenomeTracks`` or ``hicPlotMatrix``. | 81 Two files are outputed by **hicPCA**, one with the first (pca1) and one with the second (pca2) eigenvector as bigwig or bedgraph. These files can be plotted alongside Hi-C heatmaps, gene density or external datasets such as open chromatin or histone marks enrichment using ``hicPlotTADs`` or ``hicPlotMatrix``. |
192 | 82 |
193 For example, below you can find a ``hicPlotMatrix`` of the Pearson correlation matrix derived from a contact matrix for chromosome 6 in mouse computed with ``hicTransform`` (which is part of A/B compartments computation). The optional data track at the bottom shows the first eigenvector for A/B compartment obtained using **hicPCA**. | 83 For example, below you can find a ``hicPlotMatrix`` of the Pearson correlation matrix derived from a contact matrix for chromosome 6 in mouse computed with ``hicTransform`` (which is part of A/B compartments computation). The optional data track at the bottom shows the first eigenvector for A/B compartment obtained using **hicPCA**. |
194 | 84 |
195 .. image:: $PATH_TO_IMAGES/hicPCA.png | 85 .. image:: $PATH_TO_IMAGES/hicPCA.png |
196 :scale: 35 % | 86 :scale: 35 % |