comparison muspinsim_combine.xml @ 0:06aabd70b869 draft default tip

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/muspinsim_combine commit 70a4d37ecdf5d586703cfc509922311e95d3205c
author muon-spectroscopy-computational-project
date Tue, 18 Jul 2023 13:26:03 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:06aabd70b869
1 <tool id="muspinsim_combine" name="MuSpinSim Combine" version="@MUSPINSIM_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">
2 <description>combine datafiles generated from MuSpinSim</description>
3 <macros>
4 <!-- Don't have MuSpinSim as dependency, but use that to version as need
5 to maintain compatibility with its output files -->
6 <!-- version of this tool wrapper (integer) -->
7 <token name="@WRAPPER_VERSION@">0</token>
8 <import>muon_macros.xml</import>
9 </macros>
10 <creator>
11 <person givenName="Patrick" familyName="Austin" url="https://github.com/patrick-austin" identifier="https://orcid.org/0000-0002-6279-7823"/>
12 <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/>
13 </creator>
14 <requirements>
15 <!-- Use the same dependency versions as the current MuSpinSim has -->
16 <requirement type="package" version="1.22.0">numpy</requirement>
17 <requirement type="package" version="1.8.1">scipy</requirement>
18 </requirements>
19 <required_files>
20 <include type="literal" path="combine.py"/>
21 </required_files>
22 <command detect_errors="exit_code"><![CDATA[
23 python '${__tool_directory__}/combine.py' inputs.json
24 ]]></command>
25 <configfiles>
26 <inputs name="inputs" data_style="paths" filename="inputs.json"/>
27 </configfiles>
28 <inputs>
29 <param name="data_in" type="data" format="txt" multiple="true" label="Muspinsim Experiment Data (.dat)"/>
30 <param name="bins" type="integer" min="1" optional="true" label="Number of X Bins" help="Optional. If unset, then will use as many bins as there are x points in the smallest .dat file."/>
31 </inputs>
32 <outputs>
33 <data format="txt" name="data_out" from_work_dir="data_out.dat"/>
34 </outputs>
35 <tests>
36 <test expect_num_outputs="1">
37 <param name="data_in" value="low.dat"/>
38 <output name="data_out" ftype="txt" file="out_low.dat"/>
39 </test>
40 <test expect_num_outputs="1">
41 <param name="data_in" value="low.dat,low.dat"/>
42 <output name="data_out" ftype="txt" file="out_low.dat"/>
43 </test>
44 <test expect_num_outputs="1">
45 <param name="data_in" value="low.dat,high.dat"/>
46 <output name="data_out" ftype="txt" file="out_low_high.dat"/>
47 </test>
48 <test expect_num_outputs="1">
49 <param name="data_in" value="low.dat,mid.dat,high.dat"/>
50 <output name="data_out" ftype="txt" file="out_all.dat"/>
51 </test>
52 <test expect_num_outputs="1">
53 <param name="data_in" value="low.dat,mid.dat,high.dat"/>
54 <param name="bins" value="10"/>
55 <output name="data_out" ftype="txt" file="out_all_10.dat"/>
56 </test>
57 </tests>
58 <help><![CDATA[
59 Utility tool for combining multiple MuSpinSim `.dat` files.
60
61 In cases where all input files have the same x values, will simply
62 take the mean value at each point. In cases where this isn't the case,
63 the data is binned, and the y values in each bin averaged. The bins are
64 chosen to be equally spaced and cover the entire x range. Note that the
65 x points in the resultant `.dat` file will be taken as the centre of
66 each bin, and so generally will not align with any of the original
67 ranges.
68
69 In cases where there is an empty bin (for example when the range covered
70 by two files do not overlap), the output will be be `nan`.
71 ]]></help>
72 <citations>
73 <citation type="doi">@MUSPINSIM_CITATION@</citation>
74 </citations>
75 </tool>