Mercurial > repos > recetox > mfassignr_mfassign
comparison mfassignr_mfassign.xml @ 0:5aa9380f397b draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/mfassignr commit 87bb82e07c57753a71d9ce4efc757c4367200d15
author | recetox |
---|---|
date | Thu, 15 Aug 2024 12:00:54 +0000 |
parents | |
children | 0492fff60960 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:5aa9380f397b |
---|---|
1 <tool id="mfassignr_mfassign" name="MFAssignR MFAssign" version="@TOOL_VERSION@+galaxy0" profile="23.0"> | |
2 <description>Molecular formula assignment.</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 <import>help.xml</import> | |
6 </macros> | |
7 <edam_topics> | |
8 <edam_topic>topic_3172</edam_topic> | |
9 </edam_topics> | |
10 <expand macro="creator" /> | |
11 <expand macro="requirements" /> | |
12 <command detect_errors="exit_code"><![CDATA[ | |
13 Rscript '${run_script}' | |
14 ]]></command> | |
15 <configfiles> | |
16 <configfile name="run_script"><![CDATA[ | |
17 mono <- read.delim("$input_mono", sep="\t") | |
18 #if $input_iso | |
19 iso <- read.delim("$input_iso", sep="\t") | |
20 #end if | |
21 SN = $sn_ratio * $kmdn | |
22 | |
23 MF_assign <- MFAssignR::MFAssign( | |
24 peaks = mono, | |
25 #if $input_iso | |
26 isopeaks = iso, | |
27 #end if | |
28 ionMode = "$ionmode", | |
29 lowMW = $lowMW, | |
30 highMW = $highMW, | |
31 ppm_err = $ppm_err, | |
32 SN = SN | |
33 ) | |
34 | |
35 write.table(MF_assign[['Unambig']], file = '$Unambig', row.names= FALSE, sep = "\t") | |
36 write.table(MF_assign[['Ambig']], file = '$Ambig', row.names= FALSE, sep = "\t") | |
37 write.table(MF_assign[['None']], file = '$None', row.names= FALSE, sep = "\t") | |
38 | |
39 dir.create("plots") | |
40 ggplot2::ggsave(filename = file.path("plots", "msassign.png"), MF_assign[['MSAssign']]) | |
41 ggplot2::ggsave(filename = file.path("plots", "errorMZ.png"), MF_assign[['Error']]) | |
42 ggplot2::ggsave(filename = file.path("plots", "MSgroups.png"), MF_assign[['MSgroups']]) | |
43 ggplot2::ggsave(filename = file.path("plots", "VK.png"), MF_assign[['VK']]) | |
44 | |
45 ]]></configfile> | |
46 </configfiles> | |
47 <inputs> | |
48 <param name="input_mono" type="data" format="tabular" label="Data frame of monoisotopic masses" | |
49 help= "Data frame containing recalibrated monoisotopic masses, output from the Recal function"/> | |
50 <param name="input_iso" optional="true" type="data" format="tabular" label="Data frame of isotopic masses" | |
51 help= "Data frame containing recalibrated isotopic masses, output from the Recal function"/> | |
52 <expand macro="mfassign_param"/> | |
53 </inputs> | |
54 <outputs> | |
55 <data name="Unambig" format="tabular" label="Unambiguous assignments by ${tool.name} on ${on_string}"/> | |
56 <data name="Ambig" format="tabular" label="Ambiguous assignments by ${tool.name} on ${on_string}"/> | |
57 <data name="None" format="tabular" label="Unassigned masses by ${tool.name} on ${on_string}"/> | |
58 <collection format="png" type="list" name="plots" label="Plots generated by ${tool.name} on ${on_string}"> | |
59 <discover_datasets pattern="__designation_and_ext__" ext="png" directory="plots" /> | |
60 </collection> | |
61 </outputs> | |
62 <tests> | |
63 <test> | |
64 <param name="input_mono" value="isofiltr/mono_out.tabular"/> | |
65 <param name="input_iso" value="isofiltr/iso_out.tabular"/> | |
66 <param name="kmdn" value="3294705.63963789"/> | |
67 <output name="Unambig" file="mfassign/unambig.tabular"/> | |
68 <output name="Ambig"> | |
69 <assert_contents> | |
70 <has_n_lines n="1"/> | |
71 <has_n_columns n="53"/> | |
72 </assert_contents> | |
73 </output> | |
74 <output name="None"> | |
75 <assert_contents> | |
76 <has_n_lines n="5015"/> | |
77 <has_n_columns n="3"/> | |
78 </assert_contents> | |
79 </output> | |
80 <output_collection name="plots" type="list" count="4"> | |
81 <element name="MSgroups"> | |
82 <assert_contents> | |
83 <has_size size="114675" delta="100"/> | |
84 </assert_contents> | |
85 </element> | |
86 <element name="VK"> | |
87 <assert_contents> | |
88 <has_size size="424518" delta="100"/> | |
89 </assert_contents> | |
90 </element> | |
91 <element name="errorMZ"> | |
92 <assert_contents> | |
93 <has_size size="548366" delta="100"/> | |
94 </assert_contents> | |
95 </element> | |
96 <element name="msassign"> | |
97 <assert_contents> | |
98 <has_size size="84901" delta="100"/> | |
99 </assert_contents> | |
100 </element> | |
101 </output_collection> | |
102 </test> | |
103 </tests> | |
104 <help><![CDATA[ | |
105 @MFASSIGN_HELP@ | |
106 | |
107 @GENERAL_HELP@ | |
108 ]]></help> | |
109 <expand macro="citations" /> | |
110 </tool> |