Skip to content

Commit 8c25937

Browse files
gxydevbotplanemo-autoupdatehechth
authored
Updating tools/rcx-tk from version 0.2.2 to 0.3.1 (#767)
* Updating tools/rcx-tk from version 0.2.2 to 0.3.1 * updated command section to comply with 0.3.1 --------- Co-authored-by: planemo-autoupdate <planemo-autoupdate@users.noreply.github.com> Co-authored-by: Helge Hecht <helge.hecht@recetox.muni.cz>
1 parent 197f0f4 commit 8c25937

2 files changed

Lines changed: 41 additions & 26 deletions

File tree

tools/rcx-tk/macros.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<macros>
2-
<token name="@TOOL_VERSION@">0.2.2</token>
2+
<token name="@TOOL_VERSION@">0.3.1</token>
33
<xml name="creator">
44
<creator>
55
<person

tools/rcx-tk/rcx-tk.xml

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<tool id="rcx-tk" name="rcx-tk" version="@TOOL_VERSION@+galaxy0" profile="23.05">
2-
<description>Processes and standardizes sequence, alkane or MSDial output files for downstream analysis.</description>
2+
<description>Processes and standardizes sequence, alkane, or MSDial output files for downstream analysis.</description>
33
<macros>
44
<import>macros.xml</import>
55
</macros>
@@ -17,65 +17,80 @@
1717
</requirements>
1818
<expand macro="creator"/>
1919
<command detect_errors="aggressive"><![CDATA[
20-
#set $input_file_new = 'input.' + str($input_file.ext)
21-
cp ${input_file} ${input_file_new} &&
22-
python3 -m rcx_tk --method ${method} ${input_file_new} 'output.tsv'
20+
#set $input_file_new = 'input.' + str($input_file.ext)
21+
cp ${input_file} ${input_file_new} &&
22+
#if $method == "msdial"
23+
python3 -m rcx_tk ${method} ${input_file_new} 'output.tsv' $mz_tol_ppm
24+
#else
25+
python3 -m rcx_tk ${method} ${input_file_new} 'output.tsv'
26+
#end if
2327
]]></command>
2428
<inputs>
25-
<param name="input_file" type="data" format="csv,tabular,tsv,xls,xlsx,txt" label="Input data file" help="Upload your sample sequence or alkane file."/>
26-
<param name="method" type="select" label="Processing method" help="Select whether to process a sequence file or an alkane file. This determines the column arrangement and validation steps.">
27-
<option value="sequence" selected="true">Sequence file</option>
28-
<option value="alkanes">Alkane file</option>
29-
<option value="msdial">MS-DIAL file</option>
30-
</param>
29+
<param name="input_file" type="data" format="csv,tabular,tsv,xls,xlsx,txt" label="Input data file" help="Upload your sample sequence, alkane, or MS-DIAL file."/>
30+
<conditional name="command">
31+
<param name="method" type="select" label="Processing method" help="Select the rcx-tk subcommand to run. This determines the column arrangement, validation steps, and CLI invocation.">
32+
<option value="sequence" selected="true">Sequence file</option>
33+
<option value="alkanes">Alkane file</option>
34+
<option value="msdial">MS-DIAL file</option>
35+
</param>
36+
<when value="sequence"/>
37+
<when value="alkanes" />
38+
<when value="msdial">
39+
<param argument="mz_tol_ppm" type="integer" min="1" max="100" value="5" label="m/z tolerance [ppm]" help="Tolerance for splitting clusters from different ions." />
40+
</when>
41+
</conditional>
42+
3143
</inputs>
3244
<outputs>
3345
<data name="output_file" format="tabular" from_work_dir = "output.tsv" label="Processed as ${method} on dataset ${input_file.id}"/>
3446
</outputs>
3547
<tests>
3648
<test>
3749
<param name="input_file" value="input_metadata.tabular"/>
38-
<param name="method" value="sequence"/>
50+
<param name="command|method" value="sequence"/>
3951
<output name="output_file" file="output_metadata.tsv"/>
4052
</test>
4153
<test>
4254
<param name="input_file" value="input_alkanes.txt"/>
43-
<param name="method" value="alkanes"/>
55+
<param name="command|method" value="alkanes"/>
4456
<output name="output_file" file="output_alkanes.tsv"/>
4557
</test>
4658
<test>
47-
<param name="input_file" location="https://raw.githubusercontent.com/RECETOX/rcx-tk/refs/tags/v0.2.2/tests/test_data/msdial_katka.tsv"/>
48-
<param name="method" value="msdial"/>
49-
<output name="output_file" location="https://raw.githubusercontent.com/RECETOX/rcx-tk/refs/tags/v0.2.2/tests/test_data/msdial_katka_corrected.tsv"/>
59+
<param name="input_file" location="https://raw.githubusercontent.com/RECETOX/rcx-tk/refs/tags/v0.3.1/tests/test_data/msdial_katka.tsv"/>
60+
<param name="command|method" value="msdial"/>
61+
<output name="output_file" location="https://raw.githubusercontent.com/RECETOX/rcx-tk/refs/tags/v0.3.1/tests/test_data/msdial_katka_corrected.tsv"/>
5062
</test>
5163
</tests>
5264
<help><![CDATA[
5365
5466
.. _rcx_tk:
5567
56-
======================================
57-
rcx-tk: Sequence/Alkane File Processor
58-
======================================
68+
====================================================
69+
rcx-tk: Sequence, Alkane, and MS-DIAL File Processor
70+
====================================================
5971
6072
**Tool Description**
6173
62-
rcx-tk is a tool for processing sample sequence and alkane files. It standardizes your input by rearranging columns, validating file names, and deriving new columns such as `sampleName`, `sequenceIdentifier`, `sampleIdentifier`, and `localOrder`. This ensures your data is ready for downstream analysis and compatible with standardized workflows.
74+
rcx-tk is a tool for processing sequence metadata, alkane retention index, and MS-DIAL output files. It standardizes inputs by rearranging columns, validating file names, and deriving new columns such as `sampleName`, `sequenceIdentifier`, `subjectIdentifier`, and `localOrder`. For MS-DIAL files, it also merges duplicate alignments using the package's click-based subcommand interface.
6375
6476
How it works
6577
------------
6678
67-
- **Column rearrangement**: Ensures columns are in the correct order for further processing.
68-
- **File name validation**: Checks that file names follow expected conventions.
69-
- **Derivation of new columns**: Automatically generates useful columns for sample tracking and analysis.
79+
- **Sequence files**: validates file names, checks that `injectionOrder` is an integer, and derives metadata columns from the file name.
80+
- **Alkane files**: keeps the alkane columns used by rcx-tk and renames them to the normalized output format.
81+
- **MS-DIAL files**: reads the MS-DIAL table, identifies duplicate alignments, and refines them using the tolerance value.
7082
7183
Inputs
7284
------
7385
7486
1. **Input data file**
75-
Upload your sample sequence or alkane file. Supported formats: CSV, TSV, tabular, XLS, XLSX, or TXT.
87+
Upload your sample sequence, alkane, or MS-DIAL file. Supported formats: CSV, TSV, tabular, XLS, XLSX, or TXT.
7688
7789
2. **Processing method**
78-
Select whether to process a sequence file or an alkane file. This determines the column arrangement and validation steps.
90+
Select which rcx-tk subcommand to run. This determines the column arrangement, validation steps, and whether MS-DIAL duplicate merging is applied.
91+
92+
3. **MS-DIAL tolerance**
93+
When processing MS-DIAL files, you can provide an optional m/z tolerance in parts per million. The default used by rcx-tk is 5.
7994
8095
Outputs
8196
-------
@@ -86,7 +101,7 @@ Outputs
86101
Example
87102
-------
88103
89-
Suppose you have a sequence file in CSV or tabular format. Select "Sequence file" as the processing method and upload your file. The tool will output a processed TSV file with standardized columns and additional identifiers.
104+
Suppose you have a sequence file in CSV or tabular format. Select "Sequence file" as the processing method and upload your file. The tool will output a processed TSV file with standardized columns and additional identifiers. For MS-DIAL files, the tool invokes the `msdial` subcommand with the package's default tolerance unless you extend the wrapper to expose that argument.
90105
91106
Notes
92107
-----

0 commit comments

Comments
 (0)