ms-sequest 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +18 -0
- data/Gemfile.lock +30 -0
- data/Rakefile +46 -31
- data/VERSION +1 -1
- data/lib/ms/sequest/sqt.rb +4 -2
- data/spec/ms/sequest/sqt_spec.rb +2 -3
- data/spec/ms/sequest/srf/search_spec.rb +80 -24
- data/spec/ms/sequest/srf/sqt_spec.rb +43 -4
- metadata +73 -38
- data/.gitignore +0 -8
- data/spec/ms/sequest/srf/search_spec_helper.rb +0 -341
data/Gemfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
gem "ms-core", ">= 0.0.11"
|
6
|
+
gem "arrayclass", ">= 0.1.0"
|
7
|
+
|
8
|
+
# Add dependencies to develop your gem here.
|
9
|
+
# Include everything needed to run rake, tests, features, etc.
|
10
|
+
group :development do
|
11
|
+
gem "ms-testdata", ">= 0.1.1"
|
12
|
+
gem "spec-more", ">= 0"
|
13
|
+
gem "bundler", "~> 1.0.0"
|
14
|
+
gem "jeweler", "~> 1.5.2"
|
15
|
+
gem "rcov", ">= 0"
|
16
|
+
end
|
17
|
+
|
18
|
+
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
arrayclass (0.1.1)
|
5
|
+
bacon (1.1.0)
|
6
|
+
bio (1.4.1)
|
7
|
+
git (1.2.5)
|
8
|
+
jeweler (1.5.2)
|
9
|
+
bundler (~> 1.0.0)
|
10
|
+
git (>= 1.2.5)
|
11
|
+
rake
|
12
|
+
ms-core (0.0.11)
|
13
|
+
bio (>= 1.4.1)
|
14
|
+
ms-testdata (0.1.1)
|
15
|
+
rake (0.8.7)
|
16
|
+
rcov (0.9.9)
|
17
|
+
spec-more (0.0.4)
|
18
|
+
bacon
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
ruby
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
arrayclass (>= 0.1.0)
|
25
|
+
bundler (~> 1.0.0)
|
26
|
+
jeweler (~> 1.5.2)
|
27
|
+
ms-core (>= 0.0.11)
|
28
|
+
ms-testdata (>= 0.1.1)
|
29
|
+
rcov
|
30
|
+
spec-more
|
data/Rakefile
CHANGED
@@ -1,40 +1,36 @@
|
|
1
1
|
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
2
10
|
require 'rake'
|
3
|
-
require 'jeweler'
|
4
|
-
require 'rake/testtask'
|
5
|
-
require 'rcov/rcovtask'
|
6
|
-
|
7
|
-
NAME = "ms-sequest"
|
8
|
-
|
9
|
-
gemspec = Gem::Specification.new do |s|
|
10
|
-
s.name = NAME
|
11
|
-
s.authors = ["John T. Prince"]
|
12
|
-
s.email = "jtprince@gmail.com"
|
13
|
-
s.homepage = "http://github.com/jtprince/" + NAME
|
14
|
-
s.summary = "An mspire library supporting SEQUEST, Bioworks, SQT, etc"
|
15
|
-
s.description = "reads .SRF, .SQT and supports conversions"
|
16
|
-
s.rubyforge_project = 'mspire'
|
17
|
-
|
18
|
-
s.add_dependency("arrayclass", ">= 0.1.0")
|
19
|
-
s.add_dependency("ms-core", ">= 0.0.2")
|
20
|
-
s.add_dependency("ms-fasta", ">= 0.4.1")
|
21
11
|
|
22
|
-
|
23
|
-
|
12
|
+
require 'jeweler'
|
13
|
+
Jeweler::Tasks.new do |gem|
|
14
|
+
gem.name = "ms-sequest"
|
15
|
+
gem.homepage = "http://github.com/jtprince/ms-sequest"
|
16
|
+
gem.license = "MIT"
|
17
|
+
gem.summary = %Q{An mspire library supporting SEQUEST, Bioworks, SQT, etc}
|
18
|
+
gem.description = %Q{reads .SRF, .SQT and supports conversions}
|
19
|
+
gem.email = "jtprince@gmail.com"
|
20
|
+
gem.authors = ["John T. Prince"]
|
21
|
+
gem.rubyforge_project = 'mspire'
|
22
|
+
# include dependencies in Gemfile
|
24
23
|
end
|
25
|
-
Jeweler::
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
t.libs << 'submodule/ms-testdata/lib'
|
33
|
-
#t.libs << 'submodule/ms-in_silico/lib'
|
34
|
-
#t.libs << 'submodule/tap-mechanize/lib'
|
35
|
-
end
|
24
|
+
Jeweler::RubygemsDotOrgTasks.new
|
25
|
+
|
26
|
+
require 'rake/testtask'
|
27
|
+
Rake::TestTask.new(:spec) do |spec|
|
28
|
+
spec.libs << 'lib' << 'spec'
|
29
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
30
|
+
spec.verbose = true
|
36
31
|
end
|
37
32
|
|
33
|
+
require 'rcov/rcovtask'
|
38
34
|
Rcov::RcovTask.new do |spec|
|
39
35
|
spec.libs << 'spec'
|
40
36
|
spec.pattern = 'spec/**/*_spec.rb'
|
@@ -43,3 +39,22 @@ end
|
|
43
39
|
|
44
40
|
task :default => :spec
|
45
41
|
|
42
|
+
require 'rake/rdoctask'
|
43
|
+
Rake::RDocTask.new do |rdoc|
|
44
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
45
|
+
|
46
|
+
rdoc.rdoc_dir = 'rdoc'
|
47
|
+
rdoc.title = "ms-sequest #{version}"
|
48
|
+
rdoc.rdoc_files.include('README*')
|
49
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.17
|
data/lib/ms/sequest/sqt.rb
CHANGED
@@ -70,8 +70,10 @@ module Ms
|
|
70
70
|
total_sequence_length = 0
|
71
71
|
fastasize = 0
|
72
72
|
Ms::Fasta.open(dbfile) do |fasta|
|
73
|
-
fasta.each
|
74
|
-
|
73
|
+
fasta.each do |entry|
|
74
|
+
total_sequence_length += entry.sequence.size
|
75
|
+
fastasize += 1
|
76
|
+
end
|
75
77
|
end
|
76
78
|
[total_sequence_length, fastasize]
|
77
79
|
end
|
data/spec/ms/sequest/sqt_spec.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
require File.dirname(__FILE__) + '/sqt_spec_helper'
|
1
|
+
require 'spec_helper'
|
4
2
|
|
3
|
+
require 'ms/sequest/sqt_spec_helper'
|
5
4
|
require 'ms/sequest/sqt'
|
6
5
|
|
7
6
|
describe 'reading a small sqt file' do
|
@@ -1,35 +1,84 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path( File.dirname(__FILE__) + '/search_spec_helper' )
|
3
|
-
|
1
|
+
require 'spec_helper'
|
4
2
|
require 'fileutils'
|
5
3
|
|
6
4
|
require 'ms/sequest/srf'
|
7
5
|
require 'ms/sequest/srf/search'
|
8
6
|
|
7
|
+
class SRF_TO_MGF_HELPER
|
8
|
+
FIRST_MSMS = {
|
9
|
+
:first_lines => ['BEGIN IONS', 'TITLE=000.2.2.1.dta', 'CHARGE=1+', 'PEPMASS=391.04541015625'],
|
10
|
+
:first_two_ion_lines => ['111.976043701172 41418.0', '112.733383178711 88292.0'],
|
11
|
+
:last_two_ion_lines => ['407.412780761719 18959.0', '781.085327148438 10104.0'],
|
12
|
+
:last_line => 'END IONS',
|
13
|
+
}
|
14
|
+
LAST_MSMS = {
|
15
|
+
:first_lines => ['BEGIN IONS', 'TITLE=000.3748.3748.3.dta', 'CHARGE=3+', 'PEPMASS=433.56494098625'],
|
16
|
+
:first_two_ion_lines => ['143.466918945312 2110.0', '151.173095703125 4134.0'],
|
17
|
+
:last_two_ion_lines => ['482.678771972656 3357.0', '610.4111328125 8968.0'],
|
18
|
+
:last_line => 'END IONS',
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# these have been checked against Bioworks .dta output
|
23
|
+
class SRF_TO_DTA_HELPER
|
24
|
+
FIRST_SCAN = {
|
25
|
+
:first_line => '391.045410 1',
|
26
|
+
:first_two_ion_lines => ['111.9760 41418', '112.7334 88292'],
|
27
|
+
:last_two_ion_lines => ['407.4128 18959', '781.0853 10104'],
|
28
|
+
}
|
29
|
+
LAST_SCAN = {
|
30
|
+
:first_line => '1298.680271 3',
|
31
|
+
:first_two_ion_lines => ['143.4669 2110', '151.1731 4134'],
|
32
|
+
:last_two_ion_lines => ['482.6788 3357', '610.4111 8968'],
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
9
36
|
Srf_file = Ms::TESTDATA + '/sequest/opd1_static_diff_mods/000.srf'
|
10
|
-
|
11
|
-
|
37
|
+
TMPDIR = TESTFILES + '/tmp'
|
38
|
+
Mgf_output = TMPDIR + '/000.mgf.tmp'
|
39
|
+
Dta_output = TMPDIR + '/000.dta.tmp'
|
40
|
+
|
12
41
|
shared 'an srf to ms2 search converter' do
|
42
|
+
def assert_ion_line_close(expected, actual, delta)
|
43
|
+
expected.split(/\s+/).zip(actual.split(/\s+/)).each do |exp,act|
|
44
|
+
exp.to_f.should.be.close act.to_f, delta
|
45
|
+
end
|
46
|
+
end
|
13
47
|
|
14
|
-
def
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
48
|
+
def compare_dtas(key, filename)
|
49
|
+
ok File.exist?(filename)
|
50
|
+
lines = IO.read(filename).strip.split("\n")
|
51
|
+
(exp1, act1) = [key[:first_line], lines[0]].map {|l| l.split(/\s+/) }
|
52
|
+
exp1.first.to_f.should.be.close act1.first.to_f, 0.000001
|
53
|
+
exp1.last.is act1.last
|
54
|
+
(key[:first_two_ion_lines] + key[:last_two_ion_lines]).zip(lines[1,2]+lines[-2,2]) do |exp,act|
|
55
|
+
assert_ion_line_close(exp, act, 0.0001)
|
21
56
|
end
|
22
57
|
end
|
23
58
|
|
59
|
+
def compare_mgfs(key, string_chunk)
|
60
|
+
lines = string_chunk.strip.split("\n")
|
61
|
+
key[:first_lines][0,3].enums lines[0,3]
|
62
|
+
(exp_pair, act_pair) = [key[:first_lines][3], lines[3]].map {|line| line.split('=') }
|
63
|
+
exp_pair.first.is act_pair.first
|
64
|
+
exp_pair.last.to_f.should.be.close act_pair.last.to_f, 0.00000000001
|
65
|
+
|
66
|
+
(key[:first_two_ion_lines] + key[:last_two_ion_lines]).zip(lines[4,2] + lines[-3,2]).each do |exp_line,act_line|
|
67
|
+
assert_ion_line_close(exp_line, act_line, 0.00000001)
|
68
|
+
end
|
69
|
+
|
70
|
+
key[:last_line].is lines[-1]
|
71
|
+
end
|
72
|
+
|
24
73
|
it 'converts to mgf' do
|
25
74
|
@output = Mgf_output
|
26
75
|
@convert_to_mgf.call
|
27
76
|
ok File.exist?(@output)
|
28
77
|
output = IO.read(@output)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
78
|
+
chunks = output.split("\n\n")
|
79
|
+
|
80
|
+
compare_mgfs(SRF_TO_MGF_HELPER::FIRST_MSMS, chunks.first)
|
81
|
+
compare_mgfs(SRF_TO_MGF_HELPER::LAST_MSMS, chunks.last)
|
33
82
|
end
|
34
83
|
|
35
84
|
it 'generates .dta files' do
|
@@ -40,19 +89,20 @@ shared 'an srf to ms2 search converter' do
|
|
40
89
|
# frozen (not verified):
|
41
90
|
Dir[@output + "/*.*"].size.is 3893 # the correct number files
|
42
91
|
|
43
|
-
|
44
|
-
|
45
|
-
IO.read(first_file).is SRF_TO_DTA_HELPER::FIRST_SCAN.gsub("\n", "\r\n")
|
46
|
-
last_file = @output + '/000.3748.3748.3.dta'
|
47
|
-
IO.read(last_file).is SRF_TO_DTA_HELPER::LAST_SCAN.gsub("\n", "\r\n")
|
48
|
-
|
49
|
-
del(@output)
|
92
|
+
compare_dtas(SRF_TO_DTA_HELPER::FIRST_SCAN, @output + '/000.2.2.1.dta')
|
93
|
+
compare_dtas(SRF_TO_DTA_HELPER::LAST_SCAN, @output + '/000.3748.3748.3.dta')
|
50
94
|
end
|
51
95
|
|
52
96
|
end
|
53
97
|
|
54
|
-
|
55
98
|
describe 'converting an srf to ms2 search format: programmatic' do
|
99
|
+
before do
|
100
|
+
FileUtils.mkdir(TMPDIR) unless File.exist?(TMPDIR)
|
101
|
+
end
|
102
|
+
after do
|
103
|
+
FileUtils.rmtree(TMPDIR)
|
104
|
+
end
|
105
|
+
|
56
106
|
@srf = Ms::Sequest::Srf.new(Srf_file)
|
57
107
|
|
58
108
|
@convert_to_mgf = lambda { @srf.to_mgf(Mgf_output) }
|
@@ -63,6 +113,12 @@ describe 'converting an srf to ms2 search format: programmatic' do
|
|
63
113
|
end
|
64
114
|
|
65
115
|
describe 'converting an srf to ms2 search format: commandline' do
|
116
|
+
before do
|
117
|
+
FileUtils.mkdir(TMPDIR) unless File.exist?(TMPDIR)
|
118
|
+
end
|
119
|
+
after do
|
120
|
+
FileUtils.rmtree(TMPDIR)
|
121
|
+
end
|
66
122
|
|
67
123
|
def commandline_lambda(string)
|
68
124
|
lambda { Ms::Sequest::Srf::Search.commandline(string.split(/\s+/)) }
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
require 'ms/sequest/srf'
|
4
4
|
require 'ms/sequest/srf/sqt'
|
@@ -25,6 +25,11 @@ ExpasyStaticMods = ['C=160.1901','Cterm=10.1230','E=161.4455']
|
|
25
25
|
MoleculesStaticMods = ["C=160.1942", "Cterm=10.1230", "E=161.44398"]
|
26
26
|
SpecHelperHeaderHash['StaticMod'] = MoleculesStaticMods
|
27
27
|
|
28
|
+
# these only need to be really close
|
29
|
+
Close_indices = {
|
30
|
+
'S' => [6,7],
|
31
|
+
'M' => [3,4,5,6],
|
32
|
+
}
|
28
33
|
|
29
34
|
SpecHelperOtherLines =<<END
|
30
35
|
S 2 2 1 0.0 VELA 391.04541015625 3021.5419921875 0.0 0
|
@@ -42,7 +47,8 @@ END
|
|
42
47
|
|
43
48
|
module SPEC
|
44
49
|
Srf_file = Ms::TESTDATA + '/sequest/opd1_static_diff_mods/000.srf'
|
45
|
-
|
50
|
+
TMPDIR = TESTFILES + '/tmp'
|
51
|
+
Srf_output = TMPDIR + '/000.sqt.tmp'
|
46
52
|
end
|
47
53
|
|
48
54
|
shared 'an srf to sqt converter' do
|
@@ -88,6 +94,23 @@ shared 'an srf to sqt converter' do
|
|
88
94
|
end
|
89
95
|
end
|
90
96
|
|
97
|
+
def sqt_line_match(act_line_ar, exp_line_ar)
|
98
|
+
exp_line_ar.zip(act_line_ar) do |exp_line, act_line|
|
99
|
+
(e_pieces, a_pieces) = [exp_line, act_line].map {|line| line.chomp.split("\t") }
|
100
|
+
if %w(S M).include?(k = e_pieces[0])
|
101
|
+
(e_close, a_close) = [e_pieces, a_pieces].map do |pieces|
|
102
|
+
Close_indices[k].sort.reverse.map do |i|
|
103
|
+
pieces.delete_at(i).to_f
|
104
|
+
end.reverse
|
105
|
+
end
|
106
|
+
e_close.zip(a_close) do |ex, ac|
|
107
|
+
ex.should.be.close ac, 0.0000001
|
108
|
+
end
|
109
|
+
end
|
110
|
+
e_pieces.enums a_pieces
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
91
114
|
it 'converts without bothering with the database' do
|
92
115
|
@basic_conversion.call
|
93
116
|
ok File.exist?(@output)
|
@@ -97,8 +120,10 @@ shared 'an srf to sqt converter' do
|
|
97
120
|
ok(header_lines.size > 10)
|
98
121
|
ok header_hash_match(header_lines, SpecHelperHeaderHash)
|
99
122
|
other_lines = lines.grep(/^[^H]/)
|
100
|
-
|
101
|
-
other_lines[
|
123
|
+
|
124
|
+
sqt_line_match(other_lines[0,4], SpecHelperOtherLines.strip.split("\n"))
|
125
|
+
sqt_line_match(other_lines[-3,3], SpecHelperOtherLinesEnd.strip.split("\n"))
|
126
|
+
|
102
127
|
del(@output)
|
103
128
|
end
|
104
129
|
|
@@ -134,6 +159,12 @@ shared 'an srf to sqt converter' do
|
|
134
159
|
end
|
135
160
|
|
136
161
|
describe "programmatic interface srf to sqt" do
|
162
|
+
before do
|
163
|
+
FileUtils.mkdir(SPEC::TMPDIR) unless File.exist?(SPEC::TMPDIR)
|
164
|
+
end
|
165
|
+
after do
|
166
|
+
FileUtils.rm_rf(SPEC::TMPDIR)
|
167
|
+
end
|
137
168
|
|
138
169
|
@srf = Ms::Sequest::Srf.new(SPEC::Srf_file)
|
139
170
|
|
@@ -169,6 +200,14 @@ describe "programmatic interface srf to sqt" do
|
|
169
200
|
end
|
170
201
|
|
171
202
|
describe "command-line interface srf to sqt" do
|
203
|
+
before do
|
204
|
+
FileUtils.mkdir(SPEC::TMPDIR) unless File.exist?(SPEC::TMPDIR)
|
205
|
+
end
|
206
|
+
after do
|
207
|
+
FileUtils.rm_rf(SPEC::TMPDIR)
|
208
|
+
end
|
209
|
+
|
210
|
+
|
172
211
|
def commandline_lambda(string)
|
173
212
|
lambda { Ms::Sequest::Srf::Sqt.commandline( string.split(/\s+/) ) }
|
174
213
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 17
|
9
|
+
version: 0.0.17
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- John T. Prince
|
@@ -14,69 +14,101 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-02-24 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
22
|
-
prerelease: false
|
21
|
+
name: ms-core
|
23
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
segments:
|
28
28
|
- 0
|
29
|
-
- 1
|
30
29
|
- 0
|
31
|
-
|
30
|
+
- 11
|
31
|
+
version: 0.0.11
|
32
32
|
type: :runtime
|
33
|
+
prerelease: false
|
33
34
|
version_requirements: *id001
|
34
35
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
36
|
-
prerelease: false
|
36
|
+
name: arrayclass
|
37
37
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
38
39
|
requirements:
|
39
40
|
- - ">="
|
40
41
|
- !ruby/object:Gem::Version
|
41
42
|
segments:
|
42
43
|
- 0
|
44
|
+
- 1
|
43
45
|
- 0
|
44
|
-
|
45
|
-
version: 0.0.2
|
46
|
+
version: 0.1.0
|
46
47
|
type: :runtime
|
48
|
+
prerelease: false
|
47
49
|
version_requirements: *id002
|
48
50
|
- !ruby/object:Gem::Dependency
|
49
|
-
name: ms-
|
50
|
-
prerelease: false
|
51
|
+
name: ms-testdata
|
51
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
52
54
|
requirements:
|
53
55
|
- - ">="
|
54
56
|
- !ruby/object:Gem::Version
|
55
57
|
segments:
|
56
58
|
- 0
|
57
|
-
- 4
|
58
59
|
- 1
|
59
|
-
|
60
|
-
|
60
|
+
- 1
|
61
|
+
version: 0.1.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
61
64
|
version_requirements: *id003
|
62
65
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
64
|
-
prerelease: false
|
66
|
+
name: spec-more
|
65
67
|
requirement: &id004 !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
66
69
|
requirements:
|
67
70
|
- - ">="
|
68
71
|
- !ruby/object:Gem::Version
|
69
72
|
segments:
|
70
73
|
- 0
|
71
|
-
|
72
|
-
- 0
|
73
|
-
version: 0.18.0
|
74
|
+
version: "0"
|
74
75
|
type: :development
|
76
|
+
prerelease: false
|
75
77
|
version_requirements: *id004
|
76
78
|
- !ruby/object:Gem::Dependency
|
77
|
-
name:
|
78
|
-
prerelease: false
|
79
|
+
name: bundler
|
79
80
|
requirement: &id005 !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
segments:
|
86
|
+
- 1
|
87
|
+
- 0
|
88
|
+
- 0
|
89
|
+
version: 1.0.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: *id005
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: jeweler
|
95
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ~>
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
segments:
|
101
|
+
- 1
|
102
|
+
- 5
|
103
|
+
- 2
|
104
|
+
version: 1.5.2
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: *id006
|
108
|
+
- !ruby/object:Gem::Dependency
|
109
|
+
name: rcov
|
110
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
80
112
|
requirements:
|
81
113
|
- - ">="
|
82
114
|
- !ruby/object:Gem::Version
|
@@ -84,12 +116,13 @@ dependencies:
|
|
84
116
|
- 0
|
85
117
|
version: "0"
|
86
118
|
type: :development
|
87
|
-
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: *id007
|
88
121
|
description: reads .SRF, .SQT and supports conversions
|
89
122
|
email: jtprince@gmail.com
|
90
123
|
executables:
|
91
|
-
- srf_to_sqt.rb
|
92
124
|
- srf_to_search.rb
|
125
|
+
- srf_to_sqt.rb
|
93
126
|
extensions: []
|
94
127
|
|
95
128
|
extra_rdoc_files:
|
@@ -97,8 +130,9 @@ extra_rdoc_files:
|
|
97
130
|
- README.rdoc
|
98
131
|
files:
|
99
132
|
- .autotest
|
100
|
-
- .gitignore
|
101
133
|
- .gitmodules
|
134
|
+
- Gemfile
|
135
|
+
- Gemfile.lock
|
102
136
|
- History
|
103
137
|
- LICENSE
|
104
138
|
- README.rdoc
|
@@ -121,7 +155,6 @@ files:
|
|
121
155
|
- spec/ms/sequest/sqt_spec.rb
|
122
156
|
- spec/ms/sequest/sqt_spec_helper.rb
|
123
157
|
- spec/ms/sequest/srf/search_spec.rb
|
124
|
-
- spec/ms/sequest/srf/search_spec_helper.rb
|
125
158
|
- spec/ms/sequest/srf/sqt_spec.rb
|
126
159
|
- spec/ms/sequest/srf_spec.rb
|
127
160
|
- spec/ms/sequest/srf_spec_helper.rb
|
@@ -135,21 +168,24 @@ files:
|
|
135
168
|
- spec/testfiles/small2.sqt
|
136
169
|
has_rdoc: true
|
137
170
|
homepage: http://github.com/jtprince/ms-sequest
|
138
|
-
licenses:
|
139
|
-
|
171
|
+
licenses:
|
172
|
+
- MIT
|
140
173
|
post_install_message:
|
141
|
-
rdoc_options:
|
142
|
-
|
174
|
+
rdoc_options: []
|
175
|
+
|
143
176
|
require_paths:
|
144
177
|
- lib
|
145
178
|
required_ruby_version: !ruby/object:Gem::Requirement
|
179
|
+
none: false
|
146
180
|
requirements:
|
147
181
|
- - ">="
|
148
182
|
- !ruby/object:Gem::Version
|
183
|
+
hash: 1512994769580445168
|
149
184
|
segments:
|
150
185
|
- 0
|
151
186
|
version: "0"
|
152
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
|
+
none: false
|
153
189
|
requirements:
|
154
190
|
- - ">="
|
155
191
|
- !ruby/object:Gem::Version
|
@@ -159,19 +195,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
195
|
requirements: []
|
160
196
|
|
161
197
|
rubyforge_project: mspire
|
162
|
-
rubygems_version: 1.3.
|
198
|
+
rubygems_version: 1.3.7
|
163
199
|
signing_key:
|
164
200
|
specification_version: 3
|
165
201
|
summary: An mspire library supporting SEQUEST, Bioworks, SQT, etc
|
166
202
|
test_files:
|
167
|
-
- spec/ms/sequest/srf_spec_helper.rb
|
168
|
-
- spec/ms/sequest/pepxml_spec.rb
|
169
203
|
- spec/ms/sequest/bioworks_spec.rb
|
170
|
-
- spec/ms/sequest/srf/search_spec.rb
|
171
|
-
- spec/ms/sequest/srf/search_spec_helper.rb
|
172
|
-
- spec/ms/sequest/srf/sqt_spec.rb
|
173
|
-
- spec/ms/sequest/sqt_spec_helper.rb
|
174
204
|
- spec/ms/sequest/params_spec.rb
|
205
|
+
- spec/ms/sequest/pepxml_spec.rb
|
175
206
|
- spec/ms/sequest/sqt_spec.rb
|
207
|
+
- spec/ms/sequest/sqt_spec_helper.rb
|
208
|
+
- spec/ms/sequest/srf/search_spec.rb
|
209
|
+
- spec/ms/sequest/srf/sqt_spec.rb
|
176
210
|
- spec/ms/sequest/srf_spec.rb
|
211
|
+
- spec/ms/sequest/srf_spec_helper.rb
|
177
212
|
- spec/spec_helper.rb
|
data/.gitignore
DELETED
@@ -1,341 +0,0 @@
|
|
1
|
-
class SRF_TO_MGF_HELPER
|
2
|
-
FIRST_MSMS = <<FINISH
|
3
|
-
BEGIN IONS
|
4
|
-
TITLE=000.2.2.1.dta
|
5
|
-
CHARGE=1+
|
6
|
-
PEPMASS=391.04541015625
|
7
|
-
111.976043701172 41418.0
|
8
|
-
112.733383178711 88292.0
|
9
|
-
113.536590576172 26129.0
|
10
|
-
149.049530029297 2852380.0
|
11
|
-
149.960266113281 110104.0
|
12
|
-
150.578399658203 4607.0
|
13
|
-
155.026885986328 16524.0
|
14
|
-
160.48388671875 17154.0
|
15
|
-
161.9013671875 6562.0
|
16
|
-
164.386596679688 76498.0
|
17
|
-
166.8427734375 1663866.0
|
18
|
-
167.719482421875 72010.0
|
19
|
-
168.693237304688 57081.0
|
20
|
-
197.131774902344 7933.0
|
21
|
-
217.975738525391 20193.0
|
22
|
-
218.799468994141 15350.0
|
23
|
-
222.215576171875 21254.0
|
24
|
-
223.027404785156 27495.0
|
25
|
-
224.90771484375 16117.0
|
26
|
-
225.895538330078 25061.0
|
27
|
-
253.583435058594 7431.0
|
28
|
-
255.372528076172 25846.0
|
29
|
-
257.151245117188 5435.0
|
30
|
-
258.856323242188 26408.0
|
31
|
-
260.166259765625 261245.0
|
32
|
-
260.812072753906 639646.0
|
33
|
-
261.715698242188 82724.0
|
34
|
-
262.366638183594 4.0
|
35
|
-
272.052124023438 43365.0
|
36
|
-
277.773315429688 159994.0
|
37
|
-
278.856872558594 2140713.0
|
38
|
-
279.935546875 397598.0
|
39
|
-
280.699951171875 4.0
|
40
|
-
289.641723632812 32978.0
|
41
|
-
290.385864257812 31836.0
|
42
|
-
291.786682128906 15850.0
|
43
|
-
296.626831054688 54212.0
|
44
|
-
298.6279296875 22051.0
|
45
|
-
300.035766601562 156183.0
|
46
|
-
301.489501953125 10696.0
|
47
|
-
307.485473632812 37712.0
|
48
|
-
326.803100585938 18038.0
|
49
|
-
351.965393066406 6909.0
|
50
|
-
359.648010253906 10347.0
|
51
|
-
361.146850585938 21067.0
|
52
|
-
364.831176757812 22587.0
|
53
|
-
370.079040527344 9646.0
|
54
|
-
371.641967773438 57566.0
|
55
|
-
372.577087402344 40545.0
|
56
|
-
373.967895507812 76673.0
|
57
|
-
374.671997070312 70584.0
|
58
|
-
388.660583496094 22746.0
|
59
|
-
405.444030761719 23893.0
|
60
|
-
406.481384277344 27502.0
|
61
|
-
407.412780761719 18959.0
|
62
|
-
781.085327148438 10104.0
|
63
|
-
END IONS
|
64
|
-
|
65
|
-
FINISH
|
66
|
-
|
67
|
-
LAST_MSMS = <<FINISH
|
68
|
-
BEGIN IONS
|
69
|
-
TITLE=000.3748.3748.3.dta
|
70
|
-
CHARGE=3+
|
71
|
-
PEPMASS=433.56494098625
|
72
|
-
143.466918945312 2110.0
|
73
|
-
151.173095703125 4134.0
|
74
|
-
158.817443847656 2565.0
|
75
|
-
178.629333496094 6114.0
|
76
|
-
180.065307617188 879.0
|
77
|
-
185.164703369141 2364.0
|
78
|
-
206.865417480469 7925.0
|
79
|
-
210.208190917969 1242.0
|
80
|
-
212.763122558594 893.0
|
81
|
-
217.749298095703 2202.0
|
82
|
-
227.912048339844 4343.0
|
83
|
-
235.973571777344 2485.0
|
84
|
-
236.941436767578 679.0
|
85
|
-
251.645324707031 4690.0
|
86
|
-
252.677307128906 7145.0
|
87
|
-
271.46435546875 1504.0
|
88
|
-
275.466674804688 5912.0
|
89
|
-
276.738586425781 1819.0
|
90
|
-
278.331237792969 775.0
|
91
|
-
282.728149414062 963.0
|
92
|
-
287.679931640625 1749.0
|
93
|
-
288.412719726562 2603.0
|
94
|
-
291.451843261719 3082.0
|
95
|
-
292.405212402344 8303.0
|
96
|
-
299.569091796875 5620.0
|
97
|
-
302.3056640625 2007.0
|
98
|
-
306.021362304688 1564.0
|
99
|
-
308.79541015625 3738.0
|
100
|
-
312.496154785156 3964.0
|
101
|
-
313.62890625 11383.0
|
102
|
-
318.949340820312 1945.0
|
103
|
-
319.691772460938 2781.0
|
104
|
-
326.534423828125 4564.0
|
105
|
-
331.253601074219 7761.0
|
106
|
-
334.9482421875 4798.0
|
107
|
-
336.904418945312 5597.0
|
108
|
-
338.891174316406 5830.0
|
109
|
-
342.512817382812 8324.0
|
110
|
-
343.478881835938 12579.0
|
111
|
-
344.843627929688 3118.0
|
112
|
-
347.899291992188 7021.0
|
113
|
-
348.722778320312 2224.0
|
114
|
-
350.681274414062 2440.0
|
115
|
-
357.763061523438 14220.0
|
116
|
-
359.35986328125 11427.0
|
117
|
-
360.3603515625 23882.0
|
118
|
-
361.486633300781 18834.0
|
119
|
-
362.540954589844 10546.0
|
120
|
-
363.612121582031 2031.0
|
121
|
-
364.794799804688 5664.0
|
122
|
-
368.715576171875 3888.0
|
123
|
-
372.091003417969 7189.0
|
124
|
-
372.73583984375 3329.0
|
125
|
-
376.572204589844 7716.0
|
126
|
-
378.099853515625 11617.0
|
127
|
-
378.795227050781 1641.0
|
128
|
-
380.755065917969 7448.0
|
129
|
-
386.034118652344 12462.0
|
130
|
-
389.507751464844 15551.0
|
131
|
-
390.844665527344 10268.0
|
132
|
-
391.481140136719 500.0
|
133
|
-
392.773742675781 2896.0
|
134
|
-
396.465515136719 3636.0
|
135
|
-
397.885864257812 1616.0
|
136
|
-
400.766723632812 1113.0
|
137
|
-
403.266967773438 8535.0
|
138
|
-
404.394714355469 1578.0
|
139
|
-
406.269592285156 7361.0
|
140
|
-
407.214721679688 919.0
|
141
|
-
408.305969238281 11683.0
|
142
|
-
409.64501953125 14506.0
|
143
|
-
410.707946777344 6735.0
|
144
|
-
411.557250976562 6330.0
|
145
|
-
414.049255371094 2606.0
|
146
|
-
414.9775390625 25274.0
|
147
|
-
415.742065429688 5809.0
|
148
|
-
418.659118652344 2842.0
|
149
|
-
420.640441894531 4050.0
|
150
|
-
421.357604980469 4565.0
|
151
|
-
424.955871582031 4801.0
|
152
|
-
425.623840332031 1578.0
|
153
|
-
427.966552734375 5836.0
|
154
|
-
431.106018066406 4433.0
|
155
|
-
431.956970214844 2428.0
|
156
|
-
432.5595703125 7390.0
|
157
|
-
433.419677734375 2093.0
|
158
|
-
441.233154296875 3196.0
|
159
|
-
441.985717773438 2048.0
|
160
|
-
448.181823730469 3643.0
|
161
|
-
449.430480957031 11621.0
|
162
|
-
450.174560546875 4437.0
|
163
|
-
450.84521484375 3907.0
|
164
|
-
451.573608398438 6557.0
|
165
|
-
452.447204589844 1461.0
|
166
|
-
453.993347167969 3555.0
|
167
|
-
465.704284667969 6213.0
|
168
|
-
466.320739746094 1146.0
|
169
|
-
468.420104980469 3492.0
|
170
|
-
482.678771972656 3357.0
|
171
|
-
610.4111328125 8968.0
|
172
|
-
END IONS
|
173
|
-
FINISH
|
174
|
-
end
|
175
|
-
|
176
|
-
# these have been checked against Bioworks .dta output
|
177
|
-
class SRF_TO_DTA_HELPER
|
178
|
-
FIRST_SCAN = <<FINISH
|
179
|
-
391.045410 1
|
180
|
-
111.9760 41418
|
181
|
-
112.7334 88292
|
182
|
-
113.5366 26129
|
183
|
-
149.0495 2852380
|
184
|
-
149.9603 110104
|
185
|
-
150.5784 4607
|
186
|
-
155.0269 16524
|
187
|
-
160.4839 17154
|
188
|
-
161.9014 6562
|
189
|
-
164.3866 76498
|
190
|
-
166.8428 1663866
|
191
|
-
167.7195 72010
|
192
|
-
168.6932 57081
|
193
|
-
197.1318 7933
|
194
|
-
217.9757 20193
|
195
|
-
218.7995 15350
|
196
|
-
222.2156 21254
|
197
|
-
223.0274 27495
|
198
|
-
224.9077 16117
|
199
|
-
225.8955 25061
|
200
|
-
253.5834 7431
|
201
|
-
255.3725 25846
|
202
|
-
257.1512 5435
|
203
|
-
258.8563 26408
|
204
|
-
260.1663 261245
|
205
|
-
260.8121 639646
|
206
|
-
261.7157 82724
|
207
|
-
262.3666 4
|
208
|
-
272.0521 43365
|
209
|
-
277.7733 159994
|
210
|
-
278.8569 2140713
|
211
|
-
279.9355 397598
|
212
|
-
280.7000 4
|
213
|
-
289.6417 32978
|
214
|
-
290.3859 31836
|
215
|
-
291.7867 15850
|
216
|
-
296.6268 54212
|
217
|
-
298.6279 22051
|
218
|
-
300.0358 156183
|
219
|
-
301.4895 10696
|
220
|
-
307.4855 37712
|
221
|
-
326.8031 18038
|
222
|
-
351.9654 6909
|
223
|
-
359.6480 10347
|
224
|
-
361.1469 21067
|
225
|
-
364.8312 22587
|
226
|
-
370.0790 9646
|
227
|
-
371.6420 57566
|
228
|
-
372.5771 40545
|
229
|
-
373.9679 76673
|
230
|
-
374.6720 70584
|
231
|
-
388.6606 22746
|
232
|
-
405.4440 23893
|
233
|
-
406.4814 27502
|
234
|
-
407.4128 18959
|
235
|
-
781.0853 10104
|
236
|
-
FINISH
|
237
|
-
|
238
|
-
LAST_SCAN = <<FINISH
|
239
|
-
1298.680271 3
|
240
|
-
143.4669 2110
|
241
|
-
151.1731 4134
|
242
|
-
158.8174 2565
|
243
|
-
178.6293 6114
|
244
|
-
180.0653 879
|
245
|
-
185.1647 2364
|
246
|
-
206.8654 7925
|
247
|
-
210.2082 1242
|
248
|
-
212.7631 893
|
249
|
-
217.7493 2202
|
250
|
-
227.9120 4343
|
251
|
-
235.9736 2485
|
252
|
-
236.9414 679
|
253
|
-
251.6453 4690
|
254
|
-
252.6773 7145
|
255
|
-
271.4644 1504
|
256
|
-
275.4667 5912
|
257
|
-
276.7386 1819
|
258
|
-
278.3312 775
|
259
|
-
282.7281 963
|
260
|
-
287.6799 1749
|
261
|
-
288.4127 2603
|
262
|
-
291.4518 3082
|
263
|
-
292.4052 8303
|
264
|
-
299.5691 5620
|
265
|
-
302.3057 2007
|
266
|
-
306.0214 1564
|
267
|
-
308.7954 3738
|
268
|
-
312.4962 3964
|
269
|
-
313.6289 11383
|
270
|
-
318.9493 1945
|
271
|
-
319.6918 2781
|
272
|
-
326.5344 4564
|
273
|
-
331.2536 7761
|
274
|
-
334.9482 4798
|
275
|
-
336.9044 5597
|
276
|
-
338.8912 5830
|
277
|
-
342.5128 8324
|
278
|
-
343.4789 12579
|
279
|
-
344.8436 3118
|
280
|
-
347.8993 7021
|
281
|
-
348.7228 2224
|
282
|
-
350.6813 2440
|
283
|
-
357.7631 14220
|
284
|
-
359.3599 11427
|
285
|
-
360.3604 23882
|
286
|
-
361.4866 18834
|
287
|
-
362.5410 10546
|
288
|
-
363.6121 2031
|
289
|
-
364.7948 5664
|
290
|
-
368.7156 3888
|
291
|
-
372.0910 7189
|
292
|
-
372.7358 3329
|
293
|
-
376.5722 7716
|
294
|
-
378.0999 11617
|
295
|
-
378.7952 1641
|
296
|
-
380.7551 7448
|
297
|
-
386.0341 12462
|
298
|
-
389.5078 15551
|
299
|
-
390.8447 10268
|
300
|
-
391.4811 500
|
301
|
-
392.7737 2896
|
302
|
-
396.4655 3636
|
303
|
-
397.8859 1616
|
304
|
-
400.7667 1113
|
305
|
-
403.2670 8535
|
306
|
-
404.3947 1578
|
307
|
-
406.2696 7361
|
308
|
-
407.2147 919
|
309
|
-
408.3060 11683
|
310
|
-
409.6450 14506
|
311
|
-
410.7079 6735
|
312
|
-
411.5573 6330
|
313
|
-
414.0493 2606
|
314
|
-
414.9775 25274
|
315
|
-
415.7421 5809
|
316
|
-
418.6591 2842
|
317
|
-
420.6404 4050
|
318
|
-
421.3576 4565
|
319
|
-
424.9559 4801
|
320
|
-
425.6238 1578
|
321
|
-
427.9666 5836
|
322
|
-
431.1060 4433
|
323
|
-
431.9570 2428
|
324
|
-
432.5596 7390
|
325
|
-
433.4197 2093
|
326
|
-
441.2332 3196
|
327
|
-
441.9857 2048
|
328
|
-
448.1818 3643
|
329
|
-
449.4305 11621
|
330
|
-
450.1746 4437
|
331
|
-
450.8452 3907
|
332
|
-
451.5736 6557
|
333
|
-
452.4472 1461
|
334
|
-
453.9933 3555
|
335
|
-
465.7043 6213
|
336
|
-
466.3207 1146
|
337
|
-
468.4201 3492
|
338
|
-
482.6788 3357
|
339
|
-
610.4111 8968
|
340
|
-
FINISH
|
341
|
-
end
|