class MzID::PeptideEvidence

class to represent peptide evidence entries in file

Public Class Methods

new(h={}) click to toggle source
# File lib/mzid/peptide_evidence.rb, line 6
def initialize(h={})
  @id = h.has_key?(:id) ? h[:id] : nil
  @db_seq_ref = h.has_key?(:db_seq_ref) ? h[:db_seq_ref] : nil
  @pep_id = h.has_key?(:pep_id) ? h[:pep_id] : nil
  @start_pos = h.has_key?(:start_pos) ? h[:start_pos] : nil
  @end_pos = h.has_key?(:end_pos) ? h[:end_pos] : nil
  @pre = h.has_key?(:pre) ? h[:pre] : nil
  @post = h.has_key?(:post) ? h[:post] : nil
  @is_decoy = h.has_key?(:is_decoy) ? h[:is_decoy] : nil
  @prot_id = h.has_key?(:prot_id) ? h[:prot_id] : nil
end

Public Instance Methods

get_db_seq_ref() click to toggle source
# File lib/mzid/peptide_evidence.rb, line 21
def get_db_seq_ref() @db_seq_ref end
get_end_pos() click to toggle source
# File lib/mzid/peptide_evidence.rb, line 24
def get_end_pos() @end_pos end
get_id() click to toggle source

get methods

# File lib/mzid/peptide_evidence.rb, line 20
def get_id() @id end
get_is_decoy() click to toggle source
# File lib/mzid/peptide_evidence.rb, line 27
def get_is_decoy() @is_decoy end
get_pep_id() click to toggle source
# File lib/mzid/peptide_evidence.rb, line 22
def get_pep_id() @pep_id end
get_post() click to toggle source
# File lib/mzid/peptide_evidence.rb, line 26
def get_post() @post end
get_pre() click to toggle source
# File lib/mzid/peptide_evidence.rb, line 25
def get_pre() @pre end
get_prot_id() click to toggle source
# File lib/mzid/peptide_evidence.rb, line 28
def get_prot_id() @prot_id end
get_start_pos() click to toggle source
# File lib/mzid/peptide_evidence.rb, line 23
def get_start_pos() @start_pos end
to_s() click to toggle source

represent as string

# File lib/mzid/peptide_evidence.rb, line 32
def to_s() 
  "[#{@id}, #{@pep_id}; #{@start_pos}:#{@end_pos}, #{@pre}...#{@post}]" 
end