comparison ob_convert.xml @ 9:a072cb207571 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/openbabel commit a889b6ed75666406a95e29d672b58a8fee6e8784"
author bgruening
date Thu, 22 Aug 2019 10:30:36 -0400
parents a9df9aae60bb
children 1c66bf08f687
comparison
equal deleted inserted replaced
8:d00ae56d3ba5 9:a072cb207571
11 <command detect_errors="aggressive"> 11 <command detect_errors="aggressive">
12 <![CDATA[ 12 <![CDATA[
13 13
14 #set $format = $oformat.oformat_opts_selector 14 #set $format = $oformat.oformat_opts_selector
15 15
16 #if $format == "fs": 16 #if $format == 'fs':
17 ## For the fastsearch index we need to copy the original molecule files to the composite datatype of obfs. 17 ## For the fastsearch index we need to copy the original molecule files to the composite datatype of obfs.
18 ## Because openbabel likes file extensions, we give the molecule file a proper file extension. 18 ## Because openbabel likes file extensions, we give the molecule file a proper file extension.
19 mkdir $outfile.files_path; 19 mkdir $outfile.files_path;
20 cp "${infile}" ${os.path.join($outfile.files_path, 'molecule.%s' % $infile.ext )}; 20 cp '${infile}' ${os.path.join($outfile.files_path, 'molecule.%s' % $infile.ext )};
21 #end if 21 #end if
22 22
23 obabel -i "${infile.ext}" 23 #if $split == 'true':
24 24 mkdir output &&
25 #if $format == "fs": 25 #end if
26
27 obabel -i '${infile.ext}'
28
29 #if $format == 'fs':
26 ## the fs filetype need his own symlink path, all others can take the original ones 30 ## the fs filetype need his own symlink path, all others can take the original ones
27 ${os.path.join($outfile.files_path, 'molecule.%s' % $infile.ext )} 31 ${os.path.join($outfile.files_path, 'molecule.%s' % $infile.ext )}
28 -o "$format" -e 32 -o '$format' -e
29 -O ${os.path.join($outfile.files_path,'molecule.fs')} 33 -O ${os.path.join($outfile.files_path,'molecule.fs')}
30 #if int($oformat.fs_fold) > 0: 34 #if int($oformat.fs_fold) > 0:
31 -xN$oformat.fs_fold 35 -xN$oformat.fs_fold
32 #end if 36 #end if
33 ${oformat.fs_fptype} 37 ${oformat.fs_fptype}
34 #else: 38 #else:
35 "${infile}" 39 '${infile}'
36 -o "${format}" 40 -o '${format}'
37 -O "${outfile}" 41 #if $split == 'true':
42 -O 'output/molecule.$format'
43 -m
44 #else:
45 -O '${outfile}'
46 #end if
38 -e 47 -e
39 #end if 48 #end if
40 49
41 #if $format == 'cml': 50 #if $format == 'cml':
42 $oformat.cml_array 51 $oformat.cml_array
186 <option value="mpd">Sybyl descriptor format</option> 195 <option value="mpd">Sybyl descriptor format</option>
187 <option value="mpqcin">MPQC simplified input format</option> 196 <option value="mpqcin">MPQC simplified input format</option>
188 <option value="nw">NWChem input format</option> 197 <option value="nw">NWChem input format</option>
189 <option value="pcm">PCModel format</option> 198 <option value="pcm">PCModel format</option>
190 <option value="pdb">Protein Data Bank format (pdb)</option> 199 <option value="pdb">Protein Data Bank format (pdb)</option>
200 <option value="pdbqt">PDBQT input format</option>
191 <option value="pov">POV-Ray input format</option> 201 <option value="pov">POV-Ray input format</option>
192 <option value="pqs">Parallel Quantum Solutions format</option> 202 <option value="pqs">Parallel Quantum Solutions format</option>
193 <option value="qcin">Q-Chem input format</option> 203 <option value="qcin">Q-Chem input format</option>
194 <option value="report">Open Babel report format</option> 204 <option value="report">Open Babel report format</option>
195 <option value="rxn">MDL RXN format</option> 205 <option value="rxn">MDL RXN format</option>
333 <when value="mpd" /> 343 <when value="mpd" />
334 <when value="mpqcin" /> 344 <when value="mpqcin" />
335 <when value="nw" /> 345 <when value="nw" />
336 <when value="pcm" /> 346 <when value="pcm" />
337 <when value="pdb" /> 347 <when value="pdb" />
348 <when value="pdbqt" />
338 <when value="pov" /> 349 <when value="pov" />
339 <when value="pqs" /> 350 <when value="pqs" />
340 <when value="qcin" /> 351 <when value="qcin" />
341 <when value="report" /> 352 <when value="report" />
342 <when value="rxn" /> 353 <when value="rxn" />
377 <when value="yob" /> 388 <when value="yob" />
378 <when value="zin" /> 389 <when value="zin" />
379 </conditional> 390 </conditional>
380 391
381 <!-- Options for all formats.--> 392 <!-- Options for all formats.-->
393 <param name="split" type="boolean" value="false" label="Split multi-molecule files into a collection"/>
382 <param name="remove_h" type="boolean" truevalue="-d" falsevalue="" 394 <param name="remove_h" type="boolean" truevalue="-d" falsevalue=""
383 label="Delete hydrogen atoms, make all hydrogens implicit" help="(-d)" /> 395 label="Delete hydrogen atoms, make all hydrogens implicit" help="(-d)" />
384 <param name="ph" type="float" value="-1" label="Add hydrogens appropriate for pH" help="-1 means deactivated (-p)"/> 396 <param name="ph" type="float" value="-1" label="Add hydrogens appropriate for pH" help="-1 means deactivated (-p)"/>
385 <param name="dative_bonds" type="boolean" truevalue="-b" falsevalue="" 397 <param name="dative_bonds" type="boolean" truevalue="-b" falsevalue=""
386 label="Convert dative bonds" help="e.g. [N+]([O-])=O to N(=O)=O (-b)" /> 398 label="Convert dative bonds" help="e.g. [N+]([O-])=O to N(=O)=O (-b)" />
413 </conditional> 425 </conditional>
414 </inputs> 426 </inputs>
415 427
416 <outputs> 428 <outputs>
417 <data name="outfile" format="text" label="Convert to ${oformat.oformat_opts_selector} from ${on_string}"> 429 <data name="outfile" format="text" label="Convert to ${oformat.oformat_opts_selector} from ${on_string}">
430 <filter>split == False</filter>
418 <change_format> 431 <change_format>
419 <when input="oformat.oformat_opts_selector" value="sdf" format="sdf"/> 432 <when input="oformat.oformat_opts_selector" value="sdf" format="sdf"/>
420 <when input="oformat.oformat_opts_selector" value="can" format="smi"/> 433 <when input="oformat.oformat_opts_selector" value="can" format="smi"/>
421 <when input="oformat.oformat_opts_selector" value="smi" format="smi"/> 434 <when input="oformat.oformat_opts_selector" value="smi" format="smi"/>
422 <when input="oformat.oformat_opts_selector" value="mol2" format="mol2"/> 435 <when input="oformat.oformat_opts_selector" value="mol2" format="mol2"/>
423 <when input="oformat.oformat_opts_selector" value="inchi" format="inchi"/> 436 <when input="oformat.oformat_opts_selector" value="inchi" format="inchi"/>
424 <when input="oformat.oformat_opts_selector" value="cml" format="cml"/> 437 <when input="oformat.oformat_opts_selector" value="cml" format="cml"/>
425 <when input="oformat.oformat_opts_selector" value="mol" format="mol"/> 438 <when input="oformat.oformat_opts_selector" value="mol" format="mol"/>
426 <when input="oformat.oformat_opts_selector" value="pdb" format="pdb"/> 439 <when input="oformat.oformat_opts_selector" value="pdb" format="pdb"/>
440 <when input="oformat.oformat_opts_selector" value="pdbqt" format="pdbqt"/>
427 <when input="oformat.oformat_opts_selector" value="fs" format="obfs"/> 441 <when input="oformat.oformat_opts_selector" value="fs" format="obfs"/>
428 </change_format> 442 </change_format>
429 </data> 443 </data>
444
445 <collection name="file_outputs" type="list" label="Prepared ligands" >
446 <filter>split == True</filter>
447 <discover_datasets pattern="__name_and_ext__" directory="output" visible="false" />
448 </collection>
430 </outputs> 449 </outputs>
431 <tests> 450 <tests>
432 <test> 451 <test>
433 <param name="infile" ftype="sdf" value="CID_2244.sdf"/> 452 <param name="infile" ftype="sdf" value="CID_2244.sdf"/>
434 <param name="oformat_opts_selector" value="cml" /> 453 <param name="oformat_opts_selector" value="cml" />
460 <test> 479 <test>
461 <param name="infile" ftype="sdf" value="CID_2244.sdf"/> 480 <param name="infile" ftype="sdf" value="CID_2244.sdf"/>
462 <param name="oformat_opts_selector" value="sdf" /> 481 <param name="oformat_opts_selector" value="sdf" />
463 <output name="outfile" ftype="sdf" file="ob_convert_on_CID2244.sdf" lines_diff="2"/> 482 <output name="outfile" ftype="sdf" file="ob_convert_on_CID2244.sdf" lines_diff="2"/>
464 </test> 483 </test>
484 <test>
485 <param name="infile" ftype="smi" value="2_mol.smi"/>
486 <param name="oformat_opts_selector" value="pdbqt"/>
487 <param name="split" value="true"/>
488 <output_collection name="file_outputs" type="list" count="2">
489 <element name="molecule1" file="split1.pdbqt" />
490 <element name="molecule2" file="split2.pdbqt" />
491 </output_collection>
492 </test>
465 </tests> 493 </tests>
466 <help> 494 <help>
467 <![CDATA[ 495 <![CDATA[
468 496
469 .. class:: infomark 497 .. class:: infomark