Class: Ms::Mascot::Load::Mgf
- Inherits:
-
Tap::Tasks::Load
- Object
- Tap::Tasks::Load
- Ms::Mascot::Load::Mgf
- Defined in:
- lib/ms/mascot/load/mgf.rb
Overview
:startdoc::task loads entries from an mgf file
Load entries from an mgf file. A selector may be specified to select only a subset of entries; by default all entries in the mgf file are returned.
% tap run -- mgf/load --select 1 < MGF_FILE
% tap run -- mgf/load --select 1..10 < MGF_FILE
Entries are always returned as an array, even when the selecton is for a single entry.
Constant Summary collapse
Instance Method Summary collapse
Instance Method Details
#load(arc) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/ms/mascot/load/mgf.rb', line 63 def load(arc) case select when Integer entry = arc[select] filter.ok?(entry) ? [entry] : [] when Range filter.filter!(arc[select]) when Array filter.filter!(arc[*select]) when nil arc.select {|entry| filter.ok?(entry) } end end |