Class: Bio::DTASelect::OutputFile::Peptide
- Inherits:
-
Object
- Object
- Bio::DTASelect::OutputFile::Peptide
- Includes:
- Bio::DivvyProteomics::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
Methods included from Bio::DivvyProteomics::Logging
Constructor Details
#initialize ⇒ Peptide
Returns a new instance of Peptide.
45 46 47 |
# File 'lib/dta_select_output.rb', line 45 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.
40 41 42 |
# File 'lib/dta_select_output.rb', line 40 def dtaselect_attributes @dtaselect_attributes end |
#identifier ⇒ Object
Returns the value of attribute identifier.
37 38 39 |
# File 'lib/dta_select_output.rb', line 37 def identifier @identifier end |
#parent_proteins ⇒ Object
Array of proteins that have this peptide associated
43 44 45 |
# File 'lib/dta_select_output.rb', line 43 def parent_proteins @parent_proteins end |
Instance Method Details
#inspect ⇒ Object
49 50 51 |
# File 'lib/dta_select_output.rb', line 49 def inspect "Peptide: #{@parent_proteins.length} @parent_proteins: [#{@parent_proteins.collect{|pro| pro.identifier}.join(', ')} @identifier: #{identifier}, @attributes: #{dtaselect_attributes.inspect}]" end |
#redundancy ⇒ Object
53 54 55 |
# File 'lib/dta_select_output.rb', line 53 def redundancy @dtaselect_attributes['Redundancy'].to_i end |
#reported_unique? ⇒ Boolean
57 58 59 |
# File 'lib/dta_select_output.rb', line 57 def reported_unique? dtaselect_attributes.length == 1 end |