Class: Ms::Mascot::FormatMgf
- Inherits:
-
Tap::Task
- Object
- Tap::Task
- Ms::Mascot::FormatMgf
- Defined in:
- lib/ms/mascot/format_mgf.rb
Overview
:startdoc::manifest formats an fragment spectrum as mgf
Formats the data produced by an Ms::Mascot::Fragment task as an mgf. The configurations specify various details of the dump, including the precision and default headers.
% rap fragment TVQQEL --:s format_mgf
(note: be sure to use the splat option on the join)
Constant Summary collapse
- HEADER_MAP =
Maps header keys (typically output by a fragment task) to Mgf::Entry header strings.
{:parent_ion_mass => 'PEPMASS'}
Instance Method Summary collapse
Instance Method Details
#process(data, headers) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ms/mascot/format_mgf.rb', line 30 def process(data, headers) lines = [] lines << prefix if prefix mgf_headers = format_headers(headers) Ms::Mascot::Mgf::Entry.new(mgf_headers, data).dump(lines, config) lines << suffix if suffix lines.join("") end |