comparison swissmodel_api.xml @ 0:fdee06ed645e draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/main/tools/swissmodel_modelling_api commit 43b5bef8757185b4c077effd0bad846f25d408db
author iuc
date Thu, 11 Dec 2025 19:32:01 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:fdee06ed645e
1 <tool name="SWISS-MODEL Modelling API" id="swissmodel_modelling_api" profile="21.05" version="2.0.0">
2 <description>
3 Fully automated protein structure homology-modelling
4 </description>
5 <xrefs>
6 <xref type="bio.tools">swiss_model</xref>
7 </xrefs>
8 <requirements>
9 <requirement type="package" version="3.11">python</requirement>
10 <requirement type="package" version="2.32.5">requests</requirement>
11 </requirements>
12 <command detect_errors="aggressive"><![CDATA[
13 mkdir -p 'output_dir/'
14 && python3 '$__tool_directory__/sm_api_wrapper.py'
15 $output_format.modelcif
16 $output_format.pdb
17 #if $project_title
18 --project-title '${project_title}'
19 #end if
20 #if $project_type == 'alignment'
21 --assembly-id '${assembly_id}'
22 --auth-asym-id '${auth_asym_id}'
23 --pdb-id '${pdb_id}'
24 --template-seqres-offset '${template_seqres_offset}'
25 --template-sequence '${template_sequence}'
26 #elif $project_type == 'usertemplate'
27 --template-file '${template_file}'
28 #end if
29 '${project.project_type}'
30 '${token}' output_dir
31 #if $project_type == 'alignment'
32 '${target_sequence}'
33 #else
34 #for $i in $target_list
35 '${i.sequence}'
36 #end for
37 #end if
38 && find output_dir -type f -name '*.gz' -exec gzip -d {} +
39 ]]>
40 </command>
41 <inputs>
42 <param name="token" type="text" optional="false" label="API token">
43 <help><![CDATA[
44 Token to authenticate to the SWISS-MODEL API. Can be managed on your
45 <a href="https://swissmodel.expasy.org/login_page" target="_blank"> SWISS-MODEL account</a> page.
46 ]]></help>
47 </param>
48 <param name="project_title" type="text" value="Untitled project" optional="true" label="Project title"/>
49 <conditional name="project">
50 <param name="project_type" type="select" value="automodel" optional="false" label="Modelling setup" display="radio">
51 <option value="automodel" selected="true">Automodel mode</option>
52 <option value="alignment">Alignment mode</option>
53 <option value="usertemplate">User template mode</option>
54 </param>
55 <!-- AutoModel Mode Options -->
56 <when value="automodel">
57 <repeat name="target_list" min="1"
58 help="Sequence(s) to be modelled. Add multiple sequences for hetero modelling." title="Target sequence">
59 <param name="sequence" type="text" optional="false"
60 label="Sequence"/>
61 </repeat>
62 </when>
63 <!-- Alignment Mode Options -->
64 <when value="alignment">
65 <param name="target_sequence" type="text" optional="false"
66 label="Target sequence"
67 help="Target sequence as part of the alignment"/>
68 <param name="pdb_id" type="text" optional="false"
69 label="PDB/ SMTL ID">
70 <help><![CDATA[
71 PDB ID of the template SMTL entry as found in the
72 <a href="https://swissmodel.expasy.org/templates/" target="_blank"> SWISS-MODEL
73 Template Library</a>.
74 ]]></help>
75 <validator type="regex" message="Only PDB-like IDs allowed, e.g. '1crn'.">^\d[A-Za-z0-9]{3}$</validator>
76 </param>
77 <param name="assembly_id" type="integer" min="0" value="0" optional="false"
78 label="Assembly ID">
79 <help><![CDATA[
80 Assembly ID of the template as found in the
81 <a href="https://swissmodel.expasy.org/templates/" target="_blank"> SWISS-MODEL
82 Template Library</a>.
83 ]]></help>
84 </param>
85 <param name="auth_asym_id" type="text" optional="false"
86 label="Chain name">
87 <help><![CDATA[
88 Chain name in the template assembly as found in the
89 <a href="https://swissmodel.expasy.org/templates/" target="_blank"> SWISS-MODEL
90 Template Library</a>.
91 ]]></help>
92 </param>
93 <param name="template_sequence" type="text" optional="false"
94 label="Template sequence"
95 help="Template sequence as part of the alignment"/>
96 <param name="template_seqres_offset" type="integer" value="0" optional="false" label="Template sequence offset">
97 <help><![CDATA[
98 Offset of the template sequence segment with respect to the full template
99 sequence.
100 ]]></help>
101 </param>
102 </when>
103 <!-- User Template Mode Options -->
104 <when value="usertemplate">
105 <repeat name="target_list" min="1"
106 help="Sequence(s) to be modelled. Add multiple sequences for hetero modelling." title="Target sequence">
107 <param name="sequence" type="text" optional="false"
108 label="Sequence"/>
109 </repeat>
110 <param name="template_file" type="data" format="txt" optional="false" label="Template coordinates file"
111 help="File with template coordinaqtes in PDB legacy format."/>
112 </when>
113 </conditional>
114 <section name="output_format" title="Output format options">
115 <param name="modelcif" type="boolean" truevalue="" falsevalue="--no-modelcif" checked="true" label="ModelCIF format"/>
116 <param name="pdb" type="boolean" truevalue="--fetch-pdb" falsevalue="" checked="false" label="PDB legacy format"/>
117 </section>
118 </inputs>
119 <outputs>
120 <collection name="json_collection" type="list"
121 label="Metadata files for $project_title">
122 <discover_datasets directory="output_dir/JSON" format="json" pattern="(?P&lt;name&gt;.+)\.json$"/>
123 </collection>
124 <collection name="pdb_collection" type="list"
125 label="PDB files for $project_title">
126 <discover_datasets directory="output_dir/PDB" format="pdb" pattern="(?P&lt;name&gt;.+)\.pdb$"/>
127 <filter>output_format['pdb'] == True</filter>
128 </collection>
129 <collection name="modelcif_collection" type="list"
130 label="ModelCIF files for $project_title">
131 <discover_datasets directory="output_dir/ModelCIF" format="cif" pattern="(?P&lt;name&gt;.+)\.cif$"/>
132 <filter>output_format['modelcif'] == True</filter>
133 </collection>
134 </outputs>
135 <tests>
136 <!-- w/o params, all will be empty strings, fail -->
137 <test expect_exit_code="2" expect_failure="true">
138 <assert_stderr>
139 <has_line line="Argument of '&lt;SEQUENCE[S]&gt;' can not be an empty"/>
140 </assert_stderr>
141 </test>
142 <!-- with sequences, everything else empty, fail -->
143 <test expect_exit_code="2" expect_failure="true">
144 <conditional name="project">
145 <repeat name="target_list">
146 <param name="sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPVKVSGEVCGL"/>
147 </repeat>
148 <repeat name="target_list">
149 <param name="sequence" value="AKGLHGFHVHEFGDNTNGCMSSGPHFNPYGKE"/>
150 </repeat>
151 </conditional>
152 <assert_stderr>
153 <has_line line="Argument of '&lt;TOKEN&gt;' can not be an empty string"/>
154 </assert_stderr>
155 </test>
156 <!-- sequence and token (complete automodel job), fail (no real token) -->
157 <test expect_exit_code="1" expect_failure="true">
158 <conditional name="project">
159 <repeat name="target_list">
160 <param name="sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPVKVSGEVCGL"/>
161 </repeat>
162 </conditional>
163 <param name="token" value="NOTAVALIDTOKEN"/>
164 <assert_stderr>
165 <has_line line="RuntimeError: Submitting modelling job failed (401)"/>
166 </assert_stderr>
167 </test>
168 <!-- alignment mode tests, as few params as possible, fail -->
169 <test expect_exit_code="2" expect_failure="true">
170 <conditional name="project">
171 <param name="project_type" value="alignment"/>
172 <param name="assembly_id" value="0"/>
173 <param name="template_seqres_offset" value="0"/>
174 </conditional>
175 <assert_stderr>
176 <has_line line="Option '--auth-asym-id' can not be an empty string"/>
177 </assert_stderr>
178 </test>
179 <!-- alignment mode tests, with auth_asym_id, fail -->
180 <test expect_exit_code="2" expect_failure="true">
181 <conditional name="project">
182 <param name="assembly_id" value="0"/>
183 <param name="auth_asym_id" value="A"/>
184 <param name="project_type" value="alignment"/>
185 <param name="template_seqres_offset" value="0"/>
186 </conditional>
187 <assert_stderr>
188 <has_line line="Option '--pdb-id' can not be an empty string"/>
189 </assert_stderr>
190 </test>
191 <!-- alignment mode tests, with pdb_id, fail -->
192 <test expect_exit_code="2" expect_failure="true">
193 <conditional name="project">
194 <param name="assembly_id" value="0"/>
195 <param name="auth_asym_id" value="A"/>
196 <param name="pdb_id" value="1AKE"/>
197 <param name="project_type" value="alignment"/>
198 <param name="template_seqres_offset" value="0"/>
199 </conditional>
200 <assert_stderr>
201 <has_line line="Option '--template-sequence' can not be an empty string"/>
202 </assert_stderr>
203 </test>
204 <!-- alignment mode tests, with template_sequence, fail -->
205 <test expect_exit_code="2" expect_failure="true">
206 <conditional name="project">
207 <param name="assembly_id" value="0"/>
208 <param name="auth_asym_id" value="A"/>
209 <param name="pdb_id" value="1AKE"/>
210 <param name="project_type" value="alignment"/>
211 <param name="template_seqres_offset" value="0"/>
212 <param name="template_sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPV"/>
213 </conditional>
214 <assert_stderr>
215 <has_line line="Argument of '&lt;SEQUENCE[S]&gt;' can not be an empty"/>
216 </assert_stderr>
217 </test>
218 <!-- alignment mode tests, with sequence, fail -->
219 <test expect_exit_code="2" expect_failure="true">
220 <conditional name="project">
221 <param name="assembly_id" value="0"/>
222 <param name="auth_asym_id" value="A"/>
223 <param name="pdb_id" value="1AKE"/>
224 <param name="project_type" value="alignment"/>
225 <param name="target_sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPVKVSG"/>
226 <param name="template_seqres_offset" value="0"/>
227 <param name="template_sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPV"/>
228 </conditional>
229 <assert_stderr>
230 <has_line line="Argument of '&lt;TOKEN&gt;' can not be an empty string"/>
231 </assert_stderr>
232 </test>
233 <!-- alignment mode tests, with token, fail -->
234 <test expect_exit_code="1" expect_failure="true">
235 <conditional name="project">
236 <param name="assembly_id" value="0"/>
237 <param name="auth_asym_id" value="A"/>
238 <param name="pdb_id" value="1AKE"/>
239 <param name="project_type" value="alignment"/>
240 <param name="target_sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPVKVSG"/>
241 <param name="template_seqres_offset" value="0"/>
242 <param name="template_sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPV"/>
243 </conditional>
244 <param name="token" value="NOTAVALIDTOKEN"/>
245 <assert_stderr>
246 <has_line line="RuntimeError: Submitting modelling job failed (401)"/>
247 </assert_stderr>
248 </test>
249 <!-- usertemplate mode tests, as few params as possible, fail -->
250 <test expect_exit_code="2" expect_failure="true">
251 <conditional name="project">
252 <param name="project_type" value="usertemplate"/>
253 <param name="template_file" value="model_01.pdb"/>
254 </conditional>
255 <assert_stderr>
256 <has_line line="Argument of '&lt;SEQUENCE[S]&gt;' can not be an empty"/>
257 </assert_stderr>
258 </test>
259 <!-- usertemplate mode tests, with sequence, fail -->
260 <test expect_exit_code="2" expect_failure="true">
261 <conditional name="project">
262 <param name="project_type" value="usertemplate"/>
263 <param name="template_file" value="model_01.pdb"/>
264 <repeat name="target_list">
265 <param name="sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPVKVSGEVCGL"/>
266 </repeat>
267 <repeat name="target_list">
268 <param name="sequence" value="AKGLHGFHVHEFGDNTNGCMSSGPHFNPYGKE"/>
269 </repeat>
270 </conditional>
271 <assert_stderr>
272 <has_line line="Argument of '&lt;TOKEN&gt;' can not be an empty string"/>
273 </assert_stderr>
274 </test>
275 <!-- usertemplate mode tests, with token, fail -->
276 <test expect_exit_code="1" expect_failure="true">
277 <conditional name="project">
278 <param name="project_type" value="usertemplate"/>
279 <param name="template_file" value="model_01.pdb"/>
280 <repeat name="target_list">
281 <param name="sequence" value="MVVKAVCVINGDAKGTVFFEQESSGTPVKVSGEVCGL"/>
282 </repeat>
283 <repeat name="target_list">
284 <param name="sequence" value="AKGLHGFHVHEFGDNTNGCMSSGPHFNPYGKE"/>
285 </repeat>
286 </conditional>
287 <param name="token" value="NOTAVALIDTOKEN"/>
288 <assert_stderr>
289 <has_line line="RuntimeError: Submitting modelling job failed (401)"/>
290 </assert_stderr>
291 </test>
292 </tests>
293 <help><![CDATA[
294 The SWISS-MODEL Modelling API tool gives you convenient access to homology models build by `SWISS-MODEL <https://swissmodel.expasy.org>`_ via our `API <https://swissmodel.expasy.org/docs/help#modelling_api>`_.
295
296 By default, the tool fetches model coordinates in ModelCIF format from the SWISS-MODEL API. SWISS-MODEL enriches its ModelCIF files with lots of extra information, essential for later reproduction of the computational experiment and enabling for easy deposition at archiving sites, like `Model Archive <https://modelarchive.org>`_. Output format can be toggled in the *Output format options* section for legacy PDB format, in case you are dealing with old-school tools in your workflows. Regardless of the format, output file names follow the pattern ``model_<N>.[cif|pdb]``.
297
298 The SWISS-MODEL API provides three major modelling modes: Automodel, alignment and template upload mode.
299
300 Automodel mode
301 --------------
302
303 This mode corresponds to the "Sequence(s)" input mode and just hitting the "Build Model" button on our `web page <https://swissmodel.expasy.org/interactive>`_.
304
305 Automodel goes from sequence(s) to structural model. A single sequence for input leads to monomers or homomers. Multiple sequences for input produces heteromers, incorporating all target sequences. Multiple sequences input is sometimes mistaken for multi-model modelling tasks but its not, to produce models for more than one target sequence, you need to run the tool for each sequence separately.
306
307 Inside an automodel job, the following happens:
308
309 1. Template search in `PDB <https://www.rcsb.org>`_ and AlphaFold DB v4 sequences
310 2. Template selection by estimated quality and target sequence coverage
311
312 - gain high model confidence
313 - cover as much of the target sequence, maybe by different models per region
314 - employ models for equal regions if structurally diverse
315
316 3. Build models
317
318 Automodel options
319 ~~~~~~~~~~~~~~~~~
320
321 Only one or more sequences required, that's all! Single sequence produces monomers and/ or homomers. Multiple sequences produces heteromers.
322
323
324 Alignment mode
325 --------------
326
327 This mode corresponds to the "Target-Template Alignment" input mode on our `web page <https://swissmodel.expasy.org/interactive#alignment>`_.
328
329 The alignment mode still builds a model for a target sequence and a template from the `SWISS-MODEL template library <https://swissmodel.expasy.org/templates/>`_ (**SMTL**). But instead of creating the alignment from its own template search run, SWISS-MODEL will use an alignment provided by yourself. The alignment will be mapped onto the template sequence and then a structural model will be build.
330
331 To properly map a your alignment within the SMTL, you need to provide some extra information. SWISS-MODEL needs the identifier of the template. That's a common PDB ID, it just needs to exist in the SMTL. Then you need to identify the biological assembly of the entry you want your model to be based on... which can be easily done from the SMTL page. The assembly ID comes with the SMTL ID, its the number after the PDB ID and alternative assemblies of an entry can be found at the bottom of an entry page. The last component is the chain name you used for the alignment. Be aware, the SMTL uses its own chain names, so the original PDB chain name may not work. A mapping of chain names is provided on SMTL entry pages.
332
333 Alignment mode options
334 ~~~~~~~~~~~~~~~~~~~~~~
335
336 - Target sequence: first part of the alignment
337 - Template sequence: second sequence of the alignment
338 - Template sequence offset: position the template sequence starts at with respect to the full sequence; When using only a sub-sequence of the full sequence, it may be hard to automatically map to the right region in case of repeats, so you need to provide the offset
339 - PDB/ SMTL ID: PDB ID of the SMTL entry the alignment refers to
340 - Assembly ID: ID of the biological assembly to be used as template
341 - Chain name: ID of the chain to be used for modelling, needs to be the SMTL name, not the PDB name
342
343
344 User template mode
345 ------------------
346
347 This mode corresponds to the "User Template" input mode on our `web page <https://swissmodel.expasy.org/interactive#structure>`_.
348
349 The user template mode builds a model for a target sequence and template coordinates provided by you instead of using a SMTL entry for coordinates. The sequence alignment between target and template sequence is still calculated by SWISS-MODEL using HHblits and BLAST, or local alignment algorithm if both methods fail. With the alignment, a structural model is build based on the provided template coordinates.
350
351 Inside a user template job, the following happens:
352
353 1. Analyse uploaded coordinates
354 2. Calculate alignments with HHblits & BLAST
355 3. Choose "better" alignment or calculate Smith-Waterman alignment
356 4. Build model
357
358 User template mode options
359 ~~~~~~~~~~~~~~~~~~~~~~~~~~
360 - Target sequence: sequence to be modelled (post multiple for heteros)
361 - Template coordinate file: your template file, must be PDB formatted
362
363 Attribution/ License
364 ~~~~~~~~~~~~~~~~~~~~
365
366 Terms of use can be found at https://swissmodel.expasy.org/docs/terms_of_use
367
368 Modelling results of SWISS-MODEL are licensed under the
369 `CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 International License <https://creativecommons.org/licenses/by-sa/4.0/legalcode>`_.
370
371 ]]>
372 </help>
373 <citations>
374 <!-- SWISS-MODEL -->
375 <citation type="doi">10.1093/nar/gky427</citation>
376 <!-- ProMod3 -->
377 <citation type="doi">10.1371/journal.pcbi.1008667</citation>
378 <!-- QMEANDisCo -->
379 <citation type="doi">10.1093/bioinformatics/btz828</citation>
380 <!-- Quaternary Structure Prediction/ QSQE -->
381 <citation type="doi">10.1038/s41598-017-09654-8</citation>
382 <!-- lDDT -->
383 <citation type="doi">10.1093/bioinformatics/btt473</citation>
384 </citations>
385 <creator>
386 <person email="stefan.bienert@unibas.ch" familyName="Bienert" givenName="Stefan"/>
387 <organization name="Swiss Institute of Bioinformatics" alternateName="SIB" url="https://www.sib.swiss"/>
388 <organization name="Biozentrum, University of Basel" alternateName="Biozentrum" url="https://www.biozentrum.unibas.ch"/>
389 </creator>
390 </tool>