Mercurial > repos > bgruening > hicexplorer_chicplotviewpoint
comparison chicPlotViewpoint.xml @ 0:ae8bf5420df2 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:40:31 -0500 |
parents | |
children | 136ebddd6ec3 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ae8bf5420df2 |
---|---|
1 <tool id="hicexplorer_chicplotviewpoint" name="@BINARY@" version="@WRAPPER_VERSION@.0"> | |
2 <description>creates plots for viewpoints</description> | |
3 <macros> | |
4 <token name="@BINARY@">chicPlotViewpoint</token> | |
5 <import>macros.xml</import> | |
6 </macros> | |
7 <expand macro="requirements" /> | |
8 <command detect_errors="exit_code"><![CDATA[ | |
9 #import re | |
10 | |
11 mkdir interactionFiles && | |
12 mkdir differentialFolder && | |
13 mkdir significantFolder && | |
14 mkdir plots && | |
15 | |
16 | |
17 #for $file in $interactionFiles: | |
18 #set identifier = @ESCAPE_IDENTIFIER_FILE@ | |
19 ln -s '$file' 'interactionFiles/$identifier' && | |
20 #end for | |
21 | |
22 #if $differentialFiles: | |
23 #for $file in $differentialFiles: | |
24 #set identifier = @ESCAPE_IDENTIFIER_FILE@ | |
25 ln -s '$file' 'differentialFolder/$identifier' && | |
26 #end for | |
27 #end if | |
28 | |
29 #if $significantFiles: | |
30 #for $file in $significantFiles: | |
31 #set identifier = @ESCAPE_IDENTIFIER_FILE@ | |
32 ln -s '$file' 'significantFolder/$identifier' && | |
33 #end for | |
34 #end if | |
35 | |
36 #if $batchmode_conditional.batchmode_selector == 'optionSinglemode': | |
37 #set $interactonfileslist = ' '.join([ '\'interactionFiles/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $interactionFiles ]) | |
38 #set $differentialfileslist = ' '.join([ '\'differentialFolder/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $differentialFiles ]) | |
39 #set $significantfileslist = ' '.join([ '\'significantFolder/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $significantFiles ]) | |
40 | |
41 #end if | |
42 | |
43 @BINARY@ | |
44 #if $batchmode_conditional.batchmode_selector == 'optionSinglemode': | |
45 --interactionFile $interactonfileslist | |
46 #if $differentialFiles: | |
47 --differentialTestResult $differentialfileslist | |
48 #end if | |
49 | |
50 #if $significantFiles: | |
51 --significantInteractions $significantfileslist | |
52 #end if | |
53 | |
54 -o out_plot.$image_file_format | |
55 #else: | |
56 --interactionFile $batchmode_conditional.interactionFilesOrderFile | |
57 --interactionFileFolder interactionFiles | |
58 #if $batchmode_conditional.differentialFilesOrderFile: | |
59 --differentialTestResult $batchmode_conditional.differentialFilesOrderFile | |
60 --differentialTestResultsFolder differentialFolder | |
61 #end if | |
62 #if $batchmode_conditional.significantInteractionFilesOrderFile: | |
63 --significantInteractions $batchmode_conditional.significantInteractionFilesOrderFile | |
64 --significantInteractionFileFolder significantFolder | |
65 #end if | |
66 --plotSampleNumber $batchmode_conditional.computeSampleNumber | |
67 | |
68 --batchMode | |
69 --outputFolder plots | |
70 --outputFormat $image_file_format | |
71 | |
72 | |
73 #end if | |
74 | |
75 --range $rangeUpstream $rangeDownstream | |
76 #if $backgroundModelFile: | |
77 --backgroundModelFile $backgroundModelFile | |
78 #end if | |
79 | |
80 #if $dpi: | |
81 --dpi $dpi | |
82 #end if | |
83 | |
84 #if $maxPValue: | |
85 --maxPValue $maxPValue | |
86 #end if | |
87 | |
88 #if $minPValue: | |
89 --minPValue $minPValue | |
90 #end if | |
91 | |
92 --binResolution $resolution | |
93 #if $colormap: | |
94 --colorMapPvalue $colormap | |
95 #end if | |
96 | |
97 $pvalue | |
98 #if $xFold: | |
99 --xFold $xFold | |
100 #end if | |
101 --colorList $colorList | |
102 --threads @THREADS@ | |
103 | |
104 #if $batchmode_conditional.batchmode_selector == 'optionSinglemode': | |
105 && mv out_plot.$image_file_format plots/out_plot.$image_file_format | |
106 #end if | |
107 ]]></command> | |
108 <inputs> | |
109 <param name='interactionFiles' type="data" format="interval" label="Interaction files" multiple="true"/> | |
110 <param name='differentialFiles' type="data" format="interval" label="Rejected H0 files" multiple="true" optional='true'/> | |
111 <param name='significantFiles' type="data" format="interval" label="Significant interaction files" multiple="true" optional='true'/> | |
112 | |
113 <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.' /> | |
114 <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.' /> | |
115 <param argument="--backgroundModelFile" type="data" format='tabular' | |
116 label="Background model" | |
117 help="The background file computed by chicViewpointBackgroundModel" optional='true'/> | |
118 | |
119 <conditional name="batchmode_conditional"> | |
120 <param name="batchmode_selector" type="select" label="Compute files individually or in batch mode"> | |
121 <option value="optionBatchmode">Batch processing</option> | |
122 <option value="optionSinglemode" selected="True">Single file processing</option> | |
123 </param> | |
124 <when value="optionBatchmode"> | |
125 <param name='interactionFilesOrderFile' type="data" format="txt" label="Interaction file order"/> | |
126 <param name='differentialFilesOrderFile' type="data" format="txt" label="Rejected H0 file order" optional='true'/> | |
127 <param name='significantInteractionFilesOrderFile' type="data" format="txt" label="Significant file order" optional='true'/> | |
128 <param name='computeSampleNumber' type="integer" value='2' label="Plot n sample in one plot"/> | |
129 | |
130 </when> | |
131 <when value="optionSinglemode"> | |
132 </when> | |
133 </conditional> | |
134 | |
135 | |
136 <param argument="--maxPValue" type="float" optional="true" label="Max p-value" help="Maximum value of the plotted p-value."/> | |
137 <param argument="--minPValue" type="float" optional="true" label="Min p-value" help="Minimum value of the plotted p-value."/> | |
138 <param name='resolution' type='integer' value='1000' label='Resolution of cHi-C data' help='Resolution of the bin in genomic units. Values are usually e.g. 1000 for a 1kb, 5000 for a 5kb or 10000 for a 10kb resolution.' optional='true'/> | |
139 <param name='pvalue' type='boolean' truevalue='--pValue' falsevalue="" checked="false" label="Plot p-values as a colorbar"/> | |
140 <expand macro="colormap" /> | |
141 | |
142 <param name='xFold' type='float' value='' label='X-fold mean background' help='Plot x-fold region for the mean background.' optional='true'/> | |
143 | |
144 <param name="image_file_format" type="select" label="Image output format"> | |
145 <option value="png" selected="True">png</option> | |
146 <option value="svg">svg</option> | |
147 <option value="pdf">pdf</option> | |
148 </param> | |
149 <param name='dpi' type='integer' label='DPI for image' help='Change the default resolution of the plot.' optional='true'/> | |
150 <param name='colorList' type='text' value='g b c m y k' label='Color list' help='Colorlist for the viewpoint lines. For all available colors please check matplotlib documentation: https://matplotlib.org/3.1.0/gallery/color/named_colors.html' optional='true'/> | |
151 | |
152 | |
153 </inputs> | |
154 <outputs> | |
155 <collection name="plotsCollection" type="list" label="cHi-C viewpoint plots"> | |
156 <discover_datasets pattern="__name_and_ext__" directory="plots" /> | |
157 </collection> | |
158 | |
159 </outputs> | |
160 <tests> | |
161 <test> | |
162 <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.bed,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.bed,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.bed,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_4487435_4487435_Sox17.bed,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.bed,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.bed"/> | |
163 <param name="differentialFiles" value="cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_H0_rejected.bed,cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_rejected.bed,cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_H0_rejected.bed"/> | |
164 <param name="significantFiles" value="cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_output_significant.bed,cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_output_significant.bed,cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_output_significant.bed,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_output_significant.bed,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_output_significant.bed,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_output_significant.bed"/> | |
165 | |
166 | |
167 <conditional name="batchmode_conditional"> | |
168 <param name="batchmode_selector" value='optionBatchmode'/> | |
169 <param name="interactionFilesOrderFile" value='cHi-C/chicViewpoint/fileNames_two_matrices.txt'/> | |
170 <param name="differentialFilesOrderFile" value='cHi-C/chicDifferentialTest/rejectedFilesList.txt'/> | |
171 <param name="significantInteractionFilesOrderFile" value='cHi-C/chicSignificantInteractions/output_5_significant_files.txt'/> | |
172 <param name='computeSampleNumber' value='2'/> | |
173 </conditional> | |
174 <param name="pvalue" value='True'/> | |
175 <param name="alpha" value='0.5'/> | |
176 <param name='backgroundModelFile' value='cHi-C/background.bed'/> | |
177 <param name='xFold' value='1.5'/> | |
178 <output_collection name="plotsCollection" type="list" count="3"> | |
179 <element name="Eya1_FL-E13-5_MB-E10-5_chr1_chr1_14300280" file="cHi-C/chicPlotViewpoint/batchMode/two/Eya1_FL-E13-5_MB-E10-5_chr1_chr1_14300280.png" ftype="png" compare='sim_size' delta='40000'/> | |
180 <element name="Sox17_FL-E13-5_MB-E10-5_chr1_chr1_4487435" file="cHi-C/chicPlotViewpoint/batchMode/two/Sox17_FL-E13-5_MB-E10-5_chr1_chr1_4487435.png" ftype="png" compare='sim_size' delta='40000'/> | |
181 <element name="Tfap2d_FL-E13-5_MB-E10-5_chr1_chr1_19093103" file="cHi-C/chicPlotViewpoint/batchMode/two/Tfap2d_FL-E13-5_MB-E10-5_chr1_chr1_19093103.png" ftype="png" compare='sim_size' delta='40000'/> | |
182 </output_collection> | |
183 | |
184 </test> | |
185 <test> | |
186 <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.bed"/> | |
187 | |
188 <conditional name="batchmode_conditional"> | |
189 <param name="batchmode_selector" value='optionSinglemode'/> | |
190 </conditional> | |
191 | |
192 <output_collection name="plotsCollection" type="list" count="1"> | |
193 <element name="out_plot" file="cHi-C/chicPlotViewpoint/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.png" ftype="png" compare='sim_size' delta='40000'/> | |
194 | |
195 </output_collection> | |
196 </test> | |
197 </tests> | |
198 <help><![CDATA[ | |
199 | |
200 Plot of viewpoints | |
201 ================== | |
202 | |
203 chicPlotViewpoint plots one or many viewpoints with the average background model and the computed p-value per sample. Moreover it can highlight differential interactions of two samples and or significant regions. | |
204 | |
205 An example usage is: | |
206 | |
207 `$ chicPlotViewpoint --interactionFile viewpoint1.bed viewpoint2.bed --range 500000 500000 --backgroundModelFile background_model.bed --pValue --outFileName viewpoint1_2.png --dpi 300` | |
208 | |
209 | |
210 In batch mode the list of file names and the folders containing the files need to be given: | |
211 | |
212 `$ chicPlotViewpoint --interactionFile viewpoint_names.txt -interactionFileFolder viewpointFilesFolder --differentialTestResult rejected_H0.txt --differentialTestResultsFolder differentialFolder --range 500000 500000 --backgroundModelFile background_model.bed --pValue --outputFolder plotsFOlder --dpi 300 --threads 20` | |
213 | |
214 | |
215 For more information about HiCExplorer please consider our documentation on readthedocs.io_ | |
216 | |
217 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html | |
218 ]]></help> | |
219 <expand macro="citations" /> | |
220 </tool> |