annotate tomo/tomo_reduce.bu @ 83:9b6e931e0de0 draft

planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
author ximgchess
date Tue, 02 May 2023 15:07:28 +0000
parents 7638a2c68b7f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
79
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
1 <tool id="CHAP_tomo_reduce" name="Tomo Reduce" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@" python_template_version="@PYTHON_TEMPLATE_VERSION@">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
2 <description>Reduce tomography images</description>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
3 <macros>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
4 <import>tomo_macros.xml</import>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
5 </macros>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
6 <expand macro="requirements"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
7 <command detect_errors="exit_code">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
8 <![CDATA[
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
9 mkdir tomo_reduce_plots;
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
10 $__tool_directory__/../pip_install.sh 'certif-pyspec==1.5.3' &&
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
11 #if str($map.type_selector) == "yaml"
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
12 cp $input_file map.yaml &&
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
13 cat $__tool_directory__/$map.detector.type_selector $tool_config > reduce.yaml &&
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
14 #else
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
15 cp $input_file setup.nex &&
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
16 cp $tool_config reduce.yaml &&
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
17 #end if
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
18 CHAP --config
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
19 #if str($map.type_selector) == "yaml"
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
20 $__tool_directory__/pipeline_reduce_yaml.yaml
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
21 #else
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
22 $__tool_directory__/pipeline_reduce_nexus.yaml
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
23 #end if
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
24 ]]>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
25 </command>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
26 <configfiles>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
27 <configfile name="tool_config">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
28 <![CDATA[#slurp
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
29 #echo 'img_x_bounds:' #
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
30 #if str($img_x_bounds.type_selector) == "full_range"
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
31 #echo '- -1' #
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
32 #echo '- -1' #
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
33 #else
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
34 #echo '- ' + str($img_x_bounds.low) #
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
35 #echo '- ' + str($img_x_bounds.upp) #
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
36 #end if
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
37 ]]>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
38 </configfile>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
39 </configfiles>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
40 <inputs>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
41 <conditional name="map">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
42 <param name="type_selector" type="select" display="radio" label="Choose map file type">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
43 <option value="yaml">YAML</option>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
44 <option value="nexus">NeXus</option>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
45 </param>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
46 <when value="yaml">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
47 <param name="input_file" type="data" format="yaml" optional="false" label="Map config file"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
48 <conditional name="detector">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
49 <param name="type_selector" type="select" display="radio" label="Choose detector prefix">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
50 <option value="andor2.yaml">andor2</option>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
51 <option value="manta.yaml">manta</option>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
52 <option value="retiga.yaml">retiga</option>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
53 </param>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
54 <when value="andor2"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
55 <when value="manta"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
56 <when value="retiga"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
57 </conditional>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
58 </when>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
59 <when value="nexus">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
60 <param name="input_file" type="data" format="nex" optional="false" label="Tomography setup file"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
61 </when>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
62 </conditional>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
63 <conditional name="img_x_bounds">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
64 <param name="type_selector" type="select" label="Choose vertical detector image bounds">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
65 <option value="full_range" selected="true">Use the full image range</option>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
66 <option value="enter_range">Manually enter the image range</option>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
67 </param>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
68 <when value="full_range"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
69 <when value="enter_range">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
70 <param name="low" type="integer" value="-1" optional="false" label="Lower image range index"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
71 <param name="upp" type="integer" value="-1" optional="false" label="Upper image range index"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
72 </when>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
73 </conditional>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
74 </inputs>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
75 <outputs>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
76 <data name="tool_config" format="yaml" label="Tool config" from_work_dir="reduce.yaml" hidden="false"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
77 <collection name="tomo_reduce_plots" type="list" label="Data reduction images">
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
78 <discover_datasets pattern="__name_and_ext__" directory="tomo_reduce_plots"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
79 </collection>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
80 <data name="output_file" format="nex" label="Reduced tomography data" from_work_dir="output.nex"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
81 </outputs>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
82 <help>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
83 <![CDATA[
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
84 usage: PROG [-h] [--config CONFIG] [--verbose]
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
85
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
86 options:
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
87 -h, --help show this help message and exit
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
88 --config CONFIG Input configuration file
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
89 --verbose verbose output
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
90
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
91 ]]>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
92 </help>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
93 <expand macro="citations"/>
7638a2c68b7f planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit 64d735e72badb6466fcf32843328300887a4a46e-dirty
ximgchess
parents:
diff changeset
94 </tool>