Mercurial > repos > ximgchess > hedm_lattice_parameter_correction
comparison macros.xml @ 0:59453ad6e219 draft
"planemo upload for repository https://github.com/ximg-chess/galaxytools/tools/hedm_lattice_parameter_correction commit 420bbed5449757711b88200208bb050e0797f5a3"
| author | ximgchess |
|---|---|
| date | Thu, 19 May 2022 16:48:22 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:59453ad6e219 |
|---|---|
| 1 <macros> | |
| 2 <token name="@TOOL_VERSION@">0.8.19</token> | |
| 3 <token name="@VERSION_SUFFIX@">0</token> | |
| 4 <token name="@PROFILE@">21.09</token> | |
| 5 <xml name="requirements"> | |
| 6 <requirements> | |
| 7 <requirement type="package" version="@TOOL_VERSION@">hexrd</requirement> | |
| 8 <yield/> | |
| 9 </requirements> | |
| 10 </xml> | |
| 11 <xml name="citations"> | |
| 12 <citations> | |
| 13 <citation type="doi">10.1016/j.matchar.2020.110366</citation> | |
| 14 <yield /> | |
| 15 </citations> | |
| 16 </xml> | |
| 17 | |
| 18 <token name="@CMD_IMPORTS@"> | |
| 19 #import re | |
| 20 #import yaml | |
| 21 #def identifier_or_name($input1) | |
| 22 #if hasattr($input1, 'element_identifier') | |
| 23 #return $input1.element_identifier | |
| 24 #elif hasattr($input1, 'name') | |
| 25 #return $input1.name | |
| 26 #else | |
| 27 #return str($input1) | |
| 28 #end if | |
| 29 #end def | |
| 30 #def clean($name1) | |
| 31 #set $name_clean = $re.sub('[^\w\-_]', '_', $re.sub('(?i)[.](npz|hexrd|yml|dat|out)$','', $name1.split()[-1])) | |
| 32 #return $name_clean | |
| 33 #end def | |
| 34 #def ln_name($ds,$ext) | |
| 35 #set $lname = "%s.%s" % ($clean($identifier_or_name($ds)),$ext) | |
| 36 #return $lname | |
| 37 #end def | |
| 38 #def update_config($cfg_in, $mat_path, $inst_path) | |
| 39 #set $cfg = $yaml.safe_load(open(str($cfg_in),'r')) | |
| 40 #if $mat_path and 'material' in $cfg and 'definitions' in $cfg['material'] | |
| 41 #silent $cfg['material']['definitions'] = str($mat_path) | |
| 42 #end if | |
| 43 #if $inst_path and 'instrument' in $cfg | |
| 44 #silent $cfg['instrument'] = str($inst_path) | |
| 45 #end if | |
| 46 #slurp | |
| 47 $yaml.dump($cfg) | |
| 48 #end def | |
| 49 </token> | |
| 50 </macros> |
