Mercurial > repos > bgruening > hicexplorer_chicaggregatestatistic
comparison chicAggregateStatistic.xml @ 7:554e8a6cec27 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 8586409c5f329eaf75902eedc3d29a6e82560788
author | iuc |
---|---|
date | Mon, 01 Jul 2024 18:52:21 +0000 |
parents | ed8e77d5d654 |
children |
comparison
equal
deleted
inserted
replaced
6:47ed2fb6205d | 7:554e8a6cec27 |
---|---|
1 <tool id="hicexplorer_chicaggregatestatistic" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> | 1 <tool id="hicexplorer_chicaggregatestatistic" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
2 <description>computes with a target file the to be tested regions for chicDifferentialTest</description> | 2 <description>computes with a target file the to be tested regions for chicDifferentialTest</description> |
3 <macros> | 3 <macros> |
4 <token name="@BINARY@">chicAggregateStatistic</token> | 4 <token name="@BINARY@">chicAggregateStatistic</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 #import re | 9 #import re |
10 mkdir interactionFiles && | 10 |
11 mkdir targetFolder && | 11 @BINARY@ |
12 mkdir aggregatedFilesFolder && | 12 |
13 | 13 --interactionFile '$interactionFile' |
14 #if $tar_input_conditional.tar_input_selector == 'tar_input': | 14 --outFileName aggregatedFile.hdf5 |
15 ln -s '$tar_input_conditional.interactionFiles' viewpoints.tar && | 15 #if $targetFormat_conditional.targetFormat_selector == 'hdf5': |
16 tar -C interactionFiles -xvf viewpoints.tar && | 16 --targetFile '$targetFormat_conditional.targetFileHDF' |
17 | 17 #else: |
18 #if $targetFiles: | 18 --targetFile '$targetFormat_conditional.targetFileBED' |
19 ln -s '$tar_input_conditional.targetFiles' targetFiles.tar && | |
20 tar -C targetFolder -xvf targetFiles.tar && | |
21 #end if | 19 #end if |
22 #else: | |
23 #for $file in $tar_input_conditional.interactionFiles: | |
24 #set identifier = @ESCAPE_IDENTIFIER_FILE@ | |
25 ln -s '$file' 'interactionFiles/$identifier' && | |
26 #end for | |
27 | |
28 #for $file in $targetFiles: | |
29 #set identifier = @ESCAPE_IDENTIFIER_FILE@ | |
30 ln -s '$file' 'targetFolder/$identifier' && | |
31 #end for | |
32 #end if | |
33 | |
34 #if $batchmode_conditional.batchmode_selector == 'optionSinglemode': | |
35 #set $interactonfileslist = ' '.join([ 'interactionFiles/%s' % @ESCAPE_IDENTIFIER_FILE@ for $file in $interactionFiles ]) | |
36 #set $targetfileslist = ' '.join([ 'targetFolder/%s' % @ESCAPE_IDENTIFIER_FILE@ for $file in $targetFiles ]) | |
37 #end if | |
38 @BINARY@ | |
39 #if $batchmode_conditional.batchmode_selector == 'optionSinglemode': | |
40 --interactionFile $interactonfileslist | |
41 --targetFile $targetfileslist | |
42 #else: | |
43 --interactionFile $batchmode_conditional.interactionFilesOrderFile | |
44 --interactionFileFolder interactionFiles | |
45 --targetFileFolder targetFolder | |
46 --targetFile $batchmode_conditional.targetFilesOrderFile | |
47 --batchMode | |
48 --writeFileNamesToFile aggregatedFilesBatch.txt | |
49 #end if | |
50 | |
51 --outputFolder aggregatedFilesFolder | |
52 -suffix aggregated.txt | |
53 --threads @THREADS@ | 20 --threads @THREADS@ |
54 | |
55 #if $tar: | |
56 && cd aggregatedFilesFolder | |
57 && tar -cvf ../aggregatedFilesFolder.tar * | |
58 && cd .. | |
59 && rm -rf aggregatedFilesFolder | |
60 #end if | |
61 | 21 |
62 ]]> </command> | 22 ]]> </command> |
63 <inputs> | 23 <inputs> |
64 | 24 |
65 <conditional name="tar_input_conditional"> | 25 <param name="interactionFile" type="data" format="h5" label="The interaction data file created by chicViewpoint" /> |
66 <param name="tar_input_selector" type="select" label="Compute files individually or in batch mode"> | 26 <conditional name="targetFormat_conditional"> |
67 <option value="tar_input">Tar file</option> | 27 <param name="targetFormat_selector" type="select" label="List of chromosomes or a BED file containg regions"> |
68 <option value="interval_input" selected="True">Interval files</option> | 28 <option value="hdf5">Target file from chicSignificantInteractions (h5 / hdf5)</option> |
29 <option value="bed" selected="True">Regions of interest (bed)</option> | |
69 </param> | 30 </param> |
70 <when value="tar_input"> | 31 <when value="hdf5"> |
71 <param name='interactionFiles' type="data" format="tar" label="Interaction files" multiple="false" /> | 32 <param name="targetFileHDF" type="data" format="h5" label="The target data file created by chicSignificantInteractions" /> |
72 <param name='targetFiles' type="data" format="tar" label="Target files" multiple="false" /> | |
73 </when> | 33 </when> |
74 <when value="interval_input"> | 34 <when value="bed"> |
75 <param name='interactionFiles' type="data" format="interval" label="Interaction files" multiple="true" /> | 35 <param name="targetFileBED" type="data" format="bed" label="Regions of interest" help="BED file which stores a list of regions that are used to aggregate the data for the differntial test." /> |
76 <param name='targetFiles' type="data" format="interval" label="Target files" multiple="true" /> | |
77 </when> | 36 </when> |
78 </conditional> | 37 </conditional> |
79 | 38 </inputs> |
80 <conditional name="batchmode_conditional"> | |
81 <param name="batchmode_selector" type="select" label="Compute files individually or in batch mode"> | |
82 <option value="optionBatchmode">Batch processing</option> | |
83 <option value="optionSinglemode" selected="True">Single file processing</option> | |
84 </param> | |
85 <when value="optionBatchmode"> | |
86 <param name='interactionFilesOrderFile' type="data" format="txt" label="Interaction file order" /> | |
87 <param name='targetFilesOrderFile' type="data" format="txt" label="Target file order" /> | |
88 </when> | |
89 <when value="optionSinglemode"> | |
90 </when> | |
91 </conditional> | |
92 <param name='tar' type='boolean' checked="false" truevalue='True' label="tar output to one file" help="The output is tarred to one file and not written to a collection. Set this option if the number of files is large." /> | |
93 </inputs> | |
94 <outputs> | 39 <outputs> |
95 <collection name="aggregatedFilesCollection" type="list" label="Aggregated files"> | 40 <data name="aggregatedFile" from_work_dir="aggregatedFile.hdf5" format="h5" label="Aggregated file" /> |
96 <discover_datasets pattern="__name__" format='interval' directory="aggregatedFilesFolder" /> | |
97 </collection> | |
98 <data name="aggregatedFileNames" from_work_dir="aggregatedFilesBatch.txt" format="txt" label="${tool.name} aggregated file names"> | |
99 <filter>batchmode_conditional.batchmode_selector == 'optionBatchmode'</filter> | |
100 </data> | |
101 <data name="aggregatedFilesFolderTar" from_work_dir="aggregatedFilesFolder.tar" format="tar" label="Aggregated files tar.gz"> | |
102 <filter>tar</filter> | |
103 </data> | |
104 </outputs> | 41 </outputs> |
105 <tests> | 42 <tests> |
106 <test> | 43 <test> |
107 <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_4487435_4487435_Sox17.txt" /> | 44 <param name="interactionFile" value="cHi-C/chicViewpoint/two_matrices.hdf5" /> |
108 <param name="targetFiles" value="cHi-C/chicSignificantInteractions/output_5_target/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_target.txt,cHi-C/chicSignificantInteractions/output_5_target/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_target.txt,cHi-C/chicSignificantInteractions/output_5_target/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_target.txt" /> | 45 <conditional name="targetFormat_conditional"> |
109 | 46 <param name="targetFormat_selector" value="hdf5" /> |
110 <conditional name="batchmode_conditional"> | 47 <param name="targetFileHDF" value="cHi-C/chicSignificantInteractions/targetFile_dual.hdf5" /> |
111 <param name="batchmode_selector" value='optionBatchmode' /> | |
112 <param name="interactionFilesOrderFile" value='cHi-C/chicViewpoint/fileNames_two_matrices.txt' /> | |
113 <param name="targetFilesOrderFile" value='cHi-C/chicSignificantInteractions/output_5_target_list.txt' /> | |
114 </conditional> | 48 </conditional> |
115 | 49 <output name="aggregatedFile" ftype="h5"> |
116 <output_collection name="aggregatedFilesCollection" type="list" count="6"> | 50 <assert_contents> |
117 <element name="FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt" file="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt" ftype="interval" lines_diff="4" /> | 51 <has_h5_attribute key="type" value="aggregate" /> |
118 <element name="MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt" file="cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt" ftype="interval" lines_diff="4" /> | 52 </assert_contents> |
119 <element name="FL-E13-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt" file="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt" ftype="interval" lines_diff="4" /> | 53 </output> |
120 <element name="MB-E10-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt" file="cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt" ftype="interval" lines_diff="4" /> | |
121 <element name="FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt" file="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt" ftype="interval" lines_diff="4" /> | |
122 <element name="MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt" file="cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt" ftype="interval" lines_diff="4" /> | |
123 </output_collection> | |
124 <output name="aggregatedFileNames" file="cHi-C/chicAggregateStatistic/batch_mode_file_names.txt" ftype="txt" /> | |
125 </test> | 54 </test> |
126 <test> | 55 <test> |
127 <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.txt" /> | 56 <param name="interactionFile" value="cHi-C/chicViewpoint/two_matrices.hdf5" /> |
128 <param name="targetFiles" value="cHi-C/chicSignificantInteractions/output_5_target/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_target.txt" /> | |
129 | 57 |
130 <conditional name="batchmode_conditional"> | 58 <conditional name="targetFormat_conditional"> |
131 <param name="batchmode_selector" value='optionSinglemode' /> | 59 <param name="targetFormat_selector" value="bed" /> |
60 <param name="targetFileBED" value="cHi-C/target_list.bed" /> | |
132 </conditional> | 61 </conditional> |
133 | 62 <output name="aggregatedFile" ftype="h5"> |
134 <output_collection name="aggregatedFilesCollection" type="list" count="2"> | 63 <assert_contents> |
135 <element name="FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt" file="cHi-C/chicAggregateStatistic/regular_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt" ftype="interval" lines_diff="4" /> | 64 <has_h5_attribute key="type" value="aggregate" /> |
136 <element name="MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt" file="cHi-C/chicAggregateStatistic/regular_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt" ftype="interval" lines_diff="4" /> | 65 </assert_contents> |
137 </output_collection> | 66 </output> |
138 </test> | |
139 | |
140 <test> | |
141 <conditional name="tar_input_conditional"> | |
142 <param name="tar_input_selector" value='interval_input' /> | |
143 <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_4487435_4487435_Sox17.txt" /> | |
144 <param name="targetFiles" value="cHi-C/chicSignificantInteractions/output_5_target/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_target.txt,cHi-C/chicSignificantInteractions/output_5_target/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_target.txt,cHi-C/chicSignificantInteractions/output_5_target/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_target.txt" /> | |
145 </conditional> | |
146 | |
147 <conditional name="batchmode_conditional"> | |
148 <param name="batchmode_selector" value='optionBatchmode' /> | |
149 <param name="interactionFilesOrderFile" value='cHi-C/chicViewpoint/fileNames_two_matrices.txt' /> | |
150 <param name="targetFilesOrderFile" value='cHi-C/chicSignificantInteractions/output_5_target_list.txt' /> | |
151 </conditional> | |
152 <param name='tar' value='True' /> | |
153 <output name="aggregatedFilesFolderTar" file="cHi-C/chicAggregateStatistic/batch_mode.tar" ftype='tar' compare="sim_size" delta='40000' /> | |
154 <output name="aggregatedFileNames" file="cHi-C/chicAggregateStatistic/batch_mode_file_names.txt" ftype="txt" /> | |
155 </test> | |
156 | |
157 <test> | |
158 <conditional name="tar_input_conditional"> | |
159 <param name="tar_input_selector" value='tar_input' /> | |
160 <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1.tar" /> | |
161 <param name="targetFiles" value="cHi-C/chicSignificantInteractions/targetFolder.tar" /> | |
162 </conditional> | |
163 | |
164 <conditional name="batchmode_conditional"> | |
165 <param name="batchmode_selector" value='optionBatchmode' /> | |
166 <param name="interactionFilesOrderFile" value='cHi-C/chicViewpoint/fileNames_two_matrices.txt' /> | |
167 <param name="targetFilesOrderFile" value='cHi-C/chicSignificantInteractions/output_5_target_list.txt' /> | |
168 </conditional> | |
169 | |
170 <param name='tar' value='True' /> | |
171 | |
172 <output name="aggregatedFilesFolderTar" file="cHi-C/chicAggregateStatistic/batch_mode.tar" ftype='tar' compare="sim_size" delta='40000' /> | |
173 <output name="aggregatedFileNames" file="cHi-C/chicAggregateStatistic/batch_mode_file_names.txt" ftype="txt" /> | |
174 </test> | 67 </test> |
175 </tests> | 68 </tests> |
176 <help><![CDATA[ | 69 <help><![CDATA[ |
177 | 70 |
178 Aggregate statistic for differential testing | 71 Aggregate statistic for differential testing |