Skip to content

Commit b514d9b

Browse files
authored
Merge pull request #217 from xtrojak/ramclustr-define-experiment
RAMClustR experimental design input
2 parents 9bc5478 + 854569d commit b514d9b

8 files changed

+417
-26
lines changed

tools/ramclustr/macros.xml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -158,21 +158,7 @@
158158
help="CSV with sample names (or indices, currently not handled) on rows and columns with: batch
159159
number ('batch'), position in sequence ('order') and whether it is a qc sample or not
160160
('qc' with true/false OR 'sampleType' with 'sample/qc/blank')."/>
161-
<!-- <param label="ExpDes" name="ExpDes" type="data" format="RData" optional="true" help=" an R object created by R ExpDes object: data used for record keeping and labelling msp spectral output" /> -->
162-
</section>
163-
</xml>
164-
165-
<xml name="parameters_define_experiment">
166-
<section name="define_experiment" title="Define Experiment" expanded="false">
167-
<param label="Experiment" name="experiment" type="text" help="Experiment name, no spaces"/>
168-
<param label="Species" name="species" type="text" help="Species name"/>
169-
<param label="Sample" name="sample" type="text" help="Sample type"/>
170-
<param label="Contributor" name="contributor" type="text"
171-
help="Individual and/or organizational affiliation"/>
172-
<param label="Platform" name="platform" type="select" display="radio" help="Platform">
173-
<option value="GC-MS" selected="true">GC-MS</option>
174-
<option value="LC-MS">LC-MS</option>
175-
</param>
161+
<param label="Experimental design" name="ExpDes" type="data" format="csv" optional="true" help="Definition of experimental design in CSV format." />
176162
</section>
177163
</xml>
178164

@@ -224,11 +210,13 @@
224210
For documentation on the tool see https://github.com/cbroeckl/RAMClustR/blob/master/vignettes/RAMClustR.Rmd
225211
226212
Upstream Tools
227-
+-------+----------------------+----------------------+------------+
228-
| Name | Output File | Format | Parameter |
229-
+=======+======================+======================+============+
230-
| xcms | xset.fillPeaks.RData | rdata.xcms.fillpeaks | xcmsObj |
231-
+-------+----------------------+----------------------+------------+
213+
+------------------------------+-------------------------------+----------------------+---------------------+
214+
| Name | Output File | Format | Parameter |
215+
+==============================+===============================+======================+=====================+
216+
| xcms | xset.fillPeaks.RData | rdata.xcms.fillpeaks | xcmsObj |
217+
+------------------------------+-------------------------------+----------------------+---------------------+
218+
| RAMClustR define experiment | Table with experiment details | csv | Experimental design |
219+
+------------------------------+-------------------------------+----------------------+---------------------+
232220
233221
The tool takes an **xcmsSet** object as input and extracts all relevant information.
234222
@@ -302,4 +290,18 @@
302290
is poisitive or negative ionization mode, EI or ESI, LC-MS GC-MS or CE-MS, in-source fragment or complex
303291
adduction event, and predictable or unpredictable signals.
304292
</token>
293+
294+
<token name="@HELP_experiment@">
295+
<![CDATA[
296+
Create an Experimental Design specification for RAMClustR experiment.
297+
298+
Downstream Tools
299+
+-----------+-----------------------+--------+
300+
| Name | Output File | Format |
301+
+===========+=======================+========+
302+
| RAMClustR | Experiment definition | csv |
303+
+-----------+-----------------------+--------+
304+
305+
]]>
306+
</token>
305307
</macros>

tools/ramclustr/ramclustr.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<tool id="ramclustr" name="RAMClustR" version="@TOOL_VERSION@+galaxy0">
1+
<tool id="ramclustr" name="RAMClustR" version="@TOOL_VERSION@+galaxy1">
22
<macros>
33
<import>macros.xml</import>
44
</macros>
@@ -60,6 +60,9 @@
6060
#if $filetype.metadata.batch_order_qc
6161
metadata_file = "${filetype.metadata.batch_order_qc}",
6262
#end if
63+
#if $filetype.metadata.ExpDes
64+
exp_design = "${filetype.metadata.ExpDes}"
65+
#end if
6366
),
6467
"$result", "$method_metadata", $filetype.required.merge_msp, "$spec_abundance")
6568
</configfile>
@@ -96,9 +99,10 @@
9699
<test><!-- TEST 1 -->
97100
<param name="type_choice" value="xcms"/>
98101
<param name="input_xcms" value="test1_xcmsObj_1.rdata.xcms.fillpeaks" ftype="rdata.xcms.fillpeaks"/>
102+
<param name="ExpDes" value="lc-ramclustr-define-experiment.csv" ftype="csv"/>
99103
<output name="result" file="test1_ramclustObj_xcms_1.rdata" ftype="RData" compare="sim_size" delta="200"/>
100104
<output_collection name="mass_spectra" type="list">
101-
<element name="fill" file="test1_fill_xcms_1.msp" ftype="msp"/>
105+
<element name="experiment_lc" file="test1_fill_xcms_1.msp" ftype="msp"/>
102106
</output_collection>
103107
<output name="method_metadata" file="test1_metadata_xcms_1.txt" ftype="txt"/>
104108
<output name="spec_abundance" file="test1_spec_abundance_xcms_1.csv" ftype="csv" compare="sim_size" delta="100"/>
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
<tool id="ramclustr_define_experiment" name="RAMClustR define experiment" version="1.0.0">
2+
<macros>
3+
<import>macros.xml</import>
4+
</macros>
5+
<expand macro="creator"/>
6+
7+
<command detect_errors="exit_code"><![CDATA[
8+
sh ${ramclustr_define_experiment_cli}
9+
]]>
10+
</command>
11+
<configfiles>
12+
<configfile name="ramclustr_define_experiment_cli">
13+
python3 ${__tool_directory__}/ramclustr_define_experiment_wrapper.py \
14+
--Experiment "$design.Experiment" \
15+
--Species "$design.Species" \
16+
--Sample "$design.Sample" \
17+
--Contributer "$design.Contributor" \
18+
--platform "$platform.platform_choice.choice" \
19+
#if $platform.platform_choice.choice == "GC-MS":
20+
--chrominst "$platform.platform_choice.chrominst" \
21+
--msinst "$platform.platform_choice.msinst" \
22+
--column "$platform.platform_choice.column" \
23+
--InletTemp "$platform.platform_choice.InletTemp" \
24+
--TransferTemp "$platform.platform_choice.TransferTemp" \
25+
--mstype "$platform.platform_choice.gc_mstype" \
26+
--msmode "$platform.platform_choice.msmode" \
27+
--ionization "$platform.platform_choice.gc_ionization" \
28+
--msscanrange "$platform.platform_choice.msscanrange" \
29+
--scantime "$platform.platform_choice.scantime" \
30+
--deriv "$platform.platform_choice.deriv" \
31+
--MSlevs "$platform.platform_choice.MSlevs" \
32+
#else:
33+
--chrominst "$platform.platform_choice.chrominst" \
34+
--msinst "$platform.platform_choice.msinst" \
35+
--column "$platform.platform_choice.column" \
36+
--solvA "$platform.platform_choice.solvA" \
37+
--solvB "$platform.platform_choice.solvB" \
38+
--CE1 "$platform.platform_choice.CE1" \
39+
--CE2 "$platform.platform_choice.CE2" \
40+
--mstype "$platform.platform_choice.lc_mstype" \
41+
--msmode "$platform.platform_choice.msmode" \
42+
--ionization "$platform.platform_choice.lc_ionization" \
43+
--colgas "$platform.platform_choice.colgas" \
44+
--msscanrange "$platform.platform_choice.msscanrange" \
45+
--conevol "$platform.platform_choice.conevol" \
46+
--MSlevs "$platform.platform_choice.MSlevs" \
47+
#end if
48+
--output_file "$RAMClustR_experiment"
49+
</configfile>
50+
</configfiles>
51+
<inputs>
52+
<section name="design" title="Experimental Design" expanded="true">
53+
<param name="Experiment" type="text" label="Experiment name (no spaces).">
54+
<validator type="empty_field"/>
55+
</param>
56+
<param name="Species" type="text" label="Genus species from which samples are derived."/>
57+
<param name="Sample" type="text" label="Type of sample (e.g., serum, leaf)."/>
58+
<param name="Contributor" type="text" label="Your or your PI's name."/>
59+
</section>
60+
61+
<section name="platform" title="Platform" expanded="true">
62+
<conditional name="platform_choice">
63+
<param name="choice" type="select" label="Choose platform:">
64+
<option value="GC-MS" selected="true">GC-MS</option>
65+
<option value="LC-MS">LC-MS</option>
66+
</param>
67+
<when value="GC-MS">
68+
<param name="chrominst" type="text" label="Model of GC instrument."/>
69+
<param name="msinst" type="text" label="Model of MS instrument."/>
70+
<param name="column" type="text" label="Column description."/>
71+
<param name="InletTemp" type="text" label="Temperature of inlet."/>
72+
<param name="TransferTemp" type="text" label="Temperature of GC to MS transfer line."/>
73+
<param name="gc_mstype" type="select" label="Type of mass spectrometer:">
74+
<option value="QQQ" selected="true">QQQ</option>
75+
<option value="TOF">TOF</option>
76+
<option value="QTOF">QTOF</option>
77+
<option value="Orbi">Orbi</option>
78+
<option value="Q">Q</option>
79+
</param>
80+
<param name="msmode" type="select" label="Ion mode:">
81+
<option value="positive" selected="true">positive</option>
82+
<option value="negative">negative</option>
83+
</param>
84+
<param name="gc_ionization" type="select" label="Ionization:">
85+
<option value="EI" selected="true">EI</option>
86+
<option value="AP">AP</option>
87+
<option value="CI">CI</option>
88+
</param>
89+
<param name="msscanrange" type="text" label="Scan range used for acquisition."/>
90+
<param name="scantime" type="float" value="0.2" label="Time for each full scan spectrum (e.g. 0.2 seconds)."/>
91+
<param name="deriv" type="select" label="Derivitization:">
92+
<option value="TMS" selected="true">TMS</option>
93+
<option value="TBDMS">TBDMS</option>
94+
<option value="None">None</option>
95+
</param>
96+
<param name="MSlevs" type="float" value="1" label="Number of levels of energy acquired - 1 typically."/>
97+
</when>
98+
<when value="LC-MS">
99+
<param name="chrominst" type="text" label="Model of LC instrument."/>
100+
<param name="msinst" type="text" label="Model of MS instrument."/>
101+
<param name="column" type="text" label="Column description."/>
102+
<param name="solvA" type="text" label="Solvent A composition."/>
103+
<param name="solvB" type="text" label="Solvent B composition."/>
104+
<param name="CE1" type="text" label="Collision energy of acquisition of MS data."/>
105+
<param name="CE2" type="text" label="Collision energy of acquisition for MSe/idMSMS data (when applicable)."/>
106+
<param name="lc_mstype" type="select" label="Type of mass spectrometer:">
107+
<option value="QQQ" selected="true">QQQ</option>
108+
<option value="TOF">TOF</option>
109+
<option value="QTOF">QTOF</option>
110+
<option value="Orbi">Orbi</option>
111+
<option value="Q">Q</option>
112+
</param>
113+
<param name="msmode" type="select" label="Ion mode:">
114+
<option value="positive" selected="true">positive</option>
115+
<option value="negative">negative</option>
116+
</param>
117+
<param name="lc_ionization" type="select" label="Ionization:">
118+
<option value="ESI" selected="true">ESI</option>
119+
<option value="APCI">APCI</option>
120+
</param>
121+
<param name="colgas" type="text" label="Gas used for collisional dissociation."/>
122+
<param name="msscanrange" type="text" label="Scan range used for acquisition."/>
123+
<param name="conevol" type="text" label="Cone voltage used for acquisition."/>
124+
<param name="MSlevs" type="float" value="1" label="number of levels of energy in XCMS object data - 1 typically."/>
125+
</when>
126+
</conditional>
127+
</section>
128+
</inputs>
129+
130+
<outputs>
131+
<data label="RAMClustR experiment definition" name="RAMClustR_experiment" format="csv" />
132+
</outputs>
133+
134+
<tests>
135+
<test><!-- TEST 1 -->
136+
<section name="design">
137+
<param name="Experiment" value="experiment_gc"/>
138+
<param name="Species" value="mus musculus"/>
139+
<param name="Sample" value="serum"/>
140+
<param name="Contributor" value="recetox"/>
141+
</section>
142+
<section name="platform">
143+
<section name="platform_choice">
144+
<param name="choice" value="GC-MS"/>
145+
<param name="chrominst" value="ISQ 7000"/>
146+
<param name="msinst" value="ISQ7K-VPI"/>
147+
<param name="column" value="These columns enable analysis of ppm levels of amines without column priming"/>
148+
<param name="InletTemp" value="33"/>
149+
<param name="TransferTemp" value="23"/>
150+
<param name="gc_mstype" value="QTOF"/>
151+
<param name="msmode" value="positive"/>
152+
<param name="gc_ionization" value="AP"/>
153+
<param name="msscanrange" value="100"/>
154+
<param name="scantime" value="0.2"/>
155+
<param name="deriv" value="TMS"/>
156+
<param name="MSlevs" value="1.0"/>
157+
</section>
158+
</section>
159+
<output name="RAMClustR_experiment" file="gc-ramclustr-define-experiment.csv" ftype="csv"/>
160+
</test>
161+
<test><!-- TEST 2 -->
162+
<section name="design">
163+
<param name="Experiment" value="experiment_lc"/>
164+
<param name="Species" value="mus musculus"/>
165+
<param name="Sample" value="serum"/>
166+
<param name="Contributor" value="recetox"/>
167+
</section>
168+
<section name="platform">
169+
<section name="platform_choice">
170+
<param name="choice" value="LC-MS"/>
171+
<param name="chrominst" value="UltiMateX 3000 BioRS System"/>
172+
<param name="msinst" value="FSN04-10000"/>
173+
<param name="column" value="These columns enable analysis of ppm levels of amines without column priming"/>
174+
<param name="solvA" value="H20"/>
175+
<param name="solvB" value="CO2"/>
176+
<param name="CE1" value="50"/>
177+
<param name="CE2" value="100"/>
178+
<param name="lc_mstype" value="Q"/>
179+
<param name="msmode" value="negative"/>
180+
<param name="lc_ionization" value="ESI"/>
181+
<param name="colgas" value="He"/>
182+
<param name="msscanrange" value="1000"/>
183+
<param name="conevol" value="12"/>
184+
<param name="MSlevs" value="1.0"/>
185+
</section>
186+
</section>
187+
<output name="RAMClustR_experiment" file="lc-ramclustr-define-experiment.csv" ftype="csv"/>
188+
</test>
189+
</tests>
190+
191+
<help>
192+
<![CDATA[
193+
@HELP_experiment@
194+
]]>
195+
</help>
196+
197+
<expand macro="citations" />
198+
</tool>

0 commit comments

Comments
 (0)