Class: Proph::PepSummary
- Inherits:
-
Object
- Object
- Proph::PepSummary
- Includes:
- SpecID
- Defined in:
- lib/ms/ident/pepxml/pep_summary.rb
Defined Under Namespace
Constant Summary collapse
- Filetype_and_version_re_new =
/version="PeptideProphet v([\d\.]+) /
Instance Attribute Summary collapse
-
#msms_run_summaries ⇒ Object
Returns the value of attribute msms_run_summaries.
-
#peptideprophet_summary ⇒ Object
the protein groups currently these are just xml nodes returned!.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #get_version(file) ⇒ Object
- #hi_prob_best ⇒ Object
-
#initialize(file = nil) ⇒ PepSummary
constructor
A new instance of PepSummary.
- #search_hit_class ⇒ Object
Constructor Details
#initialize(file = nil) ⇒ PepSummary
Returns a new instance of PepSummary.
54 55 56 57 58 59 |
# File 'lib/ms/ident/pepxml/pep_summary.rb', line 54 def initialize(file=nil) if file @version = get_version(file) spec_id = SpecID::Parser::PepProph.new(:spec_id).parse(file, :spec_id => self) end end |
Instance Attribute Details
#msms_run_summaries ⇒ Object
Returns the value of attribute msms_run_summaries.
29 30 31 |
# File 'lib/ms/ident/pepxml/pep_summary.rb', line 29 def msms_run_summaries @msms_run_summaries end |
#peptideprophet_summary ⇒ Object
the protein groups currently these are just xml nodes returned!
28 29 30 |
# File 'lib/ms/ident/pepxml/pep_summary.rb', line 28 def peptideprophet_summary @peptideprophet_summary end |
#version ⇒ Object
Returns the value of attribute version.
30 31 32 |
# File 'lib/ms/ident/pepxml/pep_summary.rb', line 30 def version @version end |
Instance Method Details
#get_version(file) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ms/ident/pepxml/pep_summary.rb', line 34 def get_version(file) answer = nil File.open(file) do |fh| 8.times do line = fh.gets answer = if line =~ Filetype_and_version_re_new $1.dup end break if answer end end raise(ArgumentError, "couldn't detect version in #{file}") unless answer answer end |
#hi_prob_best ⇒ Object
32 |
# File 'lib/ms/ident/pepxml/pep_summary.rb', line 32 def hi_prob_best ; true end |
#search_hit_class ⇒ Object
50 51 52 |
# File 'lib/ms/ident/pepxml/pep_summary.rb', line 50 def search_hit_class PepSummary::Pep end |