Mercurial > repos > recetox > ramclustr
comparison ramclustr.xml @ 4:050cfef6ba65 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ramclustr commit 981ab05cdced6cbcbb1f13aa492e127365a4e9ed
author | recetox |
---|---|
date | Thu, 15 Jun 2023 14:01:48 +0000 |
parents | 2ec9253a647e |
children | 2410de08b55a |
comparison
equal
deleted
inserted
replaced
3:2ec9253a647e | 4:050cfef6ba65 |
---|---|
1 <tool id="ramclustr" name="RAMClustR" version="@TOOL_VERSION@+galaxy2"> | 1 <tool id="ramclustr" name="RAMClustR" version="@TOOL_VERSION@+galaxy0" profile="21.09"> |
2 <description>A feature clustering algorithm for non-targeted mass spectrometric metabolomics data.</description> | 2 <description>A feature clustering algorithm for non-targeted mass spectrometric metabolomics data.</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="creator"/> | 6 <expand macro="creator"/> |
7 | 7 |
8 <requirements> | 8 <requirements> |
9 <requirement type="package" version="@TOOL_VERSION@">r-ramclustr</requirement> | 9 <requirement type="package" version="@TOOL_VERSION@">r-ramclustr</requirement> |
10 <requirement type="package" version="3.14.0">bioconductor-xcms</requirement> | 10 <requirement type="package" version="3.20.0">bioconductor-xcms</requirement> |
11 <requirement type="package" version="9.0.0">r-arrow</requirement> | |
11 </requirements> | 12 </requirements> |
12 | 13 |
13 <command detect_errors="aggressive"><![CDATA[ | 14 <command detect_errors="exit_code"><![CDATA[ |
14 Rscript | 15 Rscript |
15 -e 'source("${__tool_directory__}/ramclustr_wrapper.R")' | 16 -e 'source("${__tool_directory__}/ramclustr_wrapper.R")' |
16 -e 'source("${ramclustr_method}")' | 17 -e 'source("${ramclustr_method}")' |
17 ]]> | 18 ]]> |
18 </command> | 19 </command> |
19 <configfiles> | 20 <configfiles> |
20 <configfile name="ramclustr_method"> | 21 <configfile name="ramclustr_method"> |
22 #if $filetype.type_choice == "xcms": | |
23 obj = load("$filetype.xcms.input_xcms") | |
24 ramclustObj = RAMClustR::rc.get.xcms.data( | |
25 xcmsObj = xdata, | |
26 #if $extras.ExpDes: | |
27 ExpDes = load_experiment_definition("${$extras.ExpDes}"), | |
28 #end if | |
29 mzdec = $msp_output_details.mzdec, | |
30 ensure.no.na = $extras.replace_zeros | |
31 ) | |
32 #else if $filetype.type_choice == "csv": | |
33 ramclustObj = RAMClustR::rc.get.csv.data( | |
34 csv = "$filetype.ms_csv.ms", | |
35 #if $filetype.ms_csv.idmsms: | |
36 idmsms = "$filetype.ms_csv.idmsms", | |
37 #end if | |
38 #if $filetype.ms_csv.csv_phenoData: | |
39 phenoData = "$filetype.ms_csv.csv_phenoData", | |
40 #end if | |
41 #if $extras.ExpDes: | |
42 ExpDes = load_experiment_definition("${$extras.ExpDes}"), | |
43 #end if | |
44 st = $filetype.required.st, | |
45 ensure.no.na = $extras.replace_zeros | |
46 ) | |
47 #else if $filetype.type_choice == "recetox-aplcms": | |
48 ramclustObj = read_ramclustr_aplcms( | |
49 ms1_featuredefinitions = "$filetype.ms_dataframe.ms1_featureDefinitions", | |
50 ms1_featurevalues = "$filetype.ms_dataframe.ms1_featureValues", | |
51 #if $filetype.ms_dataframe.df_phenoData: | |
52 df_phenodata = "$filetype.ms_dataframe.df_phenoData", | |
53 phenodata_ext = "${filetype.ms_dataframe.df_phenoData.ext}", | |
54 #end if | |
55 #if $extras.ExpDes: | |
56 exp_des = "${$extras.ExpDes}", | |
57 #end if | |
58 st = $filetype.required.st, | |
59 ensure_no_na = $extras.replace_zeros | |
60 ) | |
61 #end if | |
62 | |
63 #if $extras.replace_zeros == "TRUE": | |
64 ramclustObj = RAMClustR::rc.feature.replace.na(ramclustObj = ramclustObj) | |
65 #end if | |
66 | |
67 #if $normalisation.normalisation_method.normalize != "none": | |
68 ramclustObj = apply_normalisation( | |
69 ramclustr_obj = ramclustObj, | |
70 #if $normalisation.normalisation_method.normalize == "batch.qc": | |
71 metadata_file = "${$normalisation.normalisation_method.batch_order_qc}", | |
72 qc_inj_range = $normalisation.normalisation_method.qc_inj_range, | |
73 #end if | |
74 #if $normalisation.normalisation_method.normalize == "qc": | |
75 metadata_file = "${$normalisation.normalisation_method.batch_order_qc}", | |
76 p_cut = $normalisation.normalisation_method.p_cut, | |
77 rsq_cut = $normalisation.normalisation_method.rsq_cut, | |
78 p_adjust = $normalisation.normalisation_method.p_adjust, | |
79 #end if | |
80 normalize_method = "$normalisation.normalisation_method.normalize" | |
81 ) | |
82 #end if | |
83 | |
84 ramclustObj = RAMClustR::rc.ramclustr( | |
85 ramclustObj = ramclustObj, | |
86 st = $filetype.required.st, | |
87 sr = $filetype.required.sr, | |
88 maxt = $filetype.required.maxt, | |
89 deepSplit = $clustering.deepSplit, | |
90 blocksize = $performance.blocksize, | |
91 mult = $performance.mult, | |
92 hmax = $clustering.hmax, | |
93 minModuleSize = $clustering.minModuleSize, | |
94 linkage = "$clustering.linkage", | |
95 cor.method = "$filetype.required.cor_method", | |
96 rt.only.low.n = $extras.rt_only_low_n, | |
97 fftempdir = NULL, | |
98 ) | |
99 | |
21 store_output( | 100 store_output( |
22 #if $filetype.type_choice == "xcms": | 101 ramclustr_obj = ramclustObj, |
23 ramclustr_xcms( | 102 output_merge_msp = $msp_output_details.merge_msp, |
24 input_xcms = "$filetype.xcms.input_xcms", | 103 output_spec_abundance = "$spec_abundance", |
25 use_pheno = $filetype.xcms.usePheno, | 104 #if $msp_output_details.merge_msp: |
105 msp_file = "$mass_spectra_merged" | |
26 #else: | 106 #else: |
27 ramclustr_csv( | 107 msp_file = NULL |
28 ms = "$filetype.ms_csv.ms", | 108 #end if |
29 idmsms = "$filetype.ms_csv.idmsms", | 109 ) |
30 #end if | |
31 sr = $filetype.required.sr, | |
32 #if $filetype.type_choice == "xcms": | |
33 #if $filetype.required.st | |
34 st = $filetype.required.st, | |
35 #end if | |
36 #else: | |
37 st = $filetype.required.st, | |
38 #end if | |
39 cor_method = "$filetype.required.cor_method", | |
40 maxt = $filetype.required.maxt, | |
41 linkage = "$clustering.linkage", | |
42 min_module_size = $clustering.minModuleSize, | |
43 hmax = $clustering.hmax, | |
44 deep_split = "$clustering.deepSplit", | |
45 normalize = "$normalisation.normalisation_method.normalize", | |
46 #if "$normalisation.normalisation_method.normalize" == "batch.qc": | |
47 metadata_file = "$normalisation.normalisation_method.batch_order_qc", | |
48 qc_inj_range = $normalisation.normalisation_method.qc_inj_range, | |
49 #end if | |
50 block_size = $performance.blocksize, | |
51 mult = $performance.mult, | |
52 mzdec = $msp_output_details.mzdec, | |
53 rt_only_low_n = $extras.rt_only_low_n, | |
54 replace_zeros = $extras.replace_zeros, | |
55 #if $extras.ExpDes: | |
56 exp_design = "${$extras.ExpDes}" | |
57 #end if | |
58 ), | |
59 $msp_output_details.merge_msp, | |
60 "$spec_abundance", | |
61 #if $msp_output_details.merge_msp: | |
62 "$mass_spectra_merged" | |
63 #else: | |
64 NULL | |
65 #end if | |
66 ) | |
67 </configfile> | 110 </configfile> |
68 </configfiles> | 111 </configfiles> |
69 <inputs> | 112 <inputs> |
70 <conditional name="filetype"> | 113 <conditional name="filetype"> |
71 <param name="type_choice" type="select" label="Choose input format:"> | 114 <param name="type_choice" type="select" label="Choose input format:"> |
72 <option value="xcms" selected="true">XCMS</option> | 115 <option value="xcms" selected="true">XCMS</option> |
73 <option value="csv">CSV</option> | 116 <option value="csv">CSV</option> |
117 <option value="recetox-aplcms">RECETOX-APLCMS</option> | |
74 </param> | 118 </param> |
75 <when value="xcms"> | 119 <when value="xcms"> |
76 <expand macro="parameters_xcms" /> | 120 <expand macro="parameters_xcms" /> |
77 <section name="required" title="General parameters" expanded="true"> | 121 <section name="required" title="General parameters" expanded="true"> |
78 <param label="Sigma t" name="st" type="float" optional="true" help="Retention time similarity (optional). | 122 <param label="Sigma t" name="st" type="float" optional="true" help="Retention time similarity (optional). |
86 <param label="Sigma t" name="st" type="float" value="1" help="Retention time similarity. | 130 <param label="Sigma t" name="st" type="float" value="1" help="Retention time similarity. |
87 A recommended starting point is half the value of your average chromatographic peak width at half max (seconds))."/> | 131 A recommended starting point is half the value of your average chromatographic peak width at half max (seconds))."/> |
88 <expand macro="parameters_required" /> | 132 <expand macro="parameters_required" /> |
89 </section> | 133 </section> |
90 </when> | 134 </when> |
135 <when value="recetox-aplcms"> | |
136 <expand macro="parameters_recetox_aplcms" /> | |
137 <section name="required" title="General parameters" expanded="true"> | |
138 <param label="Sigma t" name="st" type="float" value="1" help="Retention time similarity. | |
139 A recommended starting point is half the value of your average chromatographic peak width at half max (seconds))."/> | |
140 <expand macro="parameters_required" /> | |
141 </section> | |
142 </when> | |
91 </conditional> | 143 </conditional> |
92 <expand macro="main_parameters" /> | 144 <expand macro="main_parameters" /> |
93 </inputs> | 145 </inputs> |
94 | 146 |
95 <outputs> | 147 <outputs> |
106 </section> | 158 </section> |
107 <section name="required"> | 159 <section name="required"> |
108 <param name="maxt" value="259.8"/> | 160 <param name="maxt" value="259.8"/> |
109 </section> | 161 </section> |
110 </section> | 162 </section> |
163 <section name="msp_output_details"> | |
164 <param name="mzdec" value="4"/> | |
165 </section> | |
111 <section name="extras"> | 166 <section name="extras"> |
112 <param name="ExpDes" value="lc-ramclustr-define-experiment.csv" ftype="csv"/> | 167 <param name="ExpDes" value="lc-ramclustr-define-experiment.csv" ftype="csv"/> |
113 </section> | 168 </section> |
114 <output name="mass_spectra_merged" file="test1_fill_xcms_1.msp" ftype="msp"/> | 169 <output name="mass_spectra_merged" file="test1_fill_xcms_1.msp" ftype="msp"/> |
115 <output name="spec_abundance" file="test1_spec_abundance_xcms_1.csv" ftype="csv" compare="sim_size" delta="100"/> | 170 <output name="spec_abundance" file="test1_spec_abundance_xcms_1.csv" ftype="csv" compare="sim_size" delta="100"/> |
122 </section> | 177 </section> |
123 <section name="required"> | 178 <section name="required"> |
124 <param name="maxt" value="78.4"/> | 179 <param name="maxt" value="78.4"/> |
125 </section> | 180 </section> |
126 </section> | 181 </section> |
182 <section name="msp_output_details"> | |
183 <param name="mzdec" value="4"/> | |
184 </section> | |
127 <section name="normalisation"> | 185 <section name="normalisation"> |
128 <section name="normalisation_method"> | 186 <section name="normalisation_method"> |
129 <param name="batch_order_qc" value="test2_sample_metadata_xcms_2.csv" ftype="csv" /> | 187 <param name="batch_order_qc" value="test2_sample_metadata_xcms_2.csv" ftype="csv" /> |
130 </section> | 188 </section> |
131 </section> | 189 </section> |
132 <output name="mass_spectra_merged" file="test2_fill_xcms_2.msp" ftype="msp" compare="diff" lines_diff="20"/> | 190 <output name="mass_spectra_merged" file="test2_fill_xcms_2.msp" ftype="msp" compare="sim_size" delta="100"/> |
133 <output name="spec_abundance" file="test2_spec_abundance_xcms_2.csv" ftype="csv" compare="sim_size" delta="100"/> | 191 <output name="spec_abundance" file="test2_spec_abundance_xcms_2.csv" ftype="csv" compare="sim_size" delta="100"/> |
134 </test> | 192 </test> |
135 <test><!-- TEST 3 --> | 193 <test><!-- TEST 3 --> |
136 <section name="filetype"> | 194 <section name="filetype"> |
137 <param name="type_choice" value="csv"/> | 195 <param name="type_choice" value="csv"/> |
156 <section name="ms_csv"> | 214 <section name="ms_csv"> |
157 <param name="ms" value="test3_csv_test-input_1_2.csv" ftype="csv"/> | 215 <param name="ms" value="test3_csv_test-input_1_2.csv" ftype="csv"/> |
158 </section> | 216 </section> |
159 </section> | 217 </section> |
160 <output name="mass_spectra_merged" file="test4_spectra_csv_2.msp" ftype="msp" lines_diff="10"/> | 218 <output name="mass_spectra_merged" file="test4_spectra_csv_2.msp" ftype="msp" lines_diff="10"/> |
219 </test> | |
220 <test><!-- TEST 5 --> | |
221 <section name="filetype"> | |
222 <param name="type_choice" value="recetox-aplcms"/> | |
223 <section name="ms_dataframe"> | |
224 <param name="ms1_featureDefinitions" value="test5_df_featureDefinitions_input.parquet" ftype="parquet"/> | |
225 <param name="ms1_featureValues" value="test5_df_featureValues_input.parquet" ftype="parquet"/> | |
226 </section> | |
227 </section> | |
228 <output name="mass_spectra_merged" file="test5_spectra.msp" ftype="msp" lines_diff="10"/> | |
161 </test> | 229 </test> |
162 </tests> | 230 </tests> |
163 | 231 |
164 <help> | 232 <help> |
165 <![CDATA[ | 233 <![CDATA[ |