0
|
1 <?xml version="1.0"?>
|
|
2 <tool name="Peptide-Spectrum-Matches (PSMs) Evaluation" id="psm_eval" version="0.1.0">
|
|
3 <requirements>
|
|
4 <requirement type="package">psm_eval</requirement>
|
|
5 </requirements>
|
|
6 <description>Re-evalute potential PSMs using the psm-eval application.</description>
|
|
7 <command>psm_eval --settings $driver</command>
|
|
8 <configfiles>
|
|
9 <configfile name="driver"># YAML driver for PSM Eval
|
|
10 peak_lists:
|
|
11 #for $peak_list in $peak_lists:
|
|
12 - path: $peak_list
|
|
13 name: "$peak_list.display_name"
|
1
|
14 encoded_id: "${$__app__.security.encode_id( $peak_list.id )}|${$peak_list.extra_dir_file_name if hasattr($peak_list, 'extra_dir_file_name') else ''}"
|
0
|
15 #end for
|
|
16 psms: $psms_cond.psms
|
|
17 psms_type: $psms_cond.type
|
|
18 output: $output
|
|
19 output_format: $output_type
|
|
20 mass_type: $mass_type
|
|
21 mass_tolerance: $default_mass_tolerance
|
|
22 columns:
|
|
23 #for $column in $columns
|
|
24 #set $column_options = $column.column
|
|
25 #set $type = str(column_options['type'])
|
|
26 - type: ${type}
|
|
27 #if $type in ['ions_matched', 'peaks_matched']
|
|
28 aggregate_by: $column_options.aggregate_by
|
|
29 #if $column_options.tolerance.specify
|
|
30 mass_tolerance: $column_options.tolerance.tolerance
|
|
31 #end if
|
|
32 #end if
|
|
33 #if $type in ['ions_matched', 'peaks_matched', 'num_peaks']
|
|
34 ## Handle peak filters
|
|
35 peak_filters:
|
|
36 #for $peak_filter in $column_options.peak_filters
|
|
37 #set $peak_filter_options = $peak_filter.peak_filter
|
|
38 #set $peak_filter_type = str(peak_filter_options['peak_filter_type'])
|
|
39 - type: $peak_filter_type
|
|
40 #if $peak_filter_type in ['percent_tic', 'quantile', 'percent_max_intensity']
|
|
41 percent: $peak_filter_options.percent
|
|
42 #end if
|
|
43 #if $peak_filter_type == 'quantile'
|
|
44 q: $peak_filter_options.q
|
|
45 k: $peak_filter_options.k
|
|
46 #end if
|
|
47 #end for
|
|
48 #end if
|
|
49 #if $type in ['ions_matched', 'peaks_matched']
|
|
50 ## Handle ions series
|
|
51 #set $ions = $column_options
|
|
52 ions:
|
|
53 series: $ions.ion_series
|
|
54 #if $ions.losses
|
|
55 losses: $ions.losses
|
|
56 #end if
|
|
57 #end if
|
|
58 #if $type == "source_statistic"
|
|
59 statistic_name: ${str(column_options['source_statistic'])}
|
|
60 #end if
|
|
61 #if $type == "link"
|
|
62 link_type: galaxy
|
|
63 #end if
|
|
64 #end for
|
|
65 </configfile>
|
|
66 </configfiles>
|
|
67 <inputs>
|
|
68 <conditional name="psms_cond">
|
|
69 <param name="type" type="select" label="PSMs Type" help="">
|
|
70 <option value="mzid">MzIdentML (mzid)</option>
|
|
71 <option value="proteinpilot_peptide_report">ProteinPilot Peptide Report</option>
|
|
72 </param>
|
|
73 <when value="mzid">
|
|
74 <param format="mzid" name="psms" type="data" label="MzIdentML containing PSMs" help="" />
|
|
75 </when>
|
|
76 <when value="proteinpilot_peptide_report">
|
|
77 <param format="tabular" name="psms" type="data" label="ProteinPilot Peptide Report" help="" />
|
|
78 </when>
|
|
79 </conditional>
|
|
80 <param format="mzml" name="peak_lists" type="data" label="Peak list (mzML)" multiple="true" help="" />
|
|
81 <param name="output_type" type="select" label="Output Type" help="">
|
|
82 <option value="tsv">Tabular (tsv)</option>
|
|
83 <option value="html">HTML</option>
|
|
84 </param>
|
|
85 <param name="default_mass_tolerance" type="float" label="Default Mass Tolerance" value="0.5" />
|
|
86 <param name="mass_type" type="select" label="Mass Type">
|
|
87 <option value="monoisotopic" selected="true">Monoisotopic</option>
|
|
88 <option value="average">Average (has known problems)</option>
|
|
89 </param>
|
|
90 <repeat name="columns" title="Column">
|
|
91 <conditional name="column">
|
|
92 <param type="select" name="type" label="Column Type">
|
|
93 <option value="peptide">Peptide Sequence</option>
|
|
94 <option value="scan_index">Scan Index</option>
|
|
95 <option value="scan_number">Scan Number</option>
|
|
96 <option value="scan_id">Scan ID</option>
|
|
97 <option value="scan_source">Peak List</option>
|
|
98 <option value="num_peaks">Number of Peaks</option>
|
|
99 <option value="peaks_matched">Peaks Matched Statistic</option>
|
|
100 <option value="ions_matched">Ions Matched Statistic</option>
|
|
101 <option value="total_ion_current">Total Ion Current</option>
|
|
102 <option value="source_statistic">Statistic from PSM Source</option>
|
|
103 <option value="link">ProtVis Link</option>
|
|
104 </param>
|
|
105 <when value="num_peaks">
|
|
106 <expand macro="peak_filters" />
|
|
107 </when>
|
|
108 <when value="peaks_matched">
|
|
109 <param name="aggregate_by" label="Peak Matching Statistic" type="select">
|
|
110 <option value="count">Number of Matched Peaks</option>
|
|
111 <option value="count_missed">Number of Unmatched Peaks</option>
|
|
112 <option value="percent">Percent of Matched Peaks</option>
|
|
113 <option value="percent_missed">Percent of Unmatched Peaks</option>
|
|
114 </param>
|
|
115 <expand macro="ions" />
|
|
116 <expand macro="peak_filters" />
|
|
117 <expand macro="tolerance_conditional" />
|
|
118 </when>
|
|
119 <when value="ions_matched">
|
|
120 <param name="aggregate_by" label="Ion Matching Statistic" type="select">
|
|
121 <option value="count">Number of Matched Ions</option>
|
|
122 <option value="count_missed">Number of Unmatched Ions</option>
|
|
123 <option value="count_longest_stretch">Longest Stretch of Matched Ions</option>
|
|
124 <option value="percent">Percent of Matched Ions</option>
|
|
125 <option value="percent_missed">Percent of Unmatched Ions</option>
|
|
126 <option value="list_matches">List Matched Ions</option>
|
|
127 <option value="list_misses">List Unmatched Ions</option>
|
|
128 </param>
|
|
129 <expand macro="ions" />
|
|
130 <expand macro="peak_filters" />
|
|
131 <expand macro="tolerance_conditional" />
|
|
132 </when>
|
|
133 <when value="source_statistic">
|
|
134 <param name="source_statistic" label="PSM Source Statistic" type="select">
|
|
135 <option value="xcorr">xcorr</option>
|
|
136 <option value="MyriMatch:MVH">MyriMatch: MVH</option>
|
|
137 <option value="MyriMatch:mzFidelity">MyriMatch: mzFidelity</option>
|
|
138 <option value="Conf">Conf</option>
|
|
139 </param>
|
|
140 </when>
|
|
141 <when value="link">
|
|
142 </when>
|
|
143 </conditional>
|
|
144 </repeat>
|
|
145 </inputs>
|
|
146 <outputs>
|
|
147 <data format="tabular" name="output" label="PSM Evaluation of ${on_string}">
|
|
148 <change_format>
|
|
149 <when input="output_type" value="html" format="html" />
|
|
150 </change_format>
|
|
151 </data>
|
|
152 </outputs>
|
|
153 <macros>
|
|
154 <macro name="ions">
|
|
155 <param name="ion_series" type="select" multiple="true" label="Ion Series">
|
|
156 <option value="a1">a1</option>
|
|
157 <option value="a2">a2</option>
|
|
158 <option value="a3">a3</option>
|
|
159 <option value="b1">b1</option>
|
|
160 <option value="b2">b2</option>
|
|
161 <option value="b3">b3</option>
|
|
162 <option value="c1">c1</option>
|
|
163 <option value="c2">c2</option>
|
|
164 <option value="c3">c3</option>
|
|
165 <option value="x1">x1</option>
|
|
166 <option value="x2">x2</option>
|
|
167 <option value="x3">x3</option>
|
|
168 <option value="y1">y1</option>
|
|
169 <option value="y2">y2</option>
|
|
170 <option value="y3">y3</option>
|
|
171 <option value="z1">z1</option>
|
|
172 <option value="z2">z2</option>
|
|
173 <option value="z3">z3</option>
|
|
174 <option value="m1">M1</option>
|
|
175 <option value="m2">M2</option>
|
|
176 <option value="internal">Internal Ions</option>
|
|
177 </param>
|
|
178 <param name="losses" type="select" multiple="true" label="Losses" value="">
|
|
179 <option value="H2O">H2O</option>
|
|
180 <option value="NH3">NH3</option>
|
|
181 <option value="CO">CO (-28) on internal ions</option>
|
|
182 </param>
|
|
183 </macro>
|
|
184 <macro name="tolerance_conditional">
|
|
185 <conditional name="tolerance">
|
|
186 <param name="specify" label="Specify Mass Tolerance" type="boolean" />
|
|
187 <when value="false">
|
|
188 </when>
|
|
189 <when value="true">
|
|
190 <param name="tolerance" value="0.5" label="Tolerance" type="float" />
|
|
191 </when>
|
|
192 </conditional>
|
|
193 </macro>
|
|
194 <!--
|
|
195 <macro name="conditional_ions">
|
|
196 <conditional name="specify_ions">
|
|
197 <param type="boolean" truevalue="true" falsevalue="false" name="specify" label="Specify Ions?" />
|
|
198 <when value="true">
|
|
199 <expand macro="ions" />
|
|
200 </when>
|
|
201 <when value="false" />
|
|
202 </conditional>
|
|
203 </macro>
|
|
204 -->
|
|
205 <macro name="peak_filters">
|
|
206 <repeat name="peak_filters" title="Peak Filter">
|
|
207 <expand macro="peak_filter" />
|
|
208 </repeat>
|
|
209 </macro>
|
|
210 <macro name="peak_filter">
|
|
211 <conditional name="peak_filter">
|
|
212 <param type="select" label="Filter Peaks on" name="peak_filter_type">
|
|
213 <option value="percent_tic">Intensity as a Percent of Total Ion Current</option>
|
|
214 <option value="quantile">Intensity Quantile</option>
|
|
215 <option value="percent_max_intensity">Intensity as a Percent of Maximum Spectrum Peak Intensity</option>
|
|
216 </param>
|
|
217 <when value="percent_tic">
|
|
218 <expand macro="percent_param" />
|
|
219 </when>
|
|
220 <when value="percent_max_intensity">
|
|
221 <param name="percent" label="Percent of Maximum Peak Intensity" type="float" value="0.1" />
|
|
222 </when>
|
|
223 <when value="quantile">
|
|
224 <param name="q" label="q" type="integer" help="q is the number of partitions to break intensity into, k is the position to pull from. For instance if q=2 and k=1, the peaks above the median intensity will be used and if q=3 and k=2, the middle third of peaks by intensity will be used." value="2" />
|
|
225 <param name="k" label="k" type="integer" value="1"/>
|
|
226 <expand macro="percent_param" />
|
|
227 </when>
|
|
228 </conditional>
|
|
229 <!-- TODO: Add m/z, intensity thresholds. -->
|
|
230 </macro>
|
|
231 <macro name="percent_param">
|
|
232 <param name="percent" label="Percent TIC Threshold" type="float" help="Filter all peaks whose intensity does not exceed this percent of total ion current." value="0.02" />
|
|
233 </macro>
|
|
234 </macros>
|
|
235 </tool>
|