Class: Ms::Precursor

Inherits:
Object
  • Object
show all
Defined in:
lib/ms/precursor.rb,
lib/ms/precursor/lazy_parent.rb

Defined Under Namespace

Classes: LazyParent

Instance Method Summary collapse

Instance Method Details

#intensityObject Also known as: inten



15
16
17
18
19
20
21
22
23
24
# File 'lib/ms/precursor.rb', line 15

def intensity
  if self[1].nil?
    if s = self[2].spectrum
      self[1] = s.intensity_at_mz(self[0])
    else
      nil   # if we didn't read in the spectra, we can't get this value!
    end
  end
  self[1]
end