ms-sequest 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ms/sequest/srf.rb +21 -24
- data/lib/ms/sequest.rb +1 -1
- metadata +7 -7
data/lib/ms/sequest/srf.rb
CHANGED
@@ -263,11 +263,11 @@ class Ms::Sequest::Srf
|
|
263
263
|
pep_hits = @out_files[i][6]
|
264
264
|
@peps.push( *pep_hits )
|
265
265
|
pep_hits.each do |pep_hit|
|
266
|
-
pep_hit[
|
266
|
+
pep_hit[15,4] = @base_name, *ind
|
267
267
|
# add the deltamass
|
268
|
-
pep_hit[
|
269
|
-
pep_hit[
|
270
|
-
pep_hit[
|
268
|
+
pep_hit[12] = pep_hit[0] - mass_measured # real - measured (deltamass)
|
269
|
+
pep_hit[13] = 1.0e6 * pep_hit[12].abs / mass_measured ## ppm
|
270
|
+
pep_hit[19] = self ## link with the srf object
|
271
271
|
end
|
272
272
|
end
|
273
273
|
|
@@ -594,7 +594,7 @@ end
|
|
594
594
|
# srf = the srf object this scan came from
|
595
595
|
|
596
596
|
|
597
|
-
Ms::Sequest::Srf::Out::Pep = Arrayclass.new( %w(mh deltacn_orig sp xcorr id num_other_loci rsp ions_matched ions_total sequence prots deltamass ppm aaseq base_name first_scan last_scan charge srf deltacn deltacn_orig_updated) )
|
597
|
+
Ms::Sequest::Srf::Out::Pep = Arrayclass.new( %w(mh deltacn_orig sf sp xcorr id num_other_loci rsp ions_matched ions_total sequence prots deltamass ppm aaseq base_name first_scan last_scan charge srf deltacn deltacn_orig_updated) )
|
598
598
|
# 0=mh 1=deltacn_orig 2=sp 3=xcorr 4=id 5=num_other_loci 6=rsp 7=ions_matched 8=ions_total 9=sequence 10=prots 11=deltamass 12=ppm 13=aaseq 14=base_name 15=first_scan 16=last_scan 17=charge 18=srf 19=deltacn 20=deltacn_orig_updated
|
599
599
|
|
600
600
|
class Ms::Sequest::Srf::Out::Pep
|
@@ -612,16 +612,16 @@ class Ms::Sequest::Srf::Out::Pep
|
|
612
612
|
# recalculates deltacn from xcorrs and sets deltacn_orig_updated and deltacn
|
613
613
|
def self.update_deltacns_from_xcorr(ar)
|
614
614
|
if ar.size > 0
|
615
|
-
top_score = ar.first[
|
615
|
+
top_score = ar.first[4]
|
616
616
|
other_scores = (1...(ar.size)).to_a.map do |i|
|
617
|
-
1.0 - (ar[i][
|
617
|
+
1.0 - (ar[i][4]/top_score)
|
618
618
|
end
|
619
|
-
ar.first[
|
619
|
+
ar.first[21] = 0.0
|
620
620
|
(0...(ar.size-1)).each do |i|
|
621
|
-
ar[i][
|
622
|
-
ar[i+1][
|
621
|
+
ar[i][20] = other_scores[i] # deltacn
|
622
|
+
ar[i+1][21] = other_scores[i] # deltacn_orig_updated
|
623
623
|
end
|
624
|
-
ar.last[
|
624
|
+
ar.last[20] = 1.1
|
625
625
|
end
|
626
626
|
end
|
627
627
|
|
@@ -631,22 +631,18 @@ class Ms::Sequest::Srf::Out::Pep
|
|
631
631
|
pep = pep_hits[fh.read(8).unpack('x4I').first - 1]
|
632
632
|
|
633
633
|
ref = fh.read(80).unpack('A*').first
|
634
|
-
pep[
|
634
|
+
pep[11] << Ms::Sequest::Srf::Out::Prot.new(ref[0,38])
|
635
635
|
end
|
636
636
|
# fh.read(6) if unpack_35
|
637
637
|
end
|
638
638
|
|
639
|
-
|
640
|
-
#Unpack_35 = '@64Ex8ex12eeIx22vx2vvx8Z*@246Z*'
|
641
|
-
### NOTE:
|
642
|
-
# I need to verify that this is correct (I mean the 'I' after x18)
|
643
|
-
Unpack_35 = '@64Ex8ex12eeIx18Ivx2vvx8Z*@246Z*'
|
639
|
+
Unpack_35 = '@64Ex8ex8eeeIx18Ivx2vvx8Z*@246Z*'
|
644
640
|
# translation: @64=(64 bytes in to the record), E=mH, x8=8unknown bytes, e=deltacn,
|
645
|
-
#
|
641
|
+
# x8=8unknown bytes, e=sf, e=sp, e=xcorr, I=ID#, x18=18 unknown bytes, v=rsp,
|
646
642
|
# v=ions_matched, v=ions_total, x8=8unknown bytes, Z*=sequence, 240Z*=at
|
647
643
|
# byte 240 grab the string (which is proteins).
|
648
644
|
#Unpack_32 = '@64Ex8ex12eeIx18vvvx8Z*@240Z*'
|
649
|
-
Unpack_32 = '@
|
645
|
+
Unpack_32 = '@64Ex8ex8eeeIx14Ivvvx8Z*@240Z*'
|
650
646
|
Unpack_four_null_bytes = 'a*'
|
651
647
|
Unpack_Zstar = 'Z*'
|
652
648
|
Read_35 = 426
|
@@ -659,7 +655,7 @@ class Ms::Sequest::Srf::Out::Pep
|
|
659
655
|
|
660
656
|
undef_method :inspect
|
661
657
|
def inspect
|
662
|
-
st = %w(aaseq sequence mh deltacn_orig sp xcorr id rsp ions_matched ions_total prots deltamass ppm base_name first_scan last_scan charge deltacn).map do |v|
|
658
|
+
st = %w(aaseq sequence mh deltacn_orig sf sp xcorr id rsp ions_matched ions_total prots deltamass ppm base_name first_scan last_scan charge deltacn).map do |v|
|
663
659
|
if v == 'prots'
|
664
660
|
"#{v}(#)=#{send(v.to_sym).size}"
|
665
661
|
elsif v.is_a? Array
|
@@ -687,16 +683,17 @@ class Ms::Sequest::Srf::Out::Pep
|
|
687
683
|
## get the first part of the info
|
688
684
|
st = fh.read(( unpack_35 ? Read_35 : Read_32) ) ## read all the hit data
|
689
685
|
|
690
|
-
self[0,
|
686
|
+
self[0,11] = st.unpack(unpack)
|
687
|
+
|
691
688
|
|
692
689
|
# set deltacn_orig_updated
|
693
|
-
self[
|
690
|
+
self[21] = self[1]
|
694
691
|
|
695
692
|
# we are slicing the reference to 38 chars to be the same length as
|
696
693
|
# duplicate references
|
697
|
-
self[
|
694
|
+
self[11] = [Ms::Sequest::Srf::Out::Prot.new(self[11][0,38])]
|
698
695
|
|
699
|
-
self[
|
696
|
+
self[14] = Ms::Id::Peptide.sequence_to_aaseq(self[10])
|
700
697
|
|
701
698
|
fh.read(6) if unpack_35
|
702
699
|
|
data/lib/ms/sequest.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ms-sequest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Prince
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-01 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -55,8 +55,8 @@ dependencies:
|
|
55
55
|
description: reads .SRF, .SQT and supports conversions
|
56
56
|
email: jtprince@gmail.com
|
57
57
|
executables:
|
58
|
-
- srf_to_search.rb
|
59
58
|
- srf_to_sqt.rb
|
59
|
+
- srf_to_search.rb
|
60
60
|
extensions: []
|
61
61
|
|
62
62
|
extra_rdoc_files:
|
@@ -64,13 +64,13 @@ extra_rdoc_files:
|
|
64
64
|
- MIT-LICENSE
|
65
65
|
- History
|
66
66
|
files:
|
67
|
-
- lib/ms/sequest.rb
|
68
|
-
- lib/ms/sequest/sqt.rb
|
69
67
|
- lib/ms/sequest/params.rb
|
68
|
+
- lib/ms/sequest/srf/search.rb
|
70
69
|
- lib/ms/sequest/srf/search/tap.rb
|
71
70
|
- lib/ms/sequest/srf/sqt.rb
|
72
|
-
- lib/ms/sequest/srf/search.rb
|
73
71
|
- lib/ms/sequest/srf.rb
|
72
|
+
- lib/ms/sequest/sqt.rb
|
73
|
+
- lib/ms/sequest.rb
|
74
74
|
- README
|
75
75
|
- MIT-LICENSE
|
76
76
|
- History
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version:
|
103
103
|
requirements: []
|
104
104
|
|
105
|
-
rubyforge_project:
|
105
|
+
rubyforge_project:
|
106
106
|
rubygems_version: 1.3.5
|
107
107
|
signing_key:
|
108
108
|
specification_version: 3
|