comparison hicAdjustMatrix.xml @ 0:74b3932d0836 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:33:04 -0500
parents
children ea297a9c6f11
comparison
equal deleted inserted replaced
-1:000000000000 0:74b3932d0836
1 <tool id="hicexplorer_hicadjustmatrix" name="@BINARY@" version="@WRAPPER_VERSION@.0">
2 <description>transform a matrix to obs/exp, pearson and covariance matrices</description>
3 <macros>
4 <token name="@BINARY@">hicAdjustMatrix</token>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="requirements" />
8 <command detect_errors="exit_code"><![CDATA[
9 #set matrix_name = 'matrix_in.' + str($matrix_h5_cooler.ext)
10 #set matrix_file_out = 'matrix_out.' + str($matrix_h5_cooler.ext)
11
12 ln -s '$matrix_h5_cooler' 'matrix_name.$matrix_h5_cooler.ext' &&
13 @BINARY@ --matrix 'matrix_name.$matrix_h5_cooler.ext'
14 --action $action_selector
15 --outFileName '$matrix_file_out'
16 #if $chromosomeOrRegionFile_conditional.chromosomeOrRegionFile_selector == "optionChromosomes":
17 ## special: --chromosomeOrder is optional, but if given it needs at least one argument
18 #set chroms = '\' \''.join([ str($var.chromosome) for $var in $chromosomeOrRegionFile_conditional.chromosomeOrder ])
19 #if chroms:
20 --chromosomes '$chroms'
21 #end if
22 #end if
23
24 #if $chromosomeOrRegionFile_conditional.chromosomeOrRegionFile_selector == "optionRegionFile":
25 --regions '$chromosomeOrRegionFile_conditional.regions'
26 #end if
27
28 && mv "$matrix_file_out" matrix
29 ]]>
30 </command>
31 <inputs>
32 <expand macro='matrix_h5_cooler_macro' />
33 <param name="action_selector" type="select" label="Apply action" >
34 <option value="keep" selected="True">keep</option>
35 <option value="remove">remove</option>
36 <option value="mask">mask</option>
37 </param>
38 <conditional name="chromosomeOrRegionFile_conditional">
39 <param name="chromosomeOrRegionFile_selector" type="select" label="List of chromosomes or a BED file containg regions">
40 <option value="optionChromosomes">Chromosomes</option>
41 <option value="optionRegionFile" selected="True">Region BED file</option>
42 </param>
43 <when value="optionChromosomes">
44 <repeat name="chromosomeOrder" min="0" title="Chromosomes to keep / remove / mask"
45 help="The selected option will be applied on the selected chromosomes." >
46 <param name="chromosome" type="text" >
47 <validator type="empty_field" />
48 </param>
49 </repeat>
50
51 </when>
52 <when value="optionRegionFile">
53 <param argument="--regions" type="data" format="bed" optional="true" label="BED file with all regions to be considered."
54 help="Should contain the regions which should be kept, removed or masked." />
55
56 </when>
57 </conditional>
58 </inputs>
59 <outputs>
60 <data name="outFileName" from_work_dir="matrix" format="h5">
61 <change_format>
62 <when input="matrix_h5_cooler.ext" value="cool" format="cool" />
63 </change_format>
64 </data>
65 </outputs>
66 <tests>
67 <test>
68 <param name="matrix_h5_cooler" value="small_test_matrix.h5"/>
69 <param name="action_selector" value="keep" />
70 <conditional name="chromosomeOrRegionFile_conditional">
71 <param name="chromosomeOrRegionFile_selector" value='optionChromosomes'/>
72 <repeat name="chromosomeOrder">
73 <param name="chromosome" value='chrX'/>
74 <param name="chromosome" value='chr3R'/>
75 </repeat>
76 </conditional>
77
78 <output name="outFileName" ftype="h5">
79 <assert_contents>
80 <has_h5_keys keys='intervals,matrix'/>
81 </assert_contents>
82 </output>
83 </test>
84
85 <test>
86 <param name="matrix_h5_cooler" value="small_test_matrix.h5"/>
87 <param name="action_selector" value="mask" />
88 <conditional name="chromosomeOrRegionFile_conditional">
89 <param name="chromosomeOrRegionFile_selector" value='optionRegionFile'/>
90 <param name="regions" value='regions.bed'/>
91 </conditional>
92
93 <output name="outFileName" ftype="h5">
94 <assert_contents>
95 <has_h5_keys keys='intervals,matrix,nan_bins'/>
96 </assert_contents>
97 </output>
98 </test>
99 </tests>
100 <help><![CDATA[
101
102 Adjust of the Hi-C matrix
103 =========================
104
105 This tool is able to remove, keep or mask given regions of a Hi-C interaction matrix.
106
107 _________________
108
109 | For more information about HiCExplorer please consider our documentation on readthedocs.io_
110
111 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
112 ]]></help>
113 <expand macro="citations" />
114 </tool>