Class: Ms::Ident::ProteinHit
- Defined in:
- lib/ms/ident/protein_hit.rb
Instance Attribute Summary collapse
-
#peptide_hits ⇒ Object
Returns the value of attribute peptide_hits.
Attributes inherited from Protein
Instance Method Summary collapse
-
#gene_id ⇒ Object
if the GN=(+) regexp is found in the description, returns the first match, or nil if not found.
-
#initialize(id = nil, peptide_hits = []) ⇒ ProteinHit
constructor
A new instance of ProteinHit.
Constructor Details
#initialize(id = nil, peptide_hits = []) ⇒ ProteinHit
Returns a new instance of ProteinHit.
10 11 12 13 |
# File 'lib/ms/ident/protein_hit.rb', line 10 def initialize(id=nil, peptide_hits=[]) @peptide_hits = peptide_hits @id = id end |
Instance Attribute Details
#peptide_hits ⇒ Object
Returns the value of attribute peptide_hits.
8 9 10 |
# File 'lib/ms/ident/protein_hit.rb', line 8 def peptide_hits @peptide_hits end |
Instance Method Details
#gene_id ⇒ Object
if the GN=(+) regexp is found in the description, returns the first match, or nil if not found
17 18 19 |
# File 'lib/ms/ident/protein_hit.rb', line 17 def gene_id description.andand.match(/ GN=(\w+) ?/)[1] end |