ms-xcalibur 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/History CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.0 / 2009-05-25
2
+
3
+ * updates to use tap-0.17.0
4
+
1
5
  == 0.2.0 / 2009-03-31
2
6
 
3
7
  Updated release to use latest tap. Removed
@@ -1,10 +1,11 @@
1
+ require 'tap/tasks/file_task'
1
2
  require 'constants'
2
3
 
3
4
  module Ms
4
5
  module Xcalibur
5
6
  module Convert
6
7
 
7
- # :startdoc::manifest convert dta files to mgf format
8
+ # :startdoc::task convert dta files to mgf format
8
9
  #
9
10
  # Converts a set of dta files (Sequest format) into an mgf (Mascot format)
10
11
  # file. By default the mgf file is printed to $stdout, so redirection is
@@ -42,12 +43,12 @@ module Ms
42
43
  # calculated from the {constants}[bioactive.rubyforge.org/constants] gem to be
43
44
  # ~ 1.007276 Da
44
45
  #
45
- class DtaToMgf < Tap::FileTask
46
+ class DtaToMgf < Tap::Tasks::FileTask
46
47
  include Constants::Libraries
47
48
 
48
49
  # Returns the unrounded mass of a proton (H - e) as calculated
49
50
  # from the {constants}[bioactive.rubyforge.org/constants] gem.
50
- config :proton_mass, Element['H'].mass - Particle['Electron'].mass, &c.num_or_nil # Specify the proton mass
51
+ config :proton_mass, Element['H'].mass - Particle['Electron'].mass, &c.numeric_or_nil # Specify the proton mass
51
52
  config :output, $stdout, &c.io(:<<, :binmode) # The output file
52
53
 
53
54
  def process(*dta_files)
@@ -57,7 +58,7 @@ module Ms
57
58
 
58
59
  log :convert, "#{dta_files.length} dta files"
59
60
  dta_files.each do |file|
60
- check_terminate
61
+ app.check_terminate
61
62
  lines = File.read(file).split(/\r?\n/)
62
63
 
63
64
  # get the mh and z
@@ -79,6 +80,7 @@ END IONS
79
80
  }
80
81
  end
81
82
  end
83
+ output
82
84
  end
83
85
  end
84
86
  end
@@ -1,8 +1,10 @@
1
+ require 'tap/tasks/file_task'
2
+
1
3
  module Ms
2
4
  module Xcalibur
3
5
  module Convert
4
6
 
5
- # :startdoc::manifest convert RAW files to dta format
7
+ # :startdoc::task convert RAW files to dta format
6
8
  #
7
9
  # Converts a RAW file to dta files using extract_msn.exe. Returns an
8
10
  # array of the output dta files. By default extracted files are put
@@ -27,13 +29,13 @@ module Ms
27
29
  #
28
30
  # % tap run -- raw_to_dta --extract_msn_help
29
31
  #
30
- class RawToDta < Tap::FileTask
32
+ class RawToDta < Tap::Tasks::FileTask
31
33
  config :extract_msn, 'C:\Xcalibur\System\Programs\extract_msn.exe' # The full path to the extract_msn executable
32
34
  config :first_scan, nil, :short => :F, &c.integer_or_nil
33
35
  config :last_scan, nil, :short => :L, &c.integer_or_nil
34
- config :lower_MW, nil, :short => :B, &c.num_or_nil
35
- config :upper_MW, nil, :short => :T, &c.num_or_nil
36
- config :precursor_mass_tol, 1.4, :short => :M, &c.num
36
+ config :lower_MW, nil, :short => :B, &c.numeric_or_nil
37
+ config :upper_MW, nil, :short => :T, &c.numeric_or_nil
38
+ config :precursor_mass_tol, 1.4, :short => :M, &c.numeric
37
39
  config :num_allowed_intermediate_scans_for_grouping, 1, :short => :S, &c.integer
38
40
  config :charge_state, nil, :short => :C, &c.integer_or_nil
39
41
  config :num_required_group_scans, 1, :short => :G, &c.integer_or_nil
@@ -45,7 +47,7 @@ module Ms
45
47
  config :perform_charge_calculations, nil, :short => :K, &c.flag
46
48
  config :template_file, nil, :short => :O
47
49
  config :options_string, nil, :short => :A
48
- config :minimum_signal_to_noise, 3, :short => :R, &c.num
50
+ config :minimum_signal_to_noise, 3, :short => :R, &c.numeric
49
51
  config :minimum_number_of_peaks, 5, :short => :r, &c.integer
50
52
 
51
53
  config :output_dir, nil, &c.string_or_nil # The output directory
@@ -1,8 +1,9 @@
1
+ require 'tap/tasks/file_task'
1
2
  require 'ms/xcalibur/peak_file'
2
3
 
3
4
  module Ms
4
5
  module Xcalibur
5
- # :startdoc::manifest adds graph data to an exported peak file
6
+ # :startdoc::task adds graph data to an exported peak file
6
7
  #
7
8
  # Peakify adds points to signify the relative intensity (ie the rounded
8
9
  # intensity/max_intensity) of peaks to a peak list extracted from Xcalibur
@@ -24,18 +25,18 @@ module Ms
24
25
  # Options can be specified to filter out points within a range of relative
25
26
  # intensities.
26
27
  #
27
- class Peakify < Tap::FileTask
28
+ class Peakify < Tap::Tasks::FileTask
28
29
 
29
30
  config :point_char, '.' # A character used for each intensity point
30
- config :min, 0, &c.num # Min relative intenisty
31
- config :max, 100, &c.num # Max relative intenisty
31
+ config :min, 0, &c.numeric # Min relative intenisty
32
+ config :max, 100, &c.numeric # Max relative intenisty
32
33
  config :sort, false, &c.flag # Sort by intensity
33
34
  config :output, $stdout, &c.io(:<<, :binmode) # The output file
34
35
 
35
36
  def process(source)
36
37
  prepare(output) if output.kind_of?(String)
37
- open_io(output, 'w') do |target|
38
- target.binmode
38
+ open_io(output, 'w') do |target|
39
+ target.binmode
39
40
 
40
41
  # now perform the task...
41
42
  peak_file = PeakFile.parse File.read(source)
@@ -59,6 +60,7 @@ module Ms
59
60
 
60
61
  target << peak_file.to_s
61
62
  end
63
+ output
62
64
  end
63
65
  end
64
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ms-xcalibur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Chiang
@@ -9,28 +9,28 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-31 00:00:00 -06:00
12
+ date: 2009-05-25 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: configurable
16
+ name: tap
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.4.2
23
+ version: 0.17.0
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: tap
26
+ name: tap-tasks
27
27
  type: :runtime
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.12.4
33
+ version: 0.2.0
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: constants
@@ -42,6 +42,16 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: "0.1"
44
44
  version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: tap-test
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 0.1.0
54
+ version:
45
55
  description:
46
56
  email: simon.a.chiang@gmail.com
47
57
  executables: []