Class: Ms::Sequest::Srf::Out
- Inherits:
-
Object
- Object
- Ms::Sequest::Srf::Out
- Defined in:
- lib/ms/sequest/srf.rb
Overview
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
Defined Under Namespace
Constant Summary collapse
- Unpack_32 =
'@36vx2Z*@60Z*'
- Unpack_35 =
'@36vx4Z*@62Z*'
Instance Method Summary collapse
Instance Method Details
#from_io(fh, unpack_35, dup_refs_gt_0) ⇒ Object
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/ms/sequest/srf.rb', line 548 def 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) self[3,3] = st.unpack( (unpack_35 ? Unpack_35 : Unpack_32) ) self[7,4] = st.unpack('@8eex4Ix4I') num_hits = self[3] ar = Array.new(num_hits) if ar.size > 0 num_extra_references = 0 num_hits.times do |i| ar[i] = Ms::Sequest::Srf::Out::Pep.new.from_io(fh, unpack_35) num_extra_references += ar[i].num_other_loci end if dup_refs_gt_0 Ms::Sequest::Srf::Out::Pep.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) Ms::Sequest::Srf::Out::Pep.set_deltacn_from_deltacn_orig(ar) end self[6] = ar self[4].chomp! self end |
#inspect ⇒ Object
538 539 540 541 542 543 544 545 546 |
# File 'lib/ms/sequest/srf.rb', line 538 def inspect hits_s = if self[6] ", @hits(#)=#{hits.size}" else '' end "<Ms::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 |