Class: Proph::PepSummary::Pep

Inherits:
Sequest::PepXML::SearchHit show all
Defined in:
lib/ms/ident/pepxml/pep_summary.rb

Overview

this is a SpecID::Pep (by interface: not including stuff yet)

Instance Method Summary collapse

Instance Method Details

#from_pepxml_node(node) ⇒ Object

returns self



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/ms/ident/pepxml/pep_summary.rb', line 71

def from_pepxml_node(node)
  super(node)

  an_res = node.find_first('child::analysis_result')
  pp_n = an_res.find_first('child::peptideprophet_result')
  self.probability = pp_n['probability'].to_f
  pp_n.find('descendant::parameter').each do |par_n|
    case par_n['name']
    when 'fval'
      self.fval = par_n['value'].to_f
    when 'ntt'
      self.ntt = par_n['value'].to_i
    when 'nmc'
      self.nmc = par_n['value'].to_i
    when 'massd'
      self.massd = par_n['value'].to_f
    end
  end
  self
end