comparison recetox_aplcms_compute_clusters.xml @ 2:ce00e1d03c31 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 724ecb1b81ebd8a67488b8a9397177b2ff0357db
author recetox
date Wed, 24 May 2023 14:48:47 +0000
parents 092bbb03a217
children 15aae2bfa67d
comparison
equal deleted inserted replaced
1:092bbb03a217 2:ce00e1d03c31
20 20
21 ordering <- order(sample_names) 21 ordering <- order(sample_names)
22 feature_tables <- feature_tables[ordering] 22 feature_tables <- feature_tables[ordering]
23 sample_names <- sample_names[ordering] 23 sample_names <- sample_names[ordering]
24 24
25 #if $tolerances_input_method.input_method == "file" 25 clusters <- compute_clusters_simple(
26 tolerances <- load_data_from_parquet_file('$input_tolerances')
27 #end if
28
29 clusters <- compute_clusters(
30 feature_tables = feature_tables, 26 feature_tables = feature_tables,
31 #if $tolerances_input_method.input_method == "file"
32 mz_tol_relative = get_mz_tol(tolerances),
33 rt_tol_relative = get_rt_tol(tolerances),
34 #else
35 #if $tolerances_input_method.mz_tol_relative:
36 mz_tol_relative = $tolerances_input_method.mz_tol_relative,
37 #else:
38 mz_tol_relative = NA,
39 #end if
40 #if $tolerances_input_method.rt_tol_relative:
41 rt_tol_relative = $tolerances_input_method.rt_tol_relative,
42 #else:
43 rt_tol_relative = NA,
44 #end if
45 #end if
46 mz_max_diff = 10 * $mz_max_diff,
47 mz_tol_absolute = $mz_tol_absolute,
48 sample_names = sample_names, 27 sample_names = sample_names,
49 do.plot = FALSE 28 mz_tol_ppm = $mz_tol_relative_ppm,
29 rt_tol = $rt_tol
50 ) 30 )
51 31
52 save_parquet_collection(clusters, sample_names, "clustered") 32 save_parquet_collection(clusters, sample_names, "clustered")
53 save_tolerances(clusters, '$tolerances')
54 ]]></configfile> 33 ]]></configfile>
55 </configfiles> 34 </configfiles>
56 35
57 <inputs> 36 <inputs>
58 <param name="files" type="data_collection" collection_type="list" format="parquet" label="Input data" 37 <param name="files" type="data_collection" collection_type="list" format="parquet" label="Input data"
59 help="List of tables containing features." /> 38 help="List of tables containing features." />
60 <expand macro="compute_clusters_params"/> 39 <expand macro="tolerances"/>
61 </inputs> 40 </inputs>
62 41
63 <outputs> 42 <outputs>
64 <collection name="clustered_feature_tables" type="list" 43 <collection name="clustered_feature_tables" type="list"
65 label="${tool.name} feature_tables on ${on_string}"> 44 label="${tool.name} feature_tables on ${on_string}">
66 <discover_datasets pattern="__designation__" directory="clustered" format="parquet" /> 45 <discover_datasets pattern="__designation__" directory="clustered" format="parquet" />
67 </collection> 46 </collection>
68 <data name="tolerances" format="parquet" label="${tool.name} on ${on_string} (updated tolerances)" />
69 </outputs> 47 </outputs>
70 48
71 <tests> 49 <tests>
72 50
73 </tests> 51 </tests>