bio-svgenes 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bio-svgenes"
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan MacLean"]
12
- s.date = "2013-04-10"
12
+ s.date = "2013-06-06"
13
13
  s.description = "This bio-gem facilitates the creation of pretty, publication quality SVG images from feature data."
14
14
  s.email = "maclean.daniel@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -8,7 +8,7 @@
8
8
 
9
9
  ##A very straightforward example that creates all the features and tracks explicitly.
10
10
 
11
-
11
+ require 'rubygems'
12
12
  require 'bio-svgenes'
13
13
 
14
14
  ##create the page
@@ -242,6 +242,13 @@ feature3 = Bio::Graphics::MiniFeature.new(:start => 923,
242
242
  :utrs => [923,1000,2000,2345])
243
243
  transcript_track.add(feature3)
244
244
 
245
+ feature3 = Bio::Graphics::MiniFeature.new(:start => 923,
246
+ :end => 2345,
247
+ :strand => '-',
248
+ :exons => [1000,1200])
249
+ transcript_track.add(feature3)
250
+
251
+
245
252
  feature1 = Bio::Graphics::MiniFeature.new(:start => 467,
246
253
  :end => 15000,
247
254
  :exons => [1500,2500, 3000,7000, 9000,12000],
@@ -431,27 +431,30 @@ attr_reader :glyphs
431
431
  :stroke_width => args[:exon_stroke_width],
432
432
  :style => args[:exon_style]} )
433
433
  end
434
- if args[:gap_marker] == "angled" and not args[:block_gaps].empty?
435
- args[:block_gaps].each do |gap|
436
- points = "#{gap.first},#{args[:y] + (args[:height]/2) } #{gap.first + (gap.last/2)},#{args[:y]} #{gap.first + gap.last},#{args[:y] + (args[:height]/2)}"
437
- composite << Bio::Graphics::Primitive.new(:polyline, {
438
- :points => points,
439
- :stroke => args[:line_color],
440
- :stroke_width => args[:line_width],
441
- :fill => "none",
442
- :line_style => args[:line_style]})
443
- end
444
- else
434
+ if args[:exons].length > 1
435
+ if args[:gap_marker] == "angled" and not args[:block_gaps].empty?
436
+ $stderr.puts args[:exons].length
437
+ args[:block_gaps].each do |gap|
438
+ points = "#{gap.first},#{args[:y] + (args[:height]/2) } #{gap.first + (gap.last/2)},#{args[:y]} #{gap.first + gap.last},#{args[:y] + (args[:height]/2)}"
439
+ composite << Bio::Graphics::Primitive.new(:polyline, {
440
+ :points => points,
441
+ :stroke => args[:line_color],
442
+ :stroke_width => args[:line_width],
443
+ :fill => "none",
444
+ :line_style => args[:line_style]})
445
+ end
446
+ else
445
447
  #add line
446
- composite << Bio::Graphics::Primitive.new(:line, {
447
- :x1 => args[:x],
448
- :x2 => "#{args[:x] + args[:width]}",
449
- :y1 => args[:y] + (args[:height]/2),
450
- :y2 => args[:y] + (args[:height]/2),
451
- :stroke => args[:line_color],
452
- :stroke_width => args[:line_width],
453
- :line_style => args[:line_style]})
448
+ composite << Bio::Graphics::Primitive.new(:line, {
449
+ :x1 => args[:x],
450
+ :x2 => "#{args[:x] + args[:width]}",
451
+ :y1 => args[:y] + (args[:height]/2),
452
+ :y2 => args[:y] + (args[:height]/2),
453
+ :stroke => args[:line_color],
454
+ :stroke_width => args[:line_width],
455
+ :line_style => args[:line_style]})
454
456
 
457
+ end
455
458
  end
456
459
  composite
457
460
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-svgenes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-10 00:00:00.000000000 Z
12
+ date: 2013-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
@@ -333,7 +333,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
333
333
  version: '0'
334
334
  segments:
335
335
  - 0
336
- hash: 2365228172068893639
336
+ hash: -2909691261569895312
337
337
  required_rubygems_version: !ruby/object:Gem::Requirement
338
338
  none: false
339
339
  requirements: