comparison hicTransform.xml @ 8:ae9cc6dbfaca draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 3b41d687ff30583540d055f6995de00530cca81d-dirty"
author bgruening
date Mon, 16 Dec 2019 15:41:36 -0500
parents 014e59185b0c
children 3f529510975e
comparison
equal deleted inserted replaced
7:014e59185b0c 8:ae9cc6dbfaca
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
10 10 ln -s '$matrix_h5_cooler' 'matrix.$matrix_h5_cooler.ext' &&
11 hicTransform --matrix '$matrix_h5_cooler' 11 @BINARY@ --matrix 'matrix.$matrix_h5_cooler.ext'
12 --method all 12 --method $method_selector
13 --outFileName matrix.$outputFormat 13 --outFileName 'matrix.$matrix_h5_cooler.ext'
14 && mv obs_exp_matrix.$outputFormat obs_exp_matrix 14 && mv 'matrix.$matrix_h5_cooler.ext' matrix
15 && mv pearson_matrix.$outputFormat pearson_matrix
16 && mv covariance_matrix.$outputFormat covariance_matrix
17 ]]> 15 ]]>
18 </command> 16 </command>
19 <inputs> 17 <inputs>
20 <expand macro='matrix_h5_cooler_macro' /> 18 <expand macro='matrix_h5_cooler_macro' />
21 <param name='outputFormat' type='select' label="Output file format"> 19 <param name="method_selector" type="select" label="Choose method to apply">
22 <option value='h5'>HiCExplorer format</option> 20 <option value="obs_exp" selected="True">obs / exp</option>
23 <option value="cool">cool</option> 21 <option value="obs_exp_norm">obs / exp (Homer norm)</option>
22 <option value="obs_exp_non_zero">obs / exp (exclude non-zero from exp)</option>
23 <option value="pearson">pearson</option>
24 <option value="covariance">covariance</option>
24 </param> 25 </param>
25 26
26 </inputs> 27 </inputs>
27 <outputs> 28 <outputs>
28 <data name="obs_exp" from_work_dir="obs_exp_matrix" format="h5" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: Observed/Expected matrix"> 29 <data name="matrix_out" from_work_dir="matrix" format="cool" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: $method_selector">
29 <change_format> 30 <change_format>
30 <when input="outputFormat" value="cool" format="cool"/> 31 <when input_dataset="matrix_h5_cooler" attribute="ext" value="h5" format="h5"/>
31 </change_format> 32 </change_format>
32 </data> 33 </data>
33 <data name="pearson" from_work_dir="pearson_matrix" format="h5" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: Pearson matrix">
34 <change_format>
35 <when input="outputFormat" value="cool" format="cool"/>
36 </change_format>
37 </data>
38 <data name="covariance" from_work_dir="covariance_matrix" format="h5" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: Covariance matrix">
39 <change_format>
40 <when input="outputFormat" value="cool" format="cool"/>
41 </change_format>
42 </data>
43
44 </outputs> 34 </outputs>
45 <tests> 35 <tests>
46 <test> 36 <test>
47 <param name="matrix_h5_cooler" value="small_test_matrix_50kb_res.h5"/> 37 <param name="matrix_h5_cooler" value="small_test_matrix.h5"/>
48 <param name="outputFormat" value="h5" /> 38 <param name='method_selector' value='obs_exp_norm'/>
49 <output name="obs_exp" file="obs_exp_small_50kb.h5" ftype="h5" compare="sim_size"/> 39 <output name="matrix_out" ftype="h5">
50 <output name="pearson" file="pearson_small_50kb.h5" ftype="h5" compare="sim_size" delta="50000"/> 40 <assert_contents>
51 <output name="covariance" file="covariance_small_50kb.h5" ftype="h5" compare="sim_size" delta="150000"/> 41 <has_h5_keys keys='intervals,matrix'/>
52 </test> 42 </assert_contents>
53 <test> 43 </output>
54 <param name="matrix_h5_cooler" value="small_test_matrix_50kb_res.h5"/>
55 <param name="outputFormat" value="cool" />
56 <output name="obs_exp" file="obs_exp_small_50kb.cool" ftype="cool" compare="sim_size"/>
57 <output name="pearson" file="pearson_small_50kb_transform.cool" ftype="cool" compare="sim_size"/>
58 <output name="covariance" file="covariance_small_50kb.cool" ftype="cool" compare="sim_size"/>
59 </test> 44 </test>
60 </tests> 45 </tests>
61 <help><![CDATA[ 46 <help><![CDATA[
62 Transformation of matrix for plotting 47 Transformation of matrix for plotting
63 ===================================== 48 =====================================
64 49
65 **hicTransform** computes three matrices based on one Hi-C contact matrix as input based on the methods determined by `Lieberman-Aiden et al. (2009)`_: 50 **hicTransform** computes a matrix based on one Hi-C contact matrix as input:
66 51
67 - An **observed/expected matrix** obtained "by dividing each entry in the contact matrix by the genome-wide average contact probability for loci at that genomic distance" (`Lieberman-Aiden et al. (2009)`_). This transformation allows to better assess long range interactions. 52 - An **observed/expected matrix** obtained "by dividing each entry in the contact matrix by the genome-wide average contact probability for loci at that genomic distance" (`Lieberman-Aiden et al. (2009)`_). This transformation allows to better assess long range interactions.
53 - An **observed/expected norm matrix** which computes the expected matrix as EXP_i,j = sum(diagonal(i-j)) * sum(row(j)) * sum(row(i)) / sum(matrix)
54 - An **observed/expected non-zero values matrix** which computes the expected matrix as the sum per genomic distance j divided by sum of non-zero contacts: sum(diagonal(j) / number of non-zero elements in diagonal(j)
68 - A **Pearson correlation matrix** obtained by computing the Pearson correlation between each bin based on observed/expected values. This matrix transformation allows to better identify the bins that are entering in contact together, or not, at long ranges, and thus helps defining compartments in the nucleus (``hicPCA``). 55 - A **Pearson correlation matrix** obtained by computing the Pearson correlation between each bin based on observed/expected values. This matrix transformation allows to better identify the bins that are entering in contact together, or not, at long ranges, and thus helps defining compartments in the nucleus (``hicPCA``).
69 - A **covariance matrix**, which is used as a basis for the Principal Component Analysis (PCA) to compute the eigenvectors outputed by **hicTransform**. 56 - A **covariance matrix**, which is used as a basis for the Principal Component Analysis (PCA) to compute the eigenvectors outputed by **hicTransform**.
70 57
71 These three matrices can be used with ``hicPlotMatrix`` or ``hicPlotTADs`` for a visualization of the A / B compartment analysis. 58 These matrices can be used with ``hicPlotMatrix`` or ``pyGenomeTracks`` for a visualization of the A / B compartment analysis.
72 59
73 _________________ 60 _________________
74 61
75 Output 62 Output
76 ------ 63 ------
77 64
78 From one Hi-C contact matrix, **hicTransform** outputs the observed/expected, Pearson correlation and covariance matrices. 65 From one Hi-C contact matrix, **hicTransform** outputs a matrix with the selected method applied.
79 66
80 _________________ 67 _________________
81 68
82 | For more information about HiCExplorer please consider our documentation on readthedocs.io_ 69 | For more information about HiCExplorer please consider our documentation on readthedocs.io_
83 70