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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Bio::DivvyProteomics::Logging

#log

Constructor Details

#initializePeptide

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_attributesObject

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

#identifierObject

Returns the value of attribute identifier.



37
38
39
# File 'lib/dta_select_output.rb', line 37

def identifier
  @identifier
end

#parent_proteinsObject

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

#inspectObject



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

#redundancyObject



53
54
55
# File 'lib/dta_select_output.rb', line 53

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

#reported_unique?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/dta_select_output.rb', line 57

def reported_unique?
  dtaselect_attributes.length == 1
end