bio-svgenes 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bio-svgenes.gemspec +2 -2
- data/examples/example.rb +8 -1
- data/lib/bio/graphics/glyph.rb +22 -19
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.3
|
data/bio-svgenes.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "bio-svgenes"
|
|
8
|
-
s.version = "0.3.
|
|
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-
|
|
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 = [
|
data/examples/example.rb
CHANGED
|
@@ -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],
|
data/lib/bio/graphics/glyph.rb
CHANGED
|
@@ -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[:
|
|
435
|
-
args[:block_gaps].
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
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
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
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.
|
|
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-
|
|
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:
|
|
336
|
+
hash: -2909691261569895312
|
|
337
337
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
338
|
none: false
|
|
339
339
|
requirements:
|