Mercurial > repos > recetox > ramclustr
diff ramclustr.xml @ 0:36104baf75da draft
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ramclustr commit 4d2ac914c951166e386a94d8ebb8cb1becfac122"
author | recetox |
---|---|
date | Tue, 22 Mar 2022 16:09:16 +0000 |
parents | |
children | 9a0d83c1b4b3 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ramclustr.xml Tue Mar 22 16:09:16 2022 +0000 @@ -0,0 +1,175 @@ +<tool id="ramclustr" name="RAMClustR" version="@TOOL_VERSION@+galaxy2"> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="creator"/> + + <requirements> + <requirement type="package" version="@TOOL_VERSION@">r-ramclustr</requirement> + <requirement type="package" version="3.14.0">bioconductor-xcms</requirement> + </requirements> + + <command detect_errors="aggressive"><![CDATA[ + Rscript + -e 'source("${__tool_directory__}/ramclustr_wrapper.R")' + -e 'source("${ramclustr_method}")' + ]]> + </command> + <configfiles> + <configfile name="ramclustr_method"> + store_output( + #if $filetype.type_choice == "xcms": + ramclustr_xcms( + input_xcms = "$filetype.xcms.input_xcms", + use_pheno = $filetype.xcms.usePheno, + #else: + ramclustr_csv( + ms = "$filetype.ms_csv.ms", + idmsms = "$filetype.ms_csv.idmsms", + #end if + sr = $filetype.required.sr, + #if $filetype.type_choice == "xcms": + #if $filetype.required.st + st = $filetype.required.st, + #end if + #else: + st = $filetype.required.st, + #end if + cor_method = "$filetype.required.cor_method", + maxt = $filetype.required.maxt, + linkage = "$clustering.linkage", + min_module_size = $clustering.minModuleSize, + hmax = $clustering.hmax, + deep_split = "$clustering.deepSplit", + normalize = "$normalisation.normalisation_method.normalize", + #if "$normalisation.normalisation_method.normalize" == "batch.qc": + metadata_file = "$normalisation.normalisation_method.batch_order_qc", + qc_inj_range = $normalisation.normalisation_method.qc_inj_range, + #end if + block_size = $performance.blocksize, + mult = $performance.mult, + mzdec = $msp_output_details.mzdec, + rt_only_low_n = $extras.rt_only_low_n, + replace_zeros = $extras.replace_zeros, + #if $extras.ExpDes: + exp_design = "${$extras.ExpDes}" + #end if + ), + $msp_output_details.merge_msp, + "$spec_abundance", + #if $msp_output_details.merge_msp: + "$mass_spectra_merged" + #else: + NULL + #end if + ) + </configfile> + </configfiles> + <inputs> + <conditional name="filetype"> + <param name="type_choice" type="select" label="Choose input format:"> + <option value="xcms" selected="true">XCMS</option> + <option value="csv">CSV</option> + </param> + <when value="xcms"> + <expand macro="parameters_xcms" /> + <section name="required" title="General parameters" expanded="true"> + <param label="Sigma t" name="st" type="float" optional="true" help="Retention time similarity (optional). + A recommended starting point is half the value of your average chromatographic peak width at half max (seconds))."/> + <expand macro="parameters_required" /> + </section> + </when> + <when value="csv"> + <expand macro="parameters_csv" /> + <section name="required" title="General parameters" expanded="true"> + <param label="Sigma t" name="st" type="float" value="1" help="Retention time similarity. + A recommended starting point is half the value of your average chromatographic peak width at half max (seconds))."/> + <expand macro="parameters_required" /> + </section> + </when> + </conditional> + <expand macro="main_parameters" /> + </inputs> + + <outputs> + <data label="Spec Abundance of ${on_string}" name="spec_abundance" format="csv" /> + <expand macro="output_msp"/> + </outputs> + + <tests> + <test><!-- TEST 1 --> + <section name="filetype"> + <param name="type_choice" value="xcms"/> + <section name="xcms"> + <param name="input_xcms" value="test1_xcmsObj_1.rdata.xcms.fillpeaks" ftype="rdata.xcms.fillpeaks"/> + </section> + <section name="required"> + <param name="maxt" value="259.8"/> + </section> + </section> + <section name="extras"> + <param name="ExpDes" value="lc-ramclustr-define-experiment.csv" ftype="csv"/> + </section> + <output name="mass_spectra_merged" file="test1_fill_xcms_1.msp" ftype="msp"/> + <output name="spec_abundance" file="test1_spec_abundance_xcms_1.csv" ftype="csv" compare="sim_size" delta="100"/> + </test> + <test><!-- TEST 2 --> + <section name="filetype"> + <param name="type_choice" value="xcms"/> + <section name="xcms"> + <param name="input_xcms" value="test2_xcmsObj_2.rdata.xcms.fillpeaks" ftype="rdata.xcms.fillpeaks"/> + </section> + <section name="required"> + <param name="maxt" value="78.4"/> + </section> + </section> + <section name="normalisation"> + <section name="normalisation_method"> + <param name="batch_order_qc" value="test2_sample_metadata_xcms_2.csv" ftype="csv" /> + </section> + </section> + <output name="mass_spectra_merged" file="test2_fill_xcms_2.msp" ftype="msp" compare="diff" lines_diff="10"/> + <output name="spec_abundance" file="test2_spec_abundance_xcms_2.csv" ftype="csv" compare="sim_size" delta="100"/> + </test> + <test><!-- TEST 3 --> + <section name="filetype"> + <param name="type_choice" value="csv"/> + <section name="ms_csv"> + <param name="ms" value="test3_csv_test-input_1_2.csv" ftype="csv"/> + </section> + <section name="required"> + <param name="st" value="5.0"/> + <param name="maxt" value="1"/> + </section> + </section> + <section name="performance"> + <param name="blocksize" value="1000"/> + <param name="mult" value="1"/> + </section> + <output name="mass_spectra_merged" file="test3_spectra_csv_1.msp" ftype="msp"/> + <output name="spec_abundance" file="test3_spec_abundance_csv_1.csv" ftype="csv"/> + </test> + <test><!-- TEST 4 --> + <section name="filetype"> + <param name="type_choice" value="csv"/> + <section name="ms_csv"> + <param name="ms" value="test3_csv_test-input_1_2.csv" ftype="csv"/> + </section> + </section> + <output name="mass_spectra_merged" file="test4_spectra_csv_2.msp" ftype="msp" lines_diff="10"/> + </test> + </tests> + + <help> + <![CDATA[ + @HELP@ + + .. rubric:: **Footnotes** + .. [1] Correlation, Variance and Covariance - `stats::cor <https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/cor>`_ + .. [2] Hierarchical Clustering - `stats::hclust <https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/hclust>`_ + .. [3] Dynamic Dendrogram Pruning Based on Dendrogram Only - `dynamicTreeCut::cutreeDynamicTree <https://www.rdocumentation.org/packages/dynamicTreeCut/versions/1.63-1/topics/cutreeDynamicTree>`_ + ]]> + </help> + + <expand macro="citations" /> +</tool>