comparison recetox_aplcms_recover_weaker_signals.xml @ 0:067a308223e3 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 19de0924a65bc65cbbf7c1fc17e9b5348305f95c
author recetox
date Fri, 10 Jun 2022 10:18:24 +0000
parents
children f9fb9d8fb710
comparison
equal deleted inserted replaced
-1:000000000000 0:067a308223e3
1 <tool id="recetox_aplcms_recover_weaker_signals" name="RECETOX apLCMS - recover weaker signals" version="@TOOL_VERSION@+galaxy0">
2 <description>recover weaker signals from LC/MS spectra</description>
3 <macros>
4 <import>macros.xml</import>
5 <import>macros_split.xml</import>
6 </macros>
7 <expand macro="creator"/>
8
9 <expand macro="requirements"/>
10 <command detect_errors="aggressive"><![CDATA[
11 sh ${symlink_inputs} &&
12 Rscript -e 'source("${__tool_directory__}/utils.R")' -e 'source("${__tool_directory__}/main.R")' -e 'source("${run_script}")'
13 ]]></command>
14 <configfiles>
15 <configfile name="symlink_inputs">
16 #for $infile in $ms_files
17 ln -s '${infile}' '${infile.element_identifier}'
18 #end for
19 #for $infile in $extracted_files
20 ln -s '${infile}' '${infile.element_identifier}'
21 #end for
22 #for $infile in $corrected_files
23 ln -s '${infile}' '${infile.element_identifier}'
24 #end for
25 </configfile>
26 <configfile name="run_script"><![CDATA[
27 #set filenames = str("', '").join([str($f.element_identifier) for $f in $ms_files])
28 filenames <- sort_samples_by_acquisition_number(c('$filenames'))
29
30 #set extracted_files = str("', '").join([str($f.element_identifier) for $f in $extracted_files])
31 extracted <- load_features(c('$extracted_files'))
32
33 #set corrected_files = str("', '").join([str($f.element_identifier) for $f in $corrected_files])
34 corrected <- load_features(c('$corrected_files'))
35
36 aligned <- load_aligned_features('$rt_cross_table_file', '$int_cross_table_file', '$tolerances_file')
37
38 cluster <- as.integer(Sys.getenv('GALAXY_SLOTS', unset = 1))
39
40 recovered <- recover_signals(cluster,
41 filenames,
42 extracted,
43 corrected,
44 aligned,
45 $mz_tol,
46 $weak_signal_recovery.recover_mz_range,
47 $weak_signal_recovery.recover_chr_range,
48 $weak_signal_recovery.use_observed_range,
49 $min_bandwidth,
50 $max_bandwidth,
51 $weak_signal_recovery.recover_min_count
52 )
53
54 aligned_feature_sample_table <- create_feature_sample_table(aligned)
55 recovered_feature_sample_table <- create_feature_sample_table(recovered)
56
57 save_all_features(recovered, filenames)
58 save_all_feature_tables(aligned_feature_sample_table, recovered_feature_sample_table,
59 '${aligned_feature_sample_table}', '${recovered_feature_sample_table}',
60 '$output_format.out_format')
61 ]]></configfile>
62 </configfiles>
63
64 <inputs>
65 <param name="ms_files" type="data" format="mzdata,mzml,mzxml,netcdf" multiple="true" min="2" label="Input data"
66 help="Mass spectrometry file for peak extraction." />
67 <param name="extracted_files" type="data" format="parquet" multiple="true" min="2" label="Input extracted feature samples"
68 help="Mass spectrometry files containing feature samples." />
69 <param name="corrected_files" type="data" format="parquet" multiple="true" min="2" label="Input corrected feature samples"
70 help="Mass spectrometry file containing corrected feature samples." />
71 <param name="tolerances_file" type="data" format="parquet" label="Input tolerances" help="TBD"/>
72 <param name="rt_cross_table_file" type="data" format="parquet" label="Input rt cross table" help="TBD"/>
73 <param name="int_cross_table_file" type="data" format="parquet" label="Input int cross table" help="TBD"/>
74 <expand macro="mz_tol_macro"/>
75 <param name="min_bandwidth" type="float" optional="true" label="min_bandwidth (optional)"
76 help="The minimum bandwidth to use in the kernel smoother." />
77 <param name="max_bandwidth" type="float" optional="true" label="max_bandwidth (optional)"
78 help="The maximum bandwidth to use in the kernel smoother." />
79 <expand macro="weak_signal_recovery"/>
80 <expand macro="output_format"/>
81 </inputs>
82
83 <outputs>
84 <expand macro="unsupervised_outputs">
85 <collection name="extracted_features" type="list" label="${tool.name} extracted_features on ${on_string}">
86 <discover_datasets pattern="__designation__" directory="extracted" format="parquet" />
87 </collection >
88 <collection name="corrected_features" type="list" label="${tool.name} corrected_features on ${on_string}">
89 <discover_datasets pattern="__designation__" directory="corrected" format="parquet" />
90 </collection >
91 </expand>
92 </outputs>
93
94 <tests>
95 <test>
96 <param name="ms_files" value="mbr_test2.mzml,mbr_test1.mzml,mbr_test0.mzml" ftype="mzml"/>
97 <param name="extracted_files" ftype="parquet"
98 value="extracted_expected/extracted_0.parquet,extracted_expected/extracted_1.parquet,extracted_expected/extracted_2.parquet"/>
99 <param name="corrected_files" ftype="parquet"
100 value="corrected_expected/corrected_0.parquet,corrected_expected/corrected_1.parquet,corrected_expected/corrected_2.parquet"/>
101 <param name="tolerances_file" value="tolerances.parquet" ftype="parquet"/>
102 <param name="rt_cross_table_file" value="rt_cross_table.parquet" ftype="parquet"/>
103 <param name="int_cross_table_file" value="int_cross_table.parquet" ftype="parquet"/>
104
105 <output name="recovered_feature_sample_table" ftype="parquet"
106 file="unsupervised_output/unsupervised_recovered_feature_sample_table.parquet"/>
107 <output name="aligned_feature_sample_table" ftype="parquet"
108 file="unsupervised_output/unsupervised_aligned_feature_sample_table.parquet"/>
109 <output_collection name="corrected_features" type="list">
110 <element name="mbr_test0.parquet" file="unsupervised_output/corrected_features_0.parquet" ftype="parquet"/>
111 <element name="mbr_test1.parquet" file="unsupervised_output/corrected_features_1.parquet" ftype="parquet"/>
112 <element name="mbr_test2.parquet" file="unsupervised_output/corrected_features_2.parquet" ftype="parquet"/>
113 </output_collection>
114 <output_collection name="extracted_features" type="list">
115 <element name="mbr_test0.parquet" file="unsupervised_output/extracted_features_0.parquet" ftype="parquet"/>
116 <element name="mbr_test1.parquet" file="unsupervised_output/extracted_features_1.parquet" ftype="parquet"/>
117 <element name="mbr_test2.parquet" file="unsupervised_output/extracted_features_2.parquet" ftype="parquet"/>
118 </output_collection>
119 </test>
120 </tests>
121
122 <help>
123 <![CDATA[
124 This is a tool which runs apLCMS recovery of weaker signals.
125
126 @GENERAL_HELP@
127 ]]>
128 </help>
129
130 <expand macro="citations"/>
131 </tool>