-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathrecetox_aplcms_compute_clusters.xml
More file actions
68 lines (57 loc) · 2.38 KB
/
recetox_aplcms_compute_clusters.xml
File metadata and controls
68 lines (57 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<tool id="recetox_aplcms_compute_clusters" name="recetox-aplcms - compute clusters" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>compute clusters of mz and rt across samples and assign cluster IDs to individual features</description>
<macros>
<import>macros.xml</import>
<import>help.xml</import>
</macros>
<expand macro="annotation"/>
<edam_operations>
<edam_operation>operation_2928</edam_operation>
</edam_operations>
<expand macro="refs"/>
<expand macro="creator"/>
<expand macro="requirements"/>
<command detect_errors="aggressive"><![CDATA[
Rscript -e 'source("${__tool_directory__}/utils.R")' -e 'source("${run_script}")'
]]></command>
<configfiles>
<configfile name="run_script"><![CDATA[
#set filenames = str("', '").join([str($f) for $f in $files])
feature_tables <- load_parquet_collection(c('$filenames'))
sample_names <- unlist(lapply(feature_tables, load_sample_name))
validate_sample_names(sample_names)
ordering <- order(sample_names)
feature_tables <- feature_tables[ordering]
sample_names <- sample_names[ordering]
clusters <- compute_clusters_simple(
feature_tables = feature_tables,
sample_names = sample_names,
mz_tol_ppm = $mz_tol_relative_ppm,
rt_tol = $rt_tol
)
sample_names <- unlist(lapply(clusters, restore_sample_name))
save_parquet_collection(clusters, sample_names, "clustered")
]]></configfile>
</configfiles>
<inputs>
<param name="files" type="data_collection" collection_type="list" format="parquet" label="Input data"
help="List of tables containing features." />
<expand macro="tolerances"/>
</inputs>
<outputs>
<collection name="clustered_feature_tables" type="list"
label="${tool.name} feature_tables on ${on_string}">
<discover_datasets pattern="__designation__" directory="clustered" format="parquet" />
</collection>
</outputs>
<tests>
<test expect_failure="true" />
</tests>
<help>
<![CDATA[
@COMPUTE_CLUSTERS_HELP@
@GENERAL_HELP@
]]>
</help>
<expand macro="citations"/>
</tool>