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