class Mspire::Sequest::Srf::Out

0=first_scan, 1=last_scan, 2=charge, 3=num_hits, 4=computer, 5=date_time, 6=hits, 7=total_inten, 8=lowest_sp, 9=num_matched_peptides, 10=db_locus_count

Constants

Peptide

deltacn_orig - the one that sequest originally reports (top hit gets 0.0) deltacn - modified to be that of the next best hit (by xcorr) and the last hit takes 1.1. This is what is called deltacn by bioworks and pepprophet (at least for the first few years). If filtering occurs, it will be updated.

deltacn_orig_updated - the latest updated value of deltacn. Originally, this will be equal to deltacn_orig. After filtering, this will be recalculated. To know if this will be different from deltacn_orig, query match.srf.filtered_by_precursor_mass_tolerance. If this is changed, then deltacn should also be changed to reflect it. mh - the theoretical mass + h proteins are created as SRF prot objects with a reference and linked to their peptide_hits (from global hash by reference) ppm = 10^6 * ∆m_accuracy / mass_measured [ where ∆m_accuracy = mass_real – mass_measured ] This is calculated for the M+H mass! num_other_loci is the number of other loci that the peptide matches beyond the first one listed srf = the srf object this scan came from

Unpack_32
Unpack_35

Public Class Methods

from_io(fh, unpack_35, dup_refs_gt_0) click to toggle source

returns an Mspire::Sequest::Srf::Out object

# File lib/mspire/sequest/srf.rb, line 548
def self.from_io(fh, unpack_35, dup_refs_gt_0)
  ## EMPTY out file is 96 bytes
  ## each hit is 320 bytes
  ## num_hits and charge:
  st = fh.read(96)

  # num_hits computer date_time
  initial_vals = st.unpack( (unpack_35 ? Unpack_35 : Unpack_32) )
  # total_inten lowest_sp num_matched_peptides db_locus_count
  initial_vals.push( *st.unpack('@8eex4Ix4I') )
  out_obj = self.new( *initial_vals )

  _num_hits = out_obj.num_hits

  ar = Array.new(_num_hits)
  if ar.size > 0
    num_extra_references = 0
    _num_hits.times do |i|
      ar[i] = Mspire::Sequest::Srf::Out::Peptide.from_io(fh, unpack_35)
      num_extra_references += ar[i].num_other_loci
    end
    if dup_refs_gt_0
      Mspire::Sequest::Srf::Out::Peptide.read_extra_references(fh, num_extra_references, ar)
    end
    ## The xcorrs are already ordered by best to worst hit
    ## ADJUST the deltacn's to be meaningful for the top hit:
    ## (the same as bioworks and prophet)
    Mspire::Sequest::Srf::Out::Peptide.set_deltacn_from_deltacn_orig(ar)
  end
  out_obj.hits = ar
  out_obj[1].chomp! # computer
  out_obj
end

Public Instance Methods

inspect() click to toggle source
# File lib/mspire/sequest/srf.rb, line 537
def inspect
  hits_s = 
    if self.hits
      ", @hits(#)=#{hits.size}"
    else
      ''
    end
  "<Mspire::Sequest::Srf::Out  first_scan=#{first_scan}, last_scan=#{last_scan}, charge=#{charge}, num_hits=#{num_hits}, computer=#{computer}, date_time=#{date_time}#{hits_s}>"
end