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