scaffolder 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -18,6 +18,7 @@ Jeweler::Tasks.new do |gem|
18
18
  gem.description = %Q{Organise sequence contigs into genome scaffolds using simple human-readable YAML files.}
19
19
  gem.email = "mail@michaelbarton.me.uk"
20
20
  gem.authors = ["Michael Barton"]
21
+ gem.test_files = Dir['test/**/*.rb']
21
22
  end
22
23
  Jeweler::RubygemsDotOrgTasks.new
23
24
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
data/lib/scaffolder.rb CHANGED
@@ -140,8 +140,8 @@ require 'bio'
140
140
  # that the insert sequence fills. For example if a 5 base pair insert fills
141
141
  # a 4 base region, the host sequence stop position is increased by the
142
142
  # difference: 1.
143
- # * The region is subsequenced if specified.
144
- # * The region is reverse complemented if specified.
143
+ # * The region is subsequenced if specified.
144
+ # * The region is reverse complemented if specified.
145
145
  #
146
146
  # === WARNING
147
147
  #
@@ -42,8 +42,6 @@ class Scaffolder::Region::Sequence < Scaffolder::Region
42
42
  end
43
43
  end
44
44
 
45
- # attribute :inserts, :default => Array.new
46
-
47
45
  # Adds each of the sequence inserts to the raw sequence. Updates the sequence
48
46
  # length each time an insert is added to reflect the change.
49
47
  #
@@ -54,6 +52,12 @@ class Scaffolder::Region::Sequence < Scaffolder::Region
54
52
  # @raise [CoordinateError] if any insert open position is greater than the
55
53
  # close position
56
54
  def sequence_hook
55
+ @updated_sequence ||= update_sequence_with_inserts
56
+ end
57
+
58
+ private
59
+
60
+ def update_sequence_with_inserts
57
61
  # Set the sequence stop positon if not defined as the stop
58
62
  # position is updated as each insert is added
59
63
  @stop ||= raw_sequence.length
data/scaffolder.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{scaffolder}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Barton"]
12
- s.date = %q{2011-01-04}
12
+ s.date = %q{2011-06-03}
13
13
  s.description = %q{Organise sequence contigs into genome scaffolds using simple human-readable YAML files.}
14
14
  s.email = %q{mail@michaelbarton.me.uk}
15
15
  s.extra_rdoc_files = [
@@ -48,14 +48,7 @@ Gem::Specification.new do |s|
48
48
  s.require_paths = ["lib"]
49
49
  s.rubygems_version = %q{1.3.7}
50
50
  s.summary = %q{Genome scaffolding for human beings.}
51
- s.test_files = [
52
- "test/helper.rb",
53
- "test/test_insert.rb",
54
- "test/test_region.rb",
55
- "test/test_scaffolder.rb",
56
- "test/test_sequence.rb",
57
- "test/test_unresolved.rb"
58
- ]
51
+ s.test_files = ["test/helper.rb", "test/test_insert.rb", "test/test_region.rb", "test/test_scaffolder.rb", "test/test_sequence.rb", "test/test_unresolved.rb"]
59
52
 
60
53
  if s.respond_to? :specification_version then
61
54
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -83,6 +83,12 @@ class TestSequence < Test::Unit::TestCase
83
83
  assert_equal(@sequence.sequence,'ATGCGGTAGTAACTGACTAGCATG')
84
84
  end
85
85
 
86
+ should "update the sequence with a simple insert with repeated method calls" do
87
+ @sequence.inserts [@insert]
88
+ assert_equal(@sequence.sequence,'ATGCGGTAGTAACTGACTAGCATG')
89
+ assert_equal(@sequence.sequence,'ATGCGGTAGTAACTGACTAGCATG')
90
+ end
91
+
86
92
  should "update the sequence stop position after adding a simple insert" do
87
93
  @sequence.inserts [@insert]
88
94
  assert_equal(@sequence.stop,24)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaffolder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 1
10
- version: 0.4.1
9
+ - 2
10
+ version: 0.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Barton
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-04 00:00:00 -05:00
18
+ date: 2011-06-03 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency