Class: SpectrumHeader

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/msf/models/spectrum_header.rb

Overview

ActiveRecord model of MSF SpectrumHeader

Example:

SpectrumHeader.find(1)
SpectrumHeader.first.mass

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.primary_keyObject



11
12
13
# File 'lib/msf/models/spectrum_header.rb', line 11

def self.primary_key
  :SpectrumID
end

.table_nameObject



8
9
10
# File 'lib/msf/models/spectrum_header.rb', line 8

def self.table_name
  :SpectrumHeaders
end

Instance Method Details

#chargeObject



38
39
40
# File 'lib/msf/models/spectrum_header.rb', line 38

def charge
  self.Charge
end

#creating_processing_node_numberObject



44
45
46
# File 'lib/msf/models/spectrum_header.rb', line 44

def creating_processing_node_number
  self.CreatingProcessingNodeNumber
end

#first_scanObject



26
27
28
# File 'lib/msf/models/spectrum_header.rb', line 26

def first_scan
  self.FirstScan
end

#hiddenObject



32
33
34
# File 'lib/msf/models/spectrum_header.rb', line 32

def hidden
  self.Hidden
end

#last_scanObject



23
24
25
# File 'lib/msf/models/spectrum_header.rb', line 23

def last_scan
  self.LastScan
end

#massObject



41
42
43
# File 'lib/msf/models/spectrum_header.rb', line 41

def mass
  self.Mass
end

#mass_peak_idObject



17
18
19
# File 'lib/msf/models/spectrum_header.rb', line 17

def mass_peak_id
  self.MassPeakID
end

#retention_timeObject



29
30
31
# File 'lib/msf/models/spectrum_header.rb', line 29

def retention_time
  self.RetentionTime
end

#scan_event_idObject



20
21
22
# File 'lib/msf/models/spectrum_header.rb', line 20

def scan_event_id
  self.ScanEventID
end

#scan_numbersObject



35
36
37
# File 'lib/msf/models/spectrum_header.rb', line 35

def scan_numbers
  self.ScanNumbers
end

#spectrum_idObject



14
15
16
# File 'lib/msf/models/spectrum_header.rb', line 14

def spectrum_id
  self.SpectrumID
end

#titleObject



50
51
52
# File 'lib/msf/models/spectrum_header.rb', line 50

def title
  self.mass_peak.file_info.file_basename + "_" + self.SpectrumID.to_s + "_" + self.FirstScan.to_s + "_" + self.Charge.to_s
end

#unique_spectrum_idObject



47
48
49
# File 'lib/msf/models/spectrum_header.rb', line 47

def unique_spectrum_id
  self.UniqueSpectrumID
end