comparison chicExportData.xml @ 0:23b8d6b8960c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 07802a6bd441d9da888cfb8283f8c2135704f7c9
author bgruening
date Wed, 18 Oct 2023 17:07:56 +0000
parents
children 163fd744e235
comparison
equal deleted inserted replaced
-1:000000000000 0:23b8d6b8960c
1 <tool id="hicexplorer_chicexportdata" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
2 <description>exports data of hdf to txt based files</description>
3 <macros>
4 <token name="@BINARY@">chicExportData</token>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="requirements" />
8 <command detect_errors="exit_code"><![CDATA[
9 #import re
10 mkdir exportFolder &&
11 @BINARY@
12 --file '$file'
13
14 #if $fileType_conditional.fileType_selector == 'interaction':
15 #if $fileType_conditional.txtBigwig_conditional.txtBigwig_selector == 'txt':
16 --outputFileType txt
17 #else:
18 --outputFileType bigwig
19 --outputValueBigwig $fileType_conditional.txtBigwig_conditional.column_selector
20 --chromosomeSizes '$fileType_conditional.txtBigwig_conditional.chromosomeSize'
21 --range $fileType_conditional.txtBigwig_conditional.rangeUpstream $fileType_conditional.txtBigwig_conditional.rangeDownstream
22 --backgroundModelFile '$fileType_conditional.txtBigwig_conditional.backgroundModelFile'
23 #end if
24 #else if $fileType_conditional.fileType_selector == 'target':
25 $fileType_conditional.oneTargetFile
26 #end if
27 #if $fileType_conditional.fileType_selector != 'interaction':
28 --outputFileType txt
29 #end if
30
31 --outputMode $outputMode_conditional.outputMode_selector
32 #if $outputMode_conditional.outputMode_selector == 'geneName':
33 --outputModeName $outputMode_conditional.outputModeName
34 #end if
35 --decimalPlaces $decimalPlaces
36
37 --outFileName exportFolder/export.tar.gz
38 --threads @THREADS@
39
40 ]]> </command>
41 <inputs>
42
43 <param name="file" type="data" format="h5" label="" />
44 <conditional name="fileType_conditional">
45
46 <param name="fileType_selector" type="select" label="Combination mode for the plots">
47 <option value="interaction" selected="True">Interaction file (from chicViewpoint)</option>
48 <option value="aggregate">Aggregated file (from chicAggregateStatistic)</option>
49 <option value="significant" >Significant file (from chicSignificantInteractions)</option>
50 <option value="target" >Target file (from chicSignificantInteractions)</option>
51 <option value="differential" >Differential file (from chicDifferentialTest)</option>
52 </param>
53 <when value="interaction" >
54 <conditional name="txtBigwig_conditional">
55 <param name="txtBigwig_selector" type="select" label="Output format">
56 <option value="txt" selected="True">Text</option>
57 <option value="bigwig">BigWig</option>
58 </param>
59 <when value="txt" >
60 </when>
61 <when value="bigwig" >
62 <param name="rangeUpstream" type="integer" value="500000" label="Upstream range" help="Defines the region upstream of a reference point which should be considered in the analysis." />
63 <param name="rangeDownstream" type="integer" value="500000" label="Downstream range" help="Defines the region upstream of a reference point which should be considered in the analysis." />
64 <param name="column_selector" type="select" label="Datatrack output type">
65 <option value="relative-interactions" selected="True">relative interactions</option>
66 <option value="p-value">p-value</option>
67 <option value="x-fold" >x-fold</option>
68 <option value="raw" >raw</option>
69 </param>
70 <param name="backgroundModelFile" type="data" format="tabular" label="Background model" help="The background file computed by chicViewpointBackgroundModel" />
71 <param name="chromosomeSize" type="data" format="tabular" label="Chromosome size" help="Chromosome size as tabular file. One chromosome per line" />
72 </when>
73 </conditional>
74 </when>
75 <when value="aggregate" >
76 </when>
77 <when value="significant" >
78 </when>
79 <when value="target" >
80 <param name="oneTargetFile" type="boolean" truevalue="--oneTargetFile" falsevalue="" checked="false" label="Create only one target file" />
81 </when>
82 <when value="differential" >
83 </when>
84 </conditional>
85
86 <conditional name="outputMode_conditional">
87 <param name="outputMode_selector" type="select" label="Output mode">
88 <option value="all" selected="True">all</option>
89 <option value="geneName" >gene name</option>
90 </param>
91 <when value="all" >
92 </when>
93 <when value="geneName" >
94 <param name="outputModeName" type="text" value="" label="Gene name" help="Based on this gene name the output is extracted." />
95 </when>
96 </conditional>
97 <param name="decimalPlaces" type="integer" value="12" label="Decimal places" help="Number of decimal places for float values." />
98
99 </inputs>
100 <outputs>
101 <collection name="oneGeneCollectionBigwig" type="list" label="The exported bigwig files">
102 <discover_datasets pattern="__name__" format="bigwig" directory="exportFolder" />
103 </collection>
104 <collection name="oneGeneCollectionText" type="list" label="The exported text files">
105 <discover_datasets pattern="__name__" format="txt" directory="exportFolder" />
106 </collection>
107 <data name="allTar" from_work_dir="exportFolder/export.tar.gz" format="tar.gz" label="The exported data as tar.gz">
108 <filter>outputMode_conditional['outputMode_selector'] == 'all'</filter>
109 </data>
110 </outputs>
111 <tests>
112 <test expect_num_outputs="3">
113 <param name="file" value="cHi-C/chicAggregateStatistic/aggregate.hdf5" />
114 <conditional name="fileType_conditional">
115 <param name="fileType_selector" value="aggregate" />
116 </conditional>
117 <conditional name="outputMode_conditional">
118 <param name="outputMode_selector" value="all" />
119 </conditional>
120 <output name="allTar" file="cHi-C/chicExportData/aggregate.tar.gz" ftype="tar.gz" compare="sim_size" />
121 </test>
122
123 <test expect_num_outputs="2">
124 <param name="file" value="cHi-C/chicViewpoint/two_matrices.hdf5" />
125 <conditional name="fileType_conditional">
126 <param name="fileType_selector" value="interaction" />
127
128 <conditional name="txtBigwig_conditional">
129 <param name="txtBigwig_selector" value="bigwig" />
130 <param name="backgroundModelFile" value="cHi-C/background.txt" />
131 <param name="chromosomeSize" value="cHi-C/hg19.chrom.sizes" />
132 </conditional>
133 </conditional>
134 <conditional name="outputMode_conditional">
135 <param name="outputMode_selector" value="geneName" />
136 <param name="outputModeName" value="Eya1" />
137 </conditional>
138 <output_collection name="oneGeneCollectionBigwig" type="list" count="4">
139 <element name="background_FL-E13-5_chr1_genes_Eya1_interactions.bigwig" file="cHi-C/chicExportData/oneGene/background_FL-E13-5_chr1_genes_Eya1_interactions.bigwig" ftype="bigwig" compare="sim_size" />
140 <element name="background_MB-E10-5_chr1_genes_Eya1_interactions.bigwig" file="cHi-C/chicExportData/oneGene/background_MB-E10-5_chr1_genes_Eya1_interactions.bigwig" ftype="bigwig" compare="sim_size" />
141 <element name="FL-E13-5_chr1_genes_Eya1.bigwig" file="cHi-C/chicExportData/oneGene/FL-E13-5_chr1_genes_Eya1.bigwig" ftype="bigwig" compare="sim_size" />
142 <element name="MB-E10-5_chr1_genes_Eya1.bigwig" file="cHi-C/chicExportData/oneGene/MB-E10-5_chr1_genes_Eya1.bigwig" ftype="bigwig" compare="sim_size" />
143 </output_collection>
144 </test>
145 <test expect_num_outputs="2">
146 <param name="file" value="cHi-C/chicViewpoint/two_matrices.hdf5" />
147 <conditional name="fileType_conditional">
148 <param name="fileType_selector" value="interaction" />
149 <conditional name="txtBigwig_conditional">
150 <param name="txtBigwig_selector" value="txt" />
151 </conditional>
152 </conditional>
153 <conditional name="outputMode_conditional">
154 <param name="outputMode_selector" value="geneName" />
155 <param name="outputModeName" value="Eya1" />
156 </conditional>
157 <output_collection name="oneGeneCollectionText" type="list" count="2">
158 <element name="FL-E13-5_chr1_genes_Eya1_interactions.txt" file="cHi-C/chicExportData/oneGene/FL-E13-5_chr1_genes_Eya1_interactions.txt" ftype="txt" compare="sim_size" />
159 <element name="MB-E10-5_chr1_genes_Eya1_interactions.txt" file="cHi-C/chicExportData/oneGene/MB-E10-5_chr1_genes_Eya1_interactions.txt" ftype="txt" compare="sim_size" />
160 </output_collection>
161 </test>
162 </tests>
163 <help><![CDATA[
164
165 Exporting the binary data to text files
166 =======================================
167
168 chicExportData extracts the data stored in hdf5 files of the capture Hi-C modules to text files.
169
170 For more information about HiCExplorer please consider our documentation on readthedocs.io_
171
172 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
173 ]]> </help>
174 <expand macro="citations" />
175 </tool>