Class: Bio::DTASelect::OutputFile::Peptide
- Inherits:
-
Object
- Object
- Bio::DTASelect::OutputFile::Peptide
- Includes:
- Logging
- Defined in:
- lib/dta_select_output.rb
Instance Attribute Summary collapse
-
#dtaselect_attributes ⇒ Object
Hash of column names to values.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#parent_proteins ⇒ Object
Array of proteins that have this peptide associated.
Instance Method Summary collapse
-
#initialize ⇒ Peptide
constructor
A new instance of Peptide.
- #inspect ⇒ Object
- #redundancy ⇒ Object
- #reported_unique? ⇒ Boolean
Constructor Details
#initialize ⇒ Peptide
Returns a new instance of Peptide.
83 84 85 |
# File 'lib/dta_select_output.rb', line 83 def initialize @parent_proteins = [] end |
Instance Attribute Details
#dtaselect_attributes ⇒ Object
Hash of column names to values. These are different for different DTAselect output files, it seems.
78 79 80 |
# File 'lib/dta_select_output.rb', line 78 def dtaselect_attributes @dtaselect_attributes end |
#identifier ⇒ Object
Returns the value of attribute identifier.
75 76 77 |
# File 'lib/dta_select_output.rb', line 75 def identifier @identifier end |
#parent_proteins ⇒ Object
Array of proteins that have this peptide associated
81 82 83 |
# File 'lib/dta_select_output.rb', line 81 def parent_proteins @parent_proteins end |
Instance Method Details
#inspect ⇒ Object
87 88 89 |
# File 'lib/dta_select_output.rb', line 87 def inspect "Peptide: #{@parent_proteins.length} @parent_proteins: [#{@parent_proteins.collect{|pro| pro.identifier}.join(', ')} @identifier: #{identifier}, @attributes: #{dtaselect_attributes.inspect}]" end |
#redundancy ⇒ Object
91 92 93 |
# File 'lib/dta_select_output.rb', line 91 def redundancy @dtaselect_attributes['Redundancy'].to_i end |
#reported_unique? ⇒ Boolean
95 96 97 |
# File 'lib/dta_select_output.rb', line 95 def reported_unique? dtaselect_attributes.length == 1 end |