mspire 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -238,7 +238,7 @@ spec = Gem::Specification.new do |s|
238
238
  s.rdoc_options = rdoc_options
239
239
  s.extra_rdoc_files = rdoc_extra_includes
240
240
  s.executables = FL["bin/*"].map {|file| File.basename(file) }
241
- s.add_dependency('libjtp', '~> 0.2.5')
241
+ s.add_dependency('libjtp', '~> 0.2.12')
242
242
  s.add_dependency('axml')
243
243
  s.requirements << '"libxml" is the prefered xml parser right now. libxml, xmlparser, REXML and regular expressions are used as fallback in some routines.'
244
244
  s.requirements << 'some plotting functions will not be available without the "gnuplot" gem (and underlying gnuplot binary)'
@@ -122,3 +122,7 @@ interfaces and implementations (using ArrayClass)
122
122
 
123
123
  1. IMPORTANT BUG FIX: protein reporting in srf files is correct now (proteins after the first protein were being assigned to the last hit in an out file).
124
124
  2. SQT export is correct and works at least on 3.2 and 3.3.1.
125
+
126
+ ## version 0.3.1
127
+
128
+ 1. Bug fix in srf filtering (num_hits adjusted)
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Mspire
3
- Version = '0.3.0'
3
+ Version = '0.3.1'
4
4
  end
@@ -411,7 +411,7 @@ Default_Options = {
411
411
  if second_hit ; '0'
412
412
  else ; '1'
413
413
  end
414
-
414
+
415
415
  ## mass calculations:
416
416
  precursor_neutral_mass = dta_file.mh - h_plus
417
417
  calc_neutral_pep_mass = top_hit[0] - h_plus
@@ -130,6 +130,7 @@ class SRFGroup
130
130
  end
131
131
  if hits.size != before
132
132
  SRF::OUT::Pep.set_deltacn_from_xcorr(hits)
133
+ out_file.num_hits = hits.size
133
134
  end
134
135
  end
135
136
  end
@@ -175,9 +175,9 @@ if ARGV.size < 1
175
175
 
176
176
  PREREQS:
177
177
  sudo apt-get install <prereq>
178
- make, g++, ruby, apache2, libzzip-dev, libgd2-dev, libpng3-dev
178
+ make, g++, ruby, apache2, libzzip-dev, libgd2-dev, libpng3-dev libexpat-dev
179
179
  --> or all on one line:
180
- sudo apt-get install make g++ ruby apache2 libzzip-dev libgd2-dev libpng3-dev
180
+ sudo apt-get install make g++ ruby apache2 libzzip-dev libgd2-dev libpng3-dev libexpat-dev
181
181
 
182
182
  In all likelihood, this will need to be run as root.
183
183
  "
@@ -224,7 +224,7 @@ Dir.chdir ARGV[0] do
224
224
  swap_line(sequest2xml, /cerr << " error: length of " << result->spectrum_ << " less than 13" << endl;/, 'cerr << " error: length of " << result->spectrum_ << " less than 6" << endl;')
225
225
  # CLEAN, MAKE, MAKE INSTALL:
226
226
  Dir.chdir('src') do
227
- #sys "make clean"
227
+ sys "make clean"
228
228
  sys "make all"
229
229
  sys "make install"
230
230
  end
@@ -106,7 +106,44 @@ describe 'filter_and_validate.rb on small bioworks file' do
106
106
 
107
107
  struct = @st_to_yaml.call( "#{@fake_bioworks_file} --proteins -1 0.0 -2 0.0 -3 0.0 -d 0.01 -p 1000000 --decoy /^DECOY_/ --digestion #{@small_fasta_file},#{@params_file} --bad_aa C,true,0.001 --bad_aa E,true --bad_aa C,false,0.001 --bias #{@small_bias_fasta_file},true --bias #{@small_bias_fasta_file},false --bias #{@small_bias_fasta_file},true,0.2 --tmm #{@phobius_file},1,true,0.8,0.2 --tmm #{@phobius_file} --tmm #{@toppred_file},3,true,false --tmm #{@toppred_file} --tps #{@small_bias_fasta_file} -o text_table:#{@table_output_file} " )
108
108
  frozen = YAML.load_file( File.dirname(__FILE__) + "/filter_and_validate__multiple_vals_helper.yaml" )
109
- struct.should == frozen
109
+
110
+ ## Pephits precision:
111
+ ordering = frozen['pephits_precision'].map {|v| v['validator'] }
112
+ vals = frozen['pephits_precision'].map {|v| v['value'] }
113
+ struct['pephits_precision'].zip(ordering, vals) do |act, vali, val|
114
+ act['validator'].should == vali
115
+ act['value'].should == val
116
+ end
117
+
118
+ struct['pephits'].should == frozen['pephits']
119
+
120
+ ##### Params:
121
+ frp = frozen['params']
122
+ stp = struct['params']
123
+
124
+ frp['validators'].zip(stp['validators']) do |f,s|
125
+ f.should == s
126
+ end
127
+
128
+ %w(ties prefilter top_hit_by decoy_on_match postfilter include_ties_in_top_hit_postfilter hits_together proteins include_ties_in_top_hit_prefilter).each do |k|
129
+ stp[k].should == frp[k]
130
+ end
131
+
132
+ ## digestion & output (special)
133
+ %w(digestion output).each do |k|
134
+ stp[k].zip(frp[k]).each do |s,f|
135
+ File.basename( s.gsub('\\', '/') ).should == File.basename(f)
136
+ end
137
+ end
138
+
139
+ ## Sequest:
140
+ frp['sequest'].each do |k,v|
141
+ stp['sequest'][k].should == v
142
+ end
143
+
144
+ ## TODO: Fill in protein level stuff once stabilized
145
+
146
+ #struct.should == frozen
110
147
 
111
148
  text_table = IO.read(@table_output_file)
112
149
 
@@ -46,15 +46,22 @@ describe 'filter_and_validate.rb on small bioworks file' do
46
46
 
47
47
  it 'responds to --prob init' do
48
48
  normal = @st_to_yaml.call( @args + " --prob" )
49
- normal[:pephits_precision].first[:values].should == [1.0, 1.0, 0.996655518394649, 0.918918918918919]
49
+
50
+ normal[:pephits_precision].first[:values].zip([1.0, 1.0, 0.996655518394649, 0.918918918918919]) do |got,exp|
51
+ got.should be_close(exp, 0.000000000001)
52
+ end
50
53
  #normal_nsp = @st_to_yaml.call( @args + " --prob nsp" )
51
54
  #normal.should == normal_nsp
52
55
  init = @st_to_yaml.call( @args + " --prob init" )
53
56
  init.should_not == normal
54
- init[:pephits_precision].first[:values].should == [1.0, 0.974358974358974, 0.981324278438031, 0.890429958391123]
57
+ init[:pephits_precision].first[:values].zip([1.0, 0.974358974358974, 0.981324278438031, 0.890429958391123]) do |got,exp|
58
+ got.should be_close(exp, 0.000000000001)
59
+ end
55
60
  with_sort_by = @st_to_yaml.call( @args + " --prob nsp --sort_by_init" )
56
61
  # frozen
57
- with_sort_by[:pephits_precision].first[:values].should == [1.0, 0.994974874371859, 0.996655518394649, 0.918918918918919]
62
+ with_sort_by[:pephits_precision].first[:values].zip([1.0, 0.994974874371859, 0.996655518394649, 0.918918918918919]) do |got,exp|
63
+ got.should be_close(exp, 0.000000000001)
64
+ end
58
65
  end
59
66
 
60
67
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: mspire
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.0
7
- date: 2007-12-13 00:00:00 -06:00
6
+ version: 0.3.1
7
+ date: 2007-12-14 00:00:00 -06:00
8
8
  summary: Mass Spectrometry Proteomics Objects, Scripts, and Executables
9
9
  require_paths:
10
10
  - lib
@@ -368,7 +368,7 @@ dependencies:
368
368
  requirements:
369
369
  - - ~>
370
370
  - !ruby/object:Gem::Version
371
- version: 0.2.5
371
+ version: 0.2.12
372
372
  version:
373
373
  - !ruby/object:Gem::Dependency
374
374
  name: axml