comparison segalign.xml @ 0:5c72425b7f1b draft

planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/segalign commit 98a4dd44360447aa96d92143384d78e116d7581b
author richard-burhans
date Wed, 17 Apr 2024 18:06:54 +0000
parents
children 9e34b25a8670
comparison
equal deleted inserted replaced
-1:000000000000 0:5c72425b7f1b
1 <tool id="segalign" name="SegAlign" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>A Scalable GPU System for Pairwise Whole Genome Alignments based on LASTZ's seed-filter-extend paradigm</description>
3 <macros>
4 <import>macros.xml</import>
5 <import>sequence_options.xml</import>
6 <import>scoring_options.xml</import>
7 <import>seeding_options.xml</import>
8 <import>ungapped_extension_options.xml</import>
9 <import>gapped_extension_options.xml</import>
10 <import>output_options.xml</import>
11 <import>segalign_output_options.xml</import>
12 <import>system_options.xml</import>
13 </macros>
14 <expand macro="edam_ontology"/>
15 <expand macro="requirements"/>
16 <command detect_errors="exit_code"><![CDATA[
17 ##
18 ## https://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html
19 ##
20 ## If the OMP_NUM_THREADS or OMP_THREAD_LIMIT environment variables
21 ## are set, then they will determine the minimum and maximum returned
22 ## value respectively.
23 ##
24 ## This is how you tame nproc(1)
25 ##
26 OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-2}
27
28 ## Mode ----------------------------------------------------------------
29
30 #if str($mode.mode_selector) == "segalign"
31 #if str($mode.diagonal_partition_options.diagonal_partition) == "true"
32 #set $segalign_mode = "segalign_diagonal_partition"
33 '$__tool_directory__/run_segalign_diagonal_partition'
34 --tool_directory '$__tool_directory__'
35 --max_segments '$mode.diagonal_partition_options.max_segments'
36 #else
37 #set $segalign_mode = "segalign"
38 run_segalign
39 #end if
40 '$mode.target'
41 '$mode.query'
42 #else if str($mode.mode_selector) == "segalign_repeat_masker"
43 #set $segalign_mode = "segalign_repeat_masker"
44 run_segalign_repeat_masker
45 '$mode.seq_file'
46 #end if
47
48 ## Sequence Options ----------------------------------------------------
49
50 --strand '$mode.sequence_options.strand_selector'
51 #if $segalign_mode == "segalign_repeat_masker"
52 --neighbor_proportion '$mode.sequence_options.neighbor_proportion'
53 #end if
54
55 ## Scoring Options -----------------------------------------------------
56
57 #set $scoring_pathname = str($mode.scoring_options.scoring)
58 #if $scoring_pathname != "None":
59 --scoring '$scoring_pathname'
60 #end if
61 #if str($mode.scoring_options.ambiguous_selector) != "x"
62 #if str($mode.scoring_options.set_ambiguous_params_selector) == "true"
63 #set $argument_value = ','.join($mode.scoring_options.ambiguous_selector, $mode.scoring_options.ambiguous_reward, $mode.scoring_options.ambiguous_penalty)
64 --ambiguous '$argument_value'
65 #else
66 --ambiguous '$ambiguous_selector'
67 #end if
68 #end if
69
70 ## Seeding Options -----------------------------------------------------
71
72 #if str($mode.seeding_options.seed.seed_selector) == "custom"
73 --seed '$mode.seeding_options.seed.custom_seed'
74 #else
75 --seed '$mode.seeding_options.seed.seed_selector'
76 #end if
77 --step '$mode.seeding_options.step'
78 #if str($mode.seeding_options.notransition) == "true"
79 --notransition
80 #end if
81
82 ## Ungapped Extension Options ------------------------------------------
83
84 --xdrop '$mode.ungapped_extension_options.xdrop'
85 --hspthresh '$mode.ungapped_extension_options.hspthresh'
86 #if str($mode.ungapped_extension_options.noentropy) == "true"
87 --noentropy
88 #end if
89
90 ## Gapped Extension Options --------------------------------------------
91
92 #if $segalign_mode != "segalign_repeat_masker"
93 #if str($mode.gapped_extension_options.nogapped) == "true"
94 --nogapped
95 #end if
96 --ydrop '$mode.gapped_extension_options.ydrop'
97 #if str($mode.gapped_extension_options.gappedthresh) != ""
98 --gappedthresh '$mode.gapped_extension_options.gappedthresh'
99 #end if
100 #if str($mode.gapped_extension_options.notrivial) == "true"
101 --notrivial
102 #end if
103 #end if
104
105 ## Output Options -----------------------------------------------------
106
107 #if $segalign_mode != "segalign_repeat_masker"
108 #if str($mode.output_options.format.format_selector) == "bam"
109 --format '$mode.output_options.format.bam_options'
110 #else if str($mode.output_options.format.format_selector) == "general_def"
111 --format general-
112 #else if str($mode.output_options.format.format_selector) == "general_full"
113 --format 'general-:${mode.output_options.format.fields}'
114 #else if str($mode.output_options.format.format_selector) == "maf"
115 --format '$mode.output_options.format.maf_type'
116 #else if str($mode.output_options.format.format_selector) == "blastn"
117 --format=BLASTN-
118 #else if str($mode.output_options.format.format_selector) == "differences"
119 --format=differences
120 #end if
121 ## todo :: rplot, bam
122 ## --action:target=multiple
123 ## $output_format.rplot
124 ## .if str( $output_format.out.format ) == "bam":
125 ## | samtools sort -@\${GALAXY_SLOTS:-2} -T "\${TMPDIR:-.}" -O bam -o '${output}'
126 ## .else:
127 ## > '${output}'
128 ## .end if
129 ## .if $output_format.rplot:
130 ## &&
131 ## Rscript $r_plot > /dev/null 2>&1
132 ## .end if
133 #if $segalign_mode == "segalign"
134 --output '$segalign_output'
135 #end if
136 #else if $segalign_mode == "segalign_repeat_masker"
137 --M '$mode.output_options.M'
138 --output '$segalign_repeat_masker_output'
139 #end if
140 #if str($mode.output_options.markend) == "true"
141 --markend
142 #end if
143
144 ## System Options -----------------------------------------------------
145
146 --wga_chunk_size '$mode.system_options.wga_chunk_size'
147 --lastz_interval_size '$mode.system_options.lastz_interval_size'
148 --seq_block_size '$mode.system_options.seq_block_size'
149 --num_gpu '$mode.system_options.num_gpu'
150 #if str($mode.system_options.debug) == "true"
151 --debug
152 #end if
153
154 ## -------------------------------------------------------------------
155
156 #if $segalign_mode == "segalign_diagonal_partition"
157 &&
158 '$__tool_directory__/package_output.py'
159 #end if
160
161 ]]></command>
162 <inputs>
163 <conditional name="mode">
164 <param name="mode_selector" type="select" label="Choose the mode">
165 <option value="segalign" selected="true">SegAlign</option>
166 <option value="segalign_repeat_masker">SegAlign repeat masker</option>
167 </param>
168 <when value="segalign">
169 <param name="target" type="data" format="fasta" label="Target sequence file in FASTA format"/>
170 <param name="query" type="data" format="fasta" label="Query sequence file in FASTA format"/>
171 <expand macro="sequence_options"/>
172 <expand macro="scoring_options"/>
173 <expand macro="seeding_options"/>
174 <expand macro="ungapped_extension_options"/>
175 <expand macro="gapped_extension_options"/>
176 <expand macro="output_options">
177 <expand macro="segalign_output_options"/>
178 </expand>
179 <expand macro="system_options"/>
180 <section name="diagonal_partition_options" expanded="false" title="Diagonal Partition Options">
181 <param argument="--diagonal_partition" type="boolean" value="false" label="Enable diagonal partition optimization"/>
182 <param argument="--max_segments" type="integer" value="20000" label="Max segments"/>
183 </section>
184 </when>
185 <when value="segalign_repeat_masker">
186 <param name="seq_file" type="data" format="fasta" label="Sequence file in FASTA format"/>
187 <expand macro="sequence_options">
188 <param argument="--neighbor_proportion" type="float" value="0.2" label="Proportion of neighbouring intervals to align the query interval to"/>
189 </expand>
190 <expand macro="scoring_options"/>
191 <expand macro="seeding_options"/>
192 <expand macro="ungapped_extension_options"/>
193 <expand macro="output_options">
194 <param argument="--M" type="integer" value="1" max="255" label="report any position that is covered by at least this many alignments; the maximum allowed depth is 255"/>
195 </expand>
196 <expand macro="system_options"/>
197 </when>
198 </conditional>
199 </inputs>
200 <outputs>
201 <data name="segalign_output" format="tabular" label="SegAlign on ${on_string}">
202 <change_format>
203 <when input="mode.output_options.format.format_selector" value="bam" format="bam"/>
204 <when input="mode.output_options.format.format_selector" value="maf" format="maf"/>
205 <when input="mode.output_options.format.format_selector" value="differences" format="interval"/>
206 </change_format>
207 <filter>mode['mode_selector'] == 'segalign' and mode['diagonal_partition_options']['diagonal_partition'] is False</filter>
208 </data>
209 <data name="segalign_diagonal_partition_output" format="tgz" from_work_dir="data_package.tgz" label="SegAlign Diagonal Partition on ${on_string}">
210 <filter>mode['mode_selector'] == 'segalign' and mode['diagonal_partition_options']['diagonal_partition'] is True</filter>
211 </data>
212 <data name="segalign_repeat_masker_output" format="tabular" label="SegAlign Repeat Masker on ${on_string}">
213 <filter>mode['mode_selector'] == 'segalign_repeat_masker'</filter>
214 </data>
215 </outputs>
216 <tests>
217 <test expect_num_outputs="1" expect_test_failure="true">
218 <param name="mode_selector" value="segalign"/>
219 <param name="target" value="hg38.chr20.chunk.fa.gz" ftype="fasta"/>
220 <param name="query" value="mm39.chr2.chunk.fa.gz" ftype="fasta"/>
221 <output name="segalign_output" decompress="true" file="segalign-output.maf.gz" ftype="maf"/>
222 </test>
223 <test expect_num_outputs="1" expect_test_failure="true">
224 <param name="mode_selector" value="segalign_repeat_masker"/>
225 <param name="seq_file" value="hg38.chr20.chunk.fa.gz" ftype="fasta"/>
226 <output name="segalign_repeat_masker_output" decompress="true" file="segalign-repeat-masker-output.tab.gz" ftype="tabular"/>
227 </test>
228 <test expect_num_outputs="1" expect_test_failure="true">
229 <param name="mode_selector" value="segalign"/>
230 <param name="target" value="hg38.chr20.chunk.fa.gz" ftype="fasta"/>
231 <param name="query" value="mm39.chr2.chunk.fa.gz" ftype="fasta"/>
232 <param name="diagonal_partition" value="true"/>
233 <output name="segalign_diagonal_partition_output" ftype="tgz">
234 <assert_contents>
235 <has_archive_member path="galaxy/commands.json"/>
236 </assert_contents>
237 </output>
238 </test>
239 </tests>
240 <help><![CDATA[
241 SegAlign is a scalable, GPU-accelerated system for computing pairwise WGA. SegAlign is based on the standard seed-filter-extend heuristic, in which the filtering stage dominates the runtime (e.g. 98% for human-mouse WGA), and is accelerated using GPU(s).
242
243 https://github.com/gsneha26
244 ]]></help>
245 <expand macro="citations"/>
246 </tool>