Mercurial > repos > recetox > ramclustr
diff ramclustr.xml @ 0:cb0b83b330fd draft
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ramclustr commit c69f8d9772bdb9fb3cc9473651397cd6bb877020"
author | recetox |
---|---|
date | Wed, 28 Jul 2021 08:42:02 +0000 |
parents | |
children | 15e173c5762c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ramclustr.xml Wed Jul 28 08:42:02 2021 +0000 @@ -0,0 +1,195 @@ +<tool id="ramclustr" name="RAMClustR" version="@TOOL_VERSION@+galaxy1"> + <macros> + <import>ramclustr_macros.xml</import> + </macros> + + <requirements> + <container type="docker">recetox/ramclustr:1.1.0-recetox0</container> + </requirements> + + <command detect_errors="aggressive"><![CDATA[ + Rscript + -e 'source("${__tool_directory__}/ramclustr_wrapper.R")' + #if $filetype.type_choice == "xcms": + -e 'x <- ramclustr_xcms( + input_xcms = "$filetype.input_xcms", + #else: + -e 'x <- ramclustr_csv( + ms="$filetype.ms_csv.ms", + idmsms="$filetype.ms_csv.idmsms", + feature_delimiter="$filetype.ms_csv.feature_delimiter", + sample_name_column = $filetype.ms_csv.sample_name_column, + retention_time_column= $filetype.ms_csv.retention_time_column, + #end if + sr = $filetype.required.sr, + deep_split = $filetype.required.deepSplit, + block_size = $filetype.required.blocksize, + mult = $filetype.required.mult, + hmax = $filetype.required.hmax, + collapse = $filetype.required.collapse, + use_pheno = $filetype.required.usePheno, + qc_inj_range = $filetype.required.qc_inj_range, + normalize = "$filetype.required.normalize", + min_module_size = $filetype.required.minModuleSize, + linkage = "$filetype.required.linkage", + mzdec = $filetype.required.mzdec, + cor_method = "$filetype.required.cor_method", + rt_only_low_n = $filetype.required.rt_only_low_n, + replace_zeros = $filetype.required.replace_zeros, + #if $filetype.type_choice == "xcms": + #if $filetype.optional.st + st = $filetype.optional.st, + #end if + #else: + st = $filetype.ms_csv.st, + #end if + #if $filetype.optional.maxt + maxt = $filetype.optional.maxt, + #end if + #if $filetype.optional.fftempdir + fftempdir = $filetype.optional.fftempdir, + #end if + #if $filetype.metadata.batch_order_qc + metadata_file = "${filetype.metadata.batch_order_qc}", + #end if + )' + -e 'store_output(x, "$result", "$method_metadata", $filetype.required.merge_msp, "$spec_abundance")' + ]]> + </command> + + <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"> + <param name="input_xcms" label="input_xcms" type="data" format="rdata.xcms.fillpeaks" help=": containing grouped feature data for clustering by ramclustR" /> + <expand macro="parameters_required" /> + <expand macro="parameters_optional_xcms" /> + <expand macro="parameters_optional_metadata" /> + </when> + <when value="csv"> + <expand macro="parameters_csv" /> + <expand macro="parameters_required" /> + <expand macro="parameters_optional_csv" /> + <expand macro="parameters_optional_metadata" /> + </when> + </conditional> + </inputs> + + <outputs> + <data label="${tool.name} on ${on_string}" name="result" format="RData" /> + <data label="Spec Abundance of ${on_string}" name="spec_abundance" format="csv" /> + <data label="Metadata for ${tool.name} on ${on_string}" name="method_metadata" format="txt"/> + <expand macro="output_msp"/> + </outputs> + + <tests> + <test> + <param name="type_choice" value="xcms"/> + <param name="input_xcms" value="xcmsObj_1.rdata.xcms.fillpeaks" ftype="rdata.xcms.fillpeaks"/> + <output name="result" file="ramclustObj_xcms_1.rdata" ftype="RData" compare="sim_size" delta="100"/> + <output_collection name="mass_spectra" type="list"> + <element name="fill" file="fill_xcms_1.msp" ftype="msp" checksum="md5$d53ed06d6f888a88ff321f833e29bb47"/> + </output_collection> + <output name="method_metadata" file="metadata_xcms_1.txt" ftype="txt" checksum="md5$81db28b08860988e3966f585b0f44b0f"/> + <output name="spec_abundance" file="spec_abundance_xcms_1.csv" ftype="csv" compare="sim_size" delta="100"/> + </test> + <test> + <param name="type_choice" value="xcms"/> + <param name="input_xcms" value="xcmsObj_2.rdata.xcms.fillpeaks" ftype="rdata.xcms.fillpeaks"/> + <param name="batch_order_qc" value="sample_metadata_xcms_2.csv" ftype="csv" /> + <output name="result" file="ramclustObj_xcms_2.rdata" ftype="RData" compare="sim_size" delta="200"/> + <output_collection name="mass_spectra" type="list"> + <element name="fill" file="fill_xcms_2.msp" ftype="msp" lines_diff="10"/> + </output_collection> + <output name="method_metadata" file="metadata_xcms_2.txt" ftype="txt" checksum="md5$286e4aa53c38c99e92202584d7407406"/> + <output name="spec_abundance" file="spec_abundance_xcms_2.csv" ftype="csv" compare="sim_size" delta="100"/> + </test> + <test> + <param name="type_choice" value="csv"/> + <param name="ms" value="csv_test-input_1_2.csv" ftype="csv"/> + <param name="sample_name_column" value="1"/> + <param name="feature_delimiter" value="_"/> + <param name="retention_time_column" value="2"/> + <param name="st" value="5.0"/> + <param name="sr" value="0.5"/> + <param name="deepSplit" value="False"/> + <param name="blocksize" value="1000"/> + <param name="mult" value="1"/> + <param name="hmax" value="0.3"/> + <param name="collapse" value="True"/> + <param name="usePheno" value="True"/> + <param name="normalize" value="none"/> + <param name="qc_inj_range" value="20"/> + <param name="minModuleSize" value="2"/> + <param name="linkage" value="average"/> + <param name="mzdec" value="3"/> + <param name="cor_method" value="pearson"/> + <param name="rt_only_low_n" value="True"/> + <param name="replace_zeros" value="True"/> + <param name="Merge MSP Files" value="True"/> + <param name="maxt" value="1"/> + <output name="result" file="ramclustObj_csv_1.rdata"/> + <output name="spec_abundance" file="spec_abundance_csv_1.csv" ftype="csv"/> + <output name="method_metadata" file="metadata_csv_1.txt" ftype="txt"/> + <output_collection name="mass_spectra" type="list"> + <element name="fill" file="spectra_csv_1.msp" ftype="msp"/> + </output_collection> + </test> + <test> + <param name="type_choice" value="csv"/> + <param name="ms" value="csv_test-input_1_2.csv" ftype="csv"/> + <param name="sample_name_column" value="1"/> + <param name="feature_delimiter" value="_"/> + <param name="retention_time_column" value="2"/> + <param name="batch_order_qc" value="sample_metadata_csv_2.csv" ftype="csv" /> + <output name="result" file="ramclustObj_csv_2.rdata"/> + <output name="spec_abundance" file="spec_abundance_csv_2.csv" ftype="csv"/> + <output name="method_metadata" file="metadata_csv_2.txt" ftype="txt"/> + <output_collection name="mass_spectra" type="list"> + <element name="fill" file="spectra_csv_2.msp" ftype="msp" lines_diff="10"/> + </output_collection> + </test> + </tests> + + <help> + Documentation + For documentation on the tool see https://github.com/cbroeckl/RAMClustR/blob/master/vignettes/RAMClustR.Rmd + + Upstream Tools + +-------+----------------------+----------------------+------------+ + | Name | Output File | Format | Parameter | + +=======+======================+======================+============+ + | xcms | xset.fillPeaks.RData | rdata.xcms.fillpeaks | xcmsObj | + +-------+----------------------+----------------------+------------+ + + The tool takes an **xcmsSet** object as input and extracts all relevant information. + + +-------+------------------------+--------+------------+ + | Name | Output File | Format | Parameter | + +=======+========================+========+============+ + | ??? | Feature Table with MS1 | csv | ms | + +-------+------------------------+--------+------------+ + | ??? | Feature Table with MS2 | csv | idmsms | + +-------+------------------------+--------+------------+ + + Alternatively, the tool takes a **csv** table as input which has to fulfill the following requirements + + (1) no more than one sample (or file) name column and one feature name row; + (2) feature names that contain the mass and retention times, separated by a constant delimiter; and + (3) features in columns and samples in rows. + + Downstream Tools + +---------+--------------+----------------------+ + | Name | Output File | Format | + +=========+==============+======================+ + | matchMS | Mass Spectra | collection (tgz/msp) | + +---------+--------------+----------------------+ + + @GENERAL_HELP@ + </help> + + <expand macro="citations" /> +</tool>