Mercurial > repos > bgruening > hicexplorer_hicpca
comparison hicPCA.xml @ 10:b0f5c30425c2 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit fa19d3b6a9d0160a13f8d1e4a99f20c4dbe937b2"
author | iuc |
---|---|
date | Mon, 16 Dec 2019 22:42:20 +0000 |
parents | 942b71f45588 |
children | 04d1c3d44a11 |
comparison
equal
deleted
inserted
replaced
9:942b71f45588 | 10:b0f5c30425c2 |
---|---|
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 | 9 ln -s '$matrix_h5_cooler' 'matrix.$matrix_h5_cooler.ext' && |
10 hicPCA --matrix '$matrix_h5_cooler' | 10 @BINARY@ --matrix 'matrix.$matrix_h5_cooler.ext' |
11 | |
12 @CHROMOSOME_LIST@ | |
11 | 13 |
12 --outputFileName pca1.$outputFormat pca2.$outputFormat | 14 --outputFileName pca1.$outputFormat pca2.$outputFormat |
13 --format $outputFormat | 15 --format $outputFormat |
14 | 16 |
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 | |
15 && mv pca1.$outputFormat pca1 | 36 && mv pca1.$outputFormat pca1 |
16 && mv pca2.$outputFormat pca2 | 37 && 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 | |
17 | 45 |
18 ]]> | 46 ]]> |
19 </command> | 47 </command> |
20 <inputs> | 48 <inputs> |
21 <expand macro='matrix_h5_cooler_macro' /> | 49 <expand macro='matrix_h5_cooler_macro' /> |
22 <param name='outputFormat' type='select' label="Output file format"> | 50 <param name='outputFormat' type='select' label="Output file format"> |
23 <option value='bigwig' selected="true">bigwig</option> | 51 <option value='bigwig' selected="true">bigwig</option> |
24 <option value="bedgraph">bedgraph</option> | 52 <option value="bedgraph">bedgraph</option> |
25 </param> | 53 </param> |
26 | 54 |
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 | |
27 </inputs> | 81 </inputs> |
28 <outputs> | 82 <outputs> |
29 | |
30 <data name="pca1" from_work_dir="pca1" format="bigwig" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: PC1"> | 83 <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> | |
32 <change_format> | 84 <change_format> |
33 <when input="outputFormat" value="bedgraph" format="bedgraph" /> | 85 <when input="outputFormat" value="bedgraph" format="bedgraph" /> |
34 </change_format> | 86 </change_format> |
35 </data> | 87 </data> |
36 <data name="pca2" from_work_dir="pca2" format="bigwig" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: PC2"> | 88 <data name="pca2" from_work_dir="pca2" format="bigwig" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: PC2"> |
37 <change_format> | 89 <change_format> |
38 <when input="outputFormat" value="bedgraph" format="bedgraph" /> | 90 <when input="outputFormat" value="bedgraph" format="bedgraph" /> |
39 </change_format> | 91 </change_format> |
40 </data> | 92 </data> |
41 | 93 |
42 | 94 <data name="pearson_outfile" from_work_dir="pearson" format="cool"> |
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> | |
43 </outputs> | 106 </outputs> |
44 <tests> | 107 <tests> |
45 <test> | 108 <test> |
46 <param name="matrix_h5_cooler" value="small_test_matrix_50kb_res.h5"/> | 109 <param name="matrix_h5_cooler" value="small_test_matrix.cool"/> |
47 <param name="outputFormat" value="bedgraph" /> | 110 <param name="outputFormat" value="bigwig" /> |
48 <output name="pca1" file="pca1.bedgraph" ftype="bedgraph" compare="sim_size"/> | 111 <conditional name="extra_track_conditional"> |
49 <output name="pca2" file="pca2.bedgraph" ftype="bedgraph" compare="sim_size"/> | 112 <param name="extra_track_selection" value=""/> |
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'/> | |
50 </test> | 117 </test> |
51 <test> | 118 <test> |
52 <param name="matrix_h5_cooler" value="small_test_matrix_50kb_res.h5"/> | 119 <param name="matrix_h5_cooler" value="small_test_matrix.h5"/> |
53 | |
54 <param name="outputFormat" value="bigwig" /> | 120 <param name="outputFormat" value="bigwig" /> |
55 <output name="pca1" file="pca1.bw" ftype="bigwig" compare="sim_size"/> | 121 <conditional name="extra_track_conditional"> |
56 <output name="pca2" file="pca2.bw" ftype="bigwig" compare="sim_size"/> | 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 | |
139 <param name="outputFormat" value="bigwig" /> | |
140 <conditional name="extra_track_conditional"> | |
141 <param name="extra_track_selection" value=""/> | |
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> | |
57 </test> | 167 </test> |
58 </tests> | 168 </tests> |
59 <help><![CDATA[ | 169 <help><![CDATA[ |
60 Principal component analysis | 170 Principal component analysis |
61 ============================ | 171 ============================ |
76 | 186 |
77 _________________ | 187 _________________ |
78 | 188 |
79 Output | 189 Output |
80 ------ | 190 ------ |
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``. | 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``. |
82 | 192 |
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**. | 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**. |
84 | 194 |
85 .. image:: $PATH_TO_IMAGES/hicPCA.png | 195 .. image:: $PATH_TO_IMAGES/hicPCA.png |
86 :scale: 35 % | 196 :scale: 35 % |