Mercurial > repos > recetox > recetox_aplcms_align_features
comparison recetox_aplcms_align_features.xml @ 0:e867e0c90d29 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:13:20 +0000 |
| parents | |
| children | 148327f1e1be |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:e867e0c90d29 |
|---|---|
| 1 <tool id="recetox_aplcms_align_features" name="RECETOX apLCMS - align features" version="@TOOL_VERSION@+galaxy0"> | |
| 2 <description>align features from LC/MS spectra across samples</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("${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 $corrected_files | |
| 20 ln -s '${infile}' '${infile.element_identifier}' | |
| 21 #end for | |
| 22 </configfile> | |
| 23 <configfile name="run_script"><![CDATA[ | |
| 24 #set filenames_str = str("', '").join([str($f.element_identifier) for $f in $ms_files]) | |
| 25 files_list <- sort_samples_by_acquisition_number(c('$filenames_str')) | |
| 26 sample_names <- get_sample_name(files_list) | |
| 27 | |
| 28 #set corrected_files = str("', '").join([str($f.element_identifier) for $f in $corrected_files]) | |
| 29 corrected_features <- load_features(c('$corrected_files')) | |
| 30 | |
| 31 aligned <- align_features( | |
| 32 sample_names = sample_names, | |
| 33 features = corrected_features, | |
| 34 min.exp = $min_exp, | |
| 35 mz.tol = $peak_alignment.align_mz_tol, | |
| 36 chr.tol = $peak_alignment.align_chr_tol, | |
| 37 find.tol.max.d = 10 * $mz_tol, | |
| 38 max.align.mz.diff = $peak_alignment.max_align_mz_diff, | |
| 39 do.plot = FALSE | |
| 40 ) | |
| 41 | |
| 42 save_aligned_features(aligned, "$rt_cross_table", "$int_cross_table", "$tolerances") | |
| 43 ]]></configfile> | |
| 44 </configfiles> | |
| 45 | |
| 46 <inputs> | |
| 47 <param name="ms_files" type="data" format="mzdata,mzml,mzxml,netcdf" multiple="true" min="2" label="Input data" | |
| 48 help="Mass spectrometry file for peak extraction." /> | |
| 49 <param name="corrected_files" type="data" format="parquet" multiple="true" min="2" | |
| 50 label="Input corrected feature samples" | |
| 51 help="Mass spectrometry files containing corrected feature samples." /> | |
| 52 <expand macro="mz_tol_macro"/> | |
| 53 <param name="min_exp" type="integer" min="1" value="2" label="min_exp" | |
| 54 help="If a feature is to be included in the final feature table, it must be present in at least this number of spectra." /> | |
| 55 <expand macro="peak_alignment"/> | |
| 56 </inputs> | |
| 57 | |
| 58 <outputs> | |
| 59 <data name="tolerances" format="parquet" label="${tool.name} on ${on_string} (tolerances)" /> | |
| 60 <data name="rt_cross_table" format="parquet" label="${tool.name} on ${on_string} (rt cross table)" /> | |
| 61 <data name="int_cross_table" format="parquet" label="${tool.name} on ${on_string} (int cross table)" /> | |
| 62 </outputs> | |
| 63 | |
| 64 <tests> | |
| 65 <test> | |
| 66 <param name="ms_files" value="mbr_test0.mzml,mbr_test1.mzml,mbr_test2.mzml" ftype="mzml"/> | |
| 67 <param name="corrected_files" ftype="parquet" | |
| 68 value="corrected_expected/corrected_0.parquet,corrected_expected/corrected_1.parquet,corrected_expected/corrected_2.parquet"/> | |
| 69 <output name="tolerances" file="tolerances.parquet" ftype="parquet"/> | |
| 70 <output name="rt_cross_table" file="rt_cross_table.parquet" ftype="parquet"/> | |
| 71 <output name="int_cross_table" file="int_cross_table.parquet" ftype="parquet"/> | |
| 72 </test> | |
| 73 </tests> | |
| 74 | |
| 75 <help> | |
| 76 <![CDATA[ | |
| 77 This is a tool which runs apLCMS alignment of features. | |
| 78 | |
| 79 @GENERAL_HELP@ | |
| 80 ]]> | |
| 81 </help> | |
| 82 | |
| 83 <expand macro="citations"/> | |
| 84 </tool> |
