Class: Bio::DTASelect::OutputFile::Peptide

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/dta_select_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePeptide

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_attributesObject

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

#identifierObject

Returns the value of attribute identifier.



75
76
77
# File 'lib/dta_select_output.rb', line 75

def identifier
  @identifier
end

#parent_proteinsObject

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

#inspectObject



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

#redundancyObject



91
92
93
# File 'lib/dta_select_output.rb', line 91

def redundancy
  @dtaselect_attributes['Redundancy'].to_i
end

#reported_unique?Boolean

Returns:

  • (Boolean)


95
96
97
# File 'lib/dta_select_output.rb', line 95

def reported_unique?
  dtaselect_attributes.length == 1
end