madeline 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +4 -1
- data/README.md +12 -3
- data/Rakefile +1 -1
- data/ext/{madeline2-linux-x86_64 → madeline/madeline2-linux-x86_64} +0 -0
- data/lib/madeline.rb +4 -3
- data/lib/madeline/interface.rb +25 -9
- data/madeline.gemspec +5 -5
- data/test/fixtures/madeline.yml +5 -0
- data/test/labels.txt +11 -0
- data/test/madeline_test.rb +39 -16
- data/test/pedigree.txt +1 -1
- data/test/test_helper.rb +12 -0
- metadata +8 -4
data/Manifest
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
README.md
|
2
2
|
Rakefile
|
3
|
-
ext/madeline2-linux-x86_64
|
3
|
+
ext/madeline/madeline2-linux-x86_64
|
4
4
|
lib/madeline.rb
|
5
5
|
lib/madeline/interface.rb
|
6
|
+
test/fixtures/madeline.yml
|
7
|
+
test/labels.txt
|
6
8
|
test/madeline_test.rb
|
7
9
|
test/pedigree.txt
|
10
|
+
test/test_helper.rb
|
8
11
|
Manifest
|
data/README.md
CHANGED
@@ -13,19 +13,28 @@ sudo gem install madeline
|
|
13
13
|
Usage
|
14
14
|
-----
|
15
15
|
|
16
|
-
The *Madeline::Interface* has a single method, `draw`, which can be passed a string or an open *IO* object, and returns the Madeline XML. The
|
16
|
+
The *Madeline::Interface* has a single method, `draw`, which can be passed a string or an open *IO* object, and returns the Madeline XML. The draw method returns a filename and warnings, or, if a block is passed, yields the file contents and warnings.
|
17
17
|
|
18
18
|
<pre>
|
19
19
|
require 'rubygems'
|
20
20
|
require 'madeline'
|
21
|
-
Madeline::Interface.new.draw(File.open('pedigree.txt', 'r'))
|
21
|
+
pedigree_filename, warnings = Madeline::Interface.new.draw(File.open('pedigree.txt', 'r'))
|
22
|
+
</pre>
|
23
|
+
|
24
|
+
<pre>
|
25
|
+
require 'rubygems'
|
26
|
+
require 'madeline'
|
27
|
+
pedigree, warnings = Madeline::Interface.new.draw(File.open('pedigree.txt','r')) { |filehandle, warnings|
|
28
|
+
puts "warnings #{warnings}"
|
29
|
+
pedigree = filehandle.read
|
30
|
+
}
|
22
31
|
</pre>
|
23
32
|
|
24
33
|
When creating a *Madeline::Interface*, you can pass [any options that the madeline2 program accepts](http://eyegene.ophthy.med.umich.edu/madeline/documentation.php) to the interface and they'll be forwarded. For example, to create an embedded result:
|
25
34
|
|
26
35
|
<pre>
|
27
36
|
artist = Madeline::Interface.new(:embedded => true)
|
28
|
-
artist.draw(File.open('pedigree.txt', 'r'))
|
37
|
+
pedigree_filename, warnings = artist.draw(File.open('pedigree.txt', 'r'))
|
29
38
|
</pre>
|
30
39
|
|
31
40
|
The default values of all the madeline2 flags are identical to the command-line version.
|
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'echoe'
|
|
4
4
|
require 'rake/testtask'
|
5
5
|
require 'rake/rdoctask'
|
6
6
|
|
7
|
-
Echoe.new('madeline','0.1.
|
7
|
+
Echoe.new('madeline','0.1.2') do |p|
|
8
8
|
p.description = "Interface to Madeline2"
|
9
9
|
p.url = "http://github.com/dmauldin/madeline"
|
10
10
|
p.author = "Denise Mauldin"
|
File without changes
|
data/lib/madeline.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
module Madeline
|
2
2
|
|
3
|
-
VERSION = "0.1.
|
3
|
+
VERSION = "0.1.2"
|
4
4
|
|
5
5
|
MADELINE_VERSION = "2.0"
|
6
6
|
|
7
|
-
MADELINE_COMMAND = "ext/madeline2-linux-x86_64"
|
8
|
-
|
9
7
|
MADELINE_ROOT = File.expand_path(File.dirname(__FILE__))
|
10
8
|
|
9
|
+
MADELINE_COMMAND = "#{MADELINE_ROOT}/../ext/madeline/madeline2-linux-x86_64"
|
10
|
+
|
11
|
+
|
11
12
|
end
|
12
13
|
|
13
14
|
require 'madeline/interface'
|
data/lib/madeline/interface.rb
CHANGED
@@ -26,7 +26,8 @@ module Madeline
|
|
26
26
|
tempfile.flush
|
27
27
|
tempoutfile = Tempfile.new('madeline_output')
|
28
28
|
begin
|
29
|
-
log = `#{command} --outputprefix #{tempoutfile.path} --outputext .xml #{tempfile.path}`
|
29
|
+
log = `#{command} --outputprefix #{tempoutfile.path} --outputext .xml #{tempfile.path} 2>&1`
|
30
|
+
|
30
31
|
unless (log.match(/Pedigree output file is/)) then
|
31
32
|
raise Error, "Madeline failed to run. Check Madeline path."
|
32
33
|
end
|
@@ -34,19 +35,27 @@ module Madeline
|
|
34
35
|
if (!File.exists?(filename)) then
|
35
36
|
raise Error, "Output File doesn't exist."
|
36
37
|
end
|
37
|
-
f = File.new(filename,"r")
|
38
|
-
return f.read
|
39
38
|
rescue Exception
|
40
|
-
|
39
|
+
if log.nil? then
|
40
|
+
raise Error, "Madeline failed to run. Tried #{@madeline}"
|
41
|
+
else
|
42
|
+
raise Error, "Madeline had an error: #{log}"
|
43
|
+
end
|
41
44
|
ensure
|
42
45
|
tempfile.close!
|
43
46
|
end
|
44
47
|
unless $?.exitstatus.zero?
|
45
|
-
raise Error,
|
48
|
+
raise Error, log
|
46
49
|
end
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
+
warnings = Array.new
|
51
|
+
lines = log.split("\n")
|
52
|
+
lines.each do |line|
|
53
|
+
line.gsub!("\e[0m","") # remove the end color code from madeline2
|
54
|
+
warnings.push(line.match(/Warning:.*/)[0]) if line.match(/Warning:/)
|
55
|
+
end
|
56
|
+
warn = warnings.join("; ")
|
57
|
+
yield(File.new(filename), warn) if block_given?
|
58
|
+
return filename, warn
|
50
59
|
end
|
51
60
|
|
52
61
|
private
|
@@ -55,7 +64,14 @@ module Madeline
|
|
55
64
|
options.map do |k, v|
|
56
65
|
next if k == 'outputext'
|
57
66
|
next if k == 'outputprefix'
|
58
|
-
|
67
|
+
if (k.to_s == 'L')
|
68
|
+
if v.is_a?(Array)
|
69
|
+
vals = v.join(" ")
|
70
|
+
["-L \"#{vals}\""]
|
71
|
+
else
|
72
|
+
["-L \"#{v}\""]
|
73
|
+
end
|
74
|
+
elsif (v == true || v == "true")
|
59
75
|
["--#{k}"]
|
60
76
|
elsif (v.is_a?(Array))
|
61
77
|
v.map {|v2| ["--#{k}", v2.to_s]}
|
data/madeline.gemspec
CHANGED
@@ -2,22 +2,22 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "madeline"
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Denise Mauldin"]
|
9
|
-
s.date = "2011-09-
|
9
|
+
s.date = "2011-09-08"
|
10
10
|
s.description = "Interface to Madeline2"
|
11
11
|
s.email = "denise.mauldin@gmail.com"
|
12
|
-
s.extra_rdoc_files = ["README.md", "ext/madeline2-linux-x86_64", "lib/madeline.rb", "lib/madeline/interface.rb"]
|
13
|
-
s.files = ["README.md", "Rakefile", "ext/madeline2-linux-x86_64", "lib/madeline.rb", "lib/madeline/interface.rb", "test/madeline_test.rb", "test/pedigree.txt", "Manifest", "madeline.gemspec"]
|
12
|
+
s.extra_rdoc_files = ["README.md", "ext/madeline/madeline2-linux-x86_64", "lib/madeline.rb", "lib/madeline/interface.rb"]
|
13
|
+
s.files = ["README.md", "Rakefile", "ext/madeline/madeline2-linux-x86_64", "lib/madeline.rb", "lib/madeline/interface.rb", "test/fixtures/madeline.yml", "test/labels.txt", "test/madeline_test.rb", "test/pedigree.txt", "test/test_helper.rb", "Manifest", "madeline.gemspec"]
|
14
14
|
s.homepage = "http://github.com/dmauldin/madeline"
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Madeline", "--main", "README.md"]
|
16
16
|
s.require_paths = ["lib", "ext"]
|
17
17
|
s.rubyforge_project = "madeline"
|
18
18
|
s.rubygems_version = "1.8.10"
|
19
19
|
s.summary = "Interface to Madeline2"
|
20
|
-
s.test_files = ["test/madeline_test.rb"]
|
20
|
+
s.test_files = ["test/test_helper.rb", "test/madeline_test.rb"]
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
23
23
|
s.specification_version = 3
|
@@ -0,0 +1,5 @@
|
|
1
|
+
pedigree: "<?xml version=\"1.0\" standalone=\"no\"?>\n <svg version=\"1.1\" id=\"svgDC\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"370.44\" height=\"380.481\" onload=\"init()\" >\n <defs>\n <style type=\"text/css\"><![CDATA[\n\nline{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nrect{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nellipse{\n\tstroke: #000;\n fill: #fff;\n\tstroke-width:0.25mm;\n}\n\ntext{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:12px;\n}\n\n.smallText{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:9px;\n\tfill:#444;\n}\n\n.layer text{\n\tfill:#930;\n}\n\n.layer line{\n\tstroke:#000;\n}\n\n.birthOrder,.unknownTwins{\n\tfont-size: 8px;\n}\n\n.header{\n\tfont-size:18px;\n\tfont-weight:bold;\n}\n\n.keyBox{\n\tfill:#e5e5e5;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\n.mating:hover{\n\tstroke-width:1mm;\n\tstroke:#d56300;\n}\n\n.selectedIndividual{\n\tstroke-width:1mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#d00;\n fill:none;\n}\n\n.selectedIndividual:hover{\n\tstroke:#d00;\n\tfill:#ffbbbb;\n\tfill-opacity:0.70;\n}\n\n.solid{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:none;\n}\n\n.dashed{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.solid:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.dashed:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.filled{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#000;\n}\n\n.specialIcons{\n\tstroke-width:0.25mm;\n\tstroke-linecap:round;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#fff;\n}\n\n.specialLines{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tfill:none;\n}\n\n.thinLine{\n\tfill:none;\n\tstroke: #000;\n\tstroke-width:0.25mm;\n}\n\n.curvedConnector{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-width:0.5mm;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.curvedConnector:hover{\n\tstroke:#d56300;\n}\n\n.whiteInkLetter_1{\n\tfont-size: 12px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_2{\n\tfont-size: 10px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_3{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.whiteInkLetter{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.blackInkLetter_1{\n\tfont-size: 12px;\n}\n\n.blackInkLetter_2{\n\tfont-size: 10px;\n}\n\n.blackInkLetter_3{\n\tfont-size: 8px;\n}\n\n.blackInkLetter{\n\tfont-size: 8px;\n\tfill: #000;\n}\n\n]]></style>\n <script type=\"text/javascript\" xlink:href=\"javascript/madeline.js\"></script>\n <marker id=\"endArrow\" viewBox=\"0 0 10 10\" refX=\"1\" refY=\"5\" markerUnits=\"strokeWidth\" orient=\"auto\" markerWidth=\"5\" markerHeight=\"4\"> <polyline points=\"0,0 10,5 0,10 1,5\" fill=\"#000\" /> </marker>\n </defs>\n <g class=\"pedigree\" transform=\"translate(-462.86)\">\n\n <g id=\"bottomLayer\" class=\"layer\" >\n\n </g>\n <g id=\"layer0\" class=\"layer\" >\n </g>\n\n <g class=\"drawing\">\n <text x=\"557.36\" y=\"30\" text-anchor=\"middle\" class=\"header\" >madTest</text>\n <rect x=\"500.66\" y=\"38.66\" width=\"22.68\" height=\"22.68\" id=\"g43\" class=\"solid\"/>\n <text x=\"512\" y=\"92.5845\" text-anchor=\"middle\" >g43</text>\n <line x1=\"523.34\" y1=\"50\" x2=\"591.38\" y2=\"50\" />\n<circle cx=\"602.72\" cy=\"50\" r=\"11.34\" id=\"g44\" class=\"solid\"/>\n <text x=\"602.72\" y=\"92.5845\" text-anchor=\"middle\" >g44</text>\n <line class=\"mating\" id=\"g44:g43\" x1=\"557.36\" y1=\"50\" x2=\"557.36\" y2=\"123.907\" />\n <line class=\"solid\" x1=\"512\" y1=\"123.907\" x2=\"512\" y2=\"152.257\" />\n<circle cx=\"512\" cy=\"163.597\" r=\"11.34\" id=\"g47\" class=\"solid\"/>\n <text x=\"512\" y=\"206.181\" text-anchor=\"middle\" >g47</text>\n <line class=\"solid\" x1=\"648.08\" y1=\"123.907\" x2=\"648.08\" y2=\"152.257\" />\n<circle cx=\"648.08\" cy=\"163.597\" r=\"11.34\" id=\"g49\" class=\"solid\"/>\n <text x=\"648.08\" y=\"206.181\" text-anchor=\"middle\" >g49</text>\n <line x1=\"659.42\" y1=\"163.597\" x2=\"727.46\" y2=\"163.597\" />\n <rect x=\"727.46\" y=\"152.257\" width=\"22.68\" height=\"22.68\" id=\"g48\" class=\"solid\"/>\n <text x=\"738.8\" y=\"206.181\" text-anchor=\"middle\" >g48</text>\n <line class=\"mating\" id=\"g49:g48\" x1=\"693.44\" y1=\"163.597\" x2=\"693.44\" y2=\"237.504\" />\n <line class=\"solid\" x1=\"602.72\" y1=\"237.504\" x2=\"602.72\" y2=\"265.854\" />\n<circle cx=\"602.72\" cy=\"277.194\" r=\"11.34\" id=\"g50\" class=\"solid\"/>\n <text x=\"602.72\" y=\"319.778\" text-anchor=\"middle\" >g50</text>\n <line class=\"solid\" x1=\"693.44\" y1=\"237.504\" x2=\"693.44\" y2=\"265.854\" />\n<circle cx=\"693.44\" cy=\"277.194\" r=\"11.34\" id=\"g51\" class=\"solid\"/>\n <text x=\"693.44\" y=\"319.778\" text-anchor=\"middle\" >g51</text>\n <line class=\"solid\" x1=\"784.16\" y1=\"237.504\" x2=\"784.16\" y2=\"265.854\" />\n <rect x=\"772.82\" y=\"265.854\" width=\"22.68\" height=\"22.68\" id=\"g52\" class=\"solid\"/>\n <text x=\"784.16\" y=\"319.778\" text-anchor=\"middle\" >g52</text>\n <line x1=\"602.72\" y1=\"237.504\" x2=\"784.16\" y2=\"237.504\" />\n <line x1=\"512\" y1=\"123.907\" x2=\"648.08\" y2=\"123.907\" />\n </g>\n\n </g>\n </svg>\n\n"
|
2
|
+
arial_out: "<?xml version=\"1.0\" standalone=\"no\"?>\n <svg version=\"1.1\" id=\"svgDC\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"370.44\" height=\"380.481\" onload=\"init()\" >\n <defs>\n <style type=\"text/css\"><![CDATA[\n\nline{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nrect{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nellipse{\n\tstroke: #000;\n fill: #fff;\n\tstroke-width:0.25mm;\n}\n\ntext{\n\tfont-family:\"Arial\",sans-serif;\n\tfont-size:12px;\n}\n\n.smallText{\n\tfont-family:\"Arial\",sans-serif;\n\tfont-size:9px;\n\tfill:#444;\n}\n\n.layer text{\n\tfill:#930;\n}\n\n.layer line{\n\tstroke:#000;\n}\n\n.birthOrder,.unknownTwins{\n\tfont-size: 8px;\n}\n\n.header{\n\tfont-size:18px;\n\tfont-weight:bold;\n}\n\n.keyBox{\n\tfill:#e5e5e5;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\n.mating:hover{\n\tstroke-width:1mm;\n\tstroke:#d56300;\n}\n\n.selectedIndividual{\n\tstroke-width:1mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#d00;\n fill:none;\n}\n\n.selectedIndividual:hover{\n\tstroke:#d00;\n\tfill:#ffbbbb;\n\tfill-opacity:0.70;\n}\n\n.solid{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:none;\n}\n\n.dashed{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.solid:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.dashed:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.filled{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#000;\n}\n\n.specialIcons{\n\tstroke-width:0.25mm;\n\tstroke-linecap:round;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#fff;\n}\n\n.specialLines{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tfill:none;\n}\n\n.thinLine{\n\tfill:none;\n\tstroke: #000;\n\tstroke-width:0.25mm;\n}\n\n.curvedConnector{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-width:0.5mm;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.curvedConnector:hover{\n\tstroke:#d56300;\n}\n\n.whiteInkLetter_1{\n\tfont-size: 12px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_2{\n\tfont-size: 10px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_3{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.whiteInkLetter{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.blackInkLetter_1{\n\tfont-size: 12px;\n}\n\n.blackInkLetter_2{\n\tfont-size: 10px;\n}\n\n.blackInkLetter_3{\n\tfont-size: 8px;\n}\n\n.blackInkLetter{\n\tfont-size: 8px;\n\tfill: #000;\n}\n\n]]></style>\n <script type=\"text/javascript\" xlink:href=\"javascript/madeline.js\"></script>\n <marker id=\"endArrow\" viewBox=\"0 0 10 10\" refX=\"1\" refY=\"5\" markerUnits=\"strokeWidth\" orient=\"auto\" markerWidth=\"5\" markerHeight=\"4\"> <polyline points=\"0,0 10,5 0,10 1,5\" fill=\"#000\" /> </marker>\n </defs>\n <g class=\"pedigree\" transform=\"translate(-462.86)\">\n\n <g id=\"bottomLayer\" class=\"layer\" >\n\n </g>\n <g id=\"layer0\" class=\"layer\" >\n </g>\n\n <g class=\"drawing\">\n <text x=\"557.36\" y=\"30\" text-anchor=\"middle\" class=\"header\" >madTest</text>\n <rect x=\"500.66\" y=\"38.66\" width=\"22.68\" height=\"22.68\" id=\"g43\" class=\"solid\"/>\n <text x=\"512\" y=\"92.5845\" text-anchor=\"middle\" >g43</text>\n <line x1=\"523.34\" y1=\"50\" x2=\"591.38\" y2=\"50\" />\n<circle cx=\"602.72\" cy=\"50\" r=\"11.34\" id=\"g44\" class=\"solid\"/>\n <text x=\"602.72\" y=\"92.5845\" text-anchor=\"middle\" >g44</text>\n <line class=\"mating\" id=\"g44:g43\" x1=\"557.36\" y1=\"50\" x2=\"557.36\" y2=\"123.907\" />\n <line class=\"solid\" x1=\"512\" y1=\"123.907\" x2=\"512\" y2=\"152.257\" />\n<circle cx=\"512\" cy=\"163.597\" r=\"11.34\" id=\"g47\" class=\"solid\"/>\n <text x=\"512\" y=\"206.181\" text-anchor=\"middle\" >g47</text>\n <line class=\"solid\" x1=\"648.08\" y1=\"123.907\" x2=\"648.08\" y2=\"152.257\" />\n<circle cx=\"648.08\" cy=\"163.597\" r=\"11.34\" id=\"g49\" class=\"solid\"/>\n <text x=\"648.08\" y=\"206.181\" text-anchor=\"middle\" >g49</text>\n <line x1=\"659.42\" y1=\"163.597\" x2=\"727.46\" y2=\"163.597\" />\n <rect x=\"727.46\" y=\"152.257\" width=\"22.68\" height=\"22.68\" id=\"g48\" class=\"solid\"/>\n <text x=\"738.8\" y=\"206.181\" text-anchor=\"middle\" >g48</text>\n <line class=\"mating\" id=\"g49:g48\" x1=\"693.44\" y1=\"163.597\" x2=\"693.44\" y2=\"237.504\" />\n <line class=\"solid\" x1=\"602.72\" y1=\"237.504\" x2=\"602.72\" y2=\"265.854\" />\n<circle cx=\"602.72\" cy=\"277.194\" r=\"11.34\" id=\"g50\" class=\"solid\"/>\n <text x=\"602.72\" y=\"319.778\" text-anchor=\"middle\" >g50</text>\n <line class=\"solid\" x1=\"693.44\" y1=\"237.504\" x2=\"693.44\" y2=\"265.854\" />\n<circle cx=\"693.44\" cy=\"277.194\" r=\"11.34\" id=\"g51\" class=\"solid\"/>\n <text x=\"693.44\" y=\"319.778\" text-anchor=\"middle\" >g51</text>\n <line class=\"solid\" x1=\"784.16\" y1=\"237.504\" x2=\"784.16\" y2=\"265.854\" />\n <rect x=\"772.82\" y=\"265.854\" width=\"22.68\" height=\"22.68\" id=\"g52\" class=\"solid\"/>\n <text x=\"784.16\" y=\"319.778\" text-anchor=\"middle\" >g52</text>\n <line x1=\"602.72\" y1=\"237.504\" x2=\"784.16\" y2=\"237.504\" />\n <line x1=\"512\" y1=\"123.907\" x2=\"648.08\" y2=\"123.907\" />\n </g>\n\n </g>\n </svg>\n\n"
|
3
|
+
embedded_out: " <svg version=\"1.1\" id=\"svgDC\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"370.44\" height=\"380.481\" onload=\"init()\" >\n <defs>\n <style type=\"text/css\"><![CDATA[\n\nline{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nrect{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nellipse{\n\tstroke: #000;\n fill: #fff;\n\tstroke-width:0.25mm;\n}\n\ntext{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:12px;\n}\n\n.smallText{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:9px;\n\tfill:#444;\n}\n\n.layer text{\n\tfill:#930;\n}\n\n.layer line{\n\tstroke:#000;\n}\n\n.birthOrder,.unknownTwins{\n\tfont-size: 8px;\n}\n\n.header{\n\tfont-size:18px;\n\tfont-weight:bold;\n}\n\n.keyBox{\n\tfill:#e5e5e5;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\n.mating:hover{\n\tstroke-width:1mm;\n\tstroke:#d56300;\n}\n\n.selectedIndividual{\n\tstroke-width:1mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#d00;\n fill:none;\n}\n\n.selectedIndividual:hover{\n\tstroke:#d00;\n\tfill:#ffbbbb;\n\tfill-opacity:0.70;\n}\n\n.solid{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:none;\n}\n\n.dashed{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.solid:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.dashed:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.filled{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#000;\n}\n\n.specialIcons{\n\tstroke-width:0.25mm;\n\tstroke-linecap:round;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#fff;\n}\n\n.specialLines{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tfill:none;\n}\n\n.thinLine{\n\tfill:none;\n\tstroke: #000;\n\tstroke-width:0.25mm;\n}\n\n.curvedConnector{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-width:0.5mm;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.curvedConnector:hover{\n\tstroke:#d56300;\n}\n\n.whiteInkLetter_1{\n\tfont-size: 12px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_2{\n\tfont-size: 10px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_3{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.whiteInkLetter{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.blackInkLetter_1{\n\tfont-size: 12px;\n}\n\n.blackInkLetter_2{\n\tfont-size: 10px;\n}\n\n.blackInkLetter_3{\n\tfont-size: 8px;\n}\n\n.blackInkLetter{\n\tfont-size: 8px;\n\tfill: #000;\n}\n\n]]></style>\n <script type=\"text/javascript\" xlink:href=\"javascript/madeline.js\"></script>\n <marker id=\"endArrow\" viewBox=\"0 0 10 10\" refX=\"1\" refY=\"5\" markerUnits=\"strokeWidth\" orient=\"auto\" markerWidth=\"5\" markerHeight=\"4\"> <polyline points=\"0,0 10,5 0,10 1,5\" fill=\"#000\" /> </marker>\n </defs>\n <g class=\"pedigree\" transform=\"translate(-462.86)\">\n\n <g id=\"bottomLayer\" class=\"layer\" >\n\n </g>\n <g id=\"layer0\" class=\"layer\" >\n </g>\n\n <g class=\"drawing\">\n <text x=\"557.36\" y=\"30\" text-anchor=\"middle\" class=\"header\" >madTest</text>\n <rect x=\"500.66\" y=\"38.66\" width=\"22.68\" height=\"22.68\" id=\"g43\" class=\"solid\"/>\n <text x=\"512\" y=\"92.5845\" text-anchor=\"middle\" >g43</text>\n <line x1=\"523.34\" y1=\"50\" x2=\"591.38\" y2=\"50\" />\n<circle cx=\"602.72\" cy=\"50\" r=\"11.34\" id=\"g44\" class=\"solid\"/>\n <text x=\"602.72\" y=\"92.5845\" text-anchor=\"middle\" >g44</text>\n <line class=\"mating\" id=\"g44:g43\" x1=\"557.36\" y1=\"50\" x2=\"557.36\" y2=\"123.907\" />\n <line class=\"solid\" x1=\"512\" y1=\"123.907\" x2=\"512\" y2=\"152.257\" />\n<circle cx=\"512\" cy=\"163.597\" r=\"11.34\" id=\"g47\" class=\"solid\"/>\n <text x=\"512\" y=\"206.181\" text-anchor=\"middle\" >g47</text>\n <line class=\"solid\" x1=\"648.08\" y1=\"123.907\" x2=\"648.08\" y2=\"152.257\" />\n<circle cx=\"648.08\" cy=\"163.597\" r=\"11.34\" id=\"g49\" class=\"solid\"/>\n <text x=\"648.08\" y=\"206.181\" text-anchor=\"middle\" >g49</text>\n <line x1=\"659.42\" y1=\"163.597\" x2=\"727.46\" y2=\"163.597\" />\n <rect x=\"727.46\" y=\"152.257\" width=\"22.68\" height=\"22.68\" id=\"g48\" class=\"solid\"/>\n <text x=\"738.8\" y=\"206.181\" text-anchor=\"middle\" >g48</text>\n <line class=\"mating\" id=\"g49:g48\" x1=\"693.44\" y1=\"163.597\" x2=\"693.44\" y2=\"237.504\" />\n <line class=\"solid\" x1=\"602.72\" y1=\"237.504\" x2=\"602.72\" y2=\"265.854\" />\n<circle cx=\"602.72\" cy=\"277.194\" r=\"11.34\" id=\"g50\" class=\"solid\"/>\n <text x=\"602.72\" y=\"319.778\" text-anchor=\"middle\" >g50</text>\n <line class=\"solid\" x1=\"693.44\" y1=\"237.504\" x2=\"693.44\" y2=\"265.854\" />\n<circle cx=\"693.44\" cy=\"277.194\" r=\"11.34\" id=\"g51\" class=\"solid\"/>\n <text x=\"693.44\" y=\"319.778\" text-anchor=\"middle\" >g51</text>\n <line class=\"solid\" x1=\"784.16\" y1=\"237.504\" x2=\"784.16\" y2=\"265.854\" />\n <rect x=\"772.82\" y=\"265.854\" width=\"22.68\" height=\"22.68\" id=\"g52\" class=\"solid\"/>\n <text x=\"784.16\" y=\"319.778\" text-anchor=\"middle\" >g52</text>\n <line x1=\"602.72\" y1=\"237.504\" x2=\"784.16\" y2=\"237.504\" />\n <line x1=\"512\" y1=\"123.907\" x2=\"648.08\" y2=\"123.907\" />\n </g>\n\n </g>\n </svg>\n\n"
|
4
|
+
single_label_out: "<?xml version=\"1.0\" standalone=\"no\"?>\n <svg version=\"1.1\" id=\"svgDC\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"370.44\" height=\"380.481\" onload=\"init()\" >\n <defs>\n <style type=\"text/css\"><![CDATA[\n\nline{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nrect{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nellipse{\n\tstroke: #000;\n fill: #fff;\n\tstroke-width:0.25mm;\n}\n\ntext{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:12px;\n}\n\n.smallText{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:9px;\n\tfill:#444;\n}\n\n.layer text{\n\tfill:#930;\n}\n\n.layer line{\n\tstroke:#000;\n}\n\n.birthOrder,.unknownTwins{\n\tfont-size: 8px;\n}\n\n.header{\n\tfont-size:18px;\n\tfont-weight:bold;\n}\n\n.keyBox{\n\tfill:#e5e5e5;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\n.mating:hover{\n\tstroke-width:1mm;\n\tstroke:#d56300;\n}\n\n.selectedIndividual{\n\tstroke-width:1mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#d00;\n fill:none;\n}\n\n.selectedIndividual:hover{\n\tstroke:#d00;\n\tfill:#ffbbbb;\n\tfill-opacity:0.70;\n}\n\n.solid{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:none;\n}\n\n.dashed{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.solid:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.dashed:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.filled{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#000;\n}\n\n.specialIcons{\n\tstroke-width:0.25mm;\n\tstroke-linecap:round;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#fff;\n}\n\n.specialLines{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tfill:none;\n}\n\n.thinLine{\n\tfill:none;\n\tstroke: #000;\n\tstroke-width:0.25mm;\n}\n\n.curvedConnector{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-width:0.5mm;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.curvedConnector:hover{\n\tstroke:#d56300;\n}\n\n.whiteInkLetter_1{\n\tfont-size: 12px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_2{\n\tfont-size: 10px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_3{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.whiteInkLetter{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.blackInkLetter_1{\n\tfont-size: 12px;\n}\n\n.blackInkLetter_2{\n\tfont-size: 10px;\n}\n\n.blackInkLetter_3{\n\tfont-size: 8px;\n}\n\n.blackInkLetter{\n\tfont-size: 8px;\n\tfill: #000;\n}\n\n]]></style>\n <script type=\"text/javascript\" xlink:href=\"javascript/madeline.js\"></script>\n <marker id=\"endArrow\" viewBox=\"0 0 10 10\" refX=\"1\" refY=\"5\" markerUnits=\"strokeWidth\" orient=\"auto\" markerWidth=\"5\" markerHeight=\"4\"> <polyline points=\"0,0 10,5 0,10 1,5\" fill=\"#000\" /> </marker>\n </defs>\n <g class=\"pedigree\" transform=\"translate(-462.86)\">\n\n <g id=\"bottomLayer\" class=\"layer\" >\n\n </g>\n <g id=\"layer0\" class=\"layer\" >\n </g>\n\n <g class=\"drawing\">\n <text x=\"557.36\" y=\"30\" text-anchor=\"middle\" class=\"header\" >family1</text>\n <rect x=\"500.66\" y=\"38.66\" width=\"22.68\" height=\"22.68\" id=\"g43\" class=\"solid\"/>\n <text x=\"512\" y=\"92.5845\" text-anchor=\"middle\" >g43</text>\n <line x1=\"523.34\" y1=\"50\" x2=\"591.38\" y2=\"50\" />\n<circle cx=\"602.72\" cy=\"50\" r=\"11.34\" id=\"g44\" class=\"solid\"/>\n <text x=\"602.72\" y=\"92.5845\" text-anchor=\"middle\" >g44</text>\n <line class=\"mating\" id=\"g44:g43\" x1=\"557.36\" y1=\"50\" x2=\"557.36\" y2=\"123.907\" />\n <line class=\"solid\" x1=\"512\" y1=\"123.907\" x2=\"512\" y2=\"152.257\" />\n<circle cx=\"512\" cy=\"163.597\" r=\"11.34\" id=\"g47\" class=\"solid\"/>\n <text x=\"512\" y=\"206.181\" text-anchor=\"middle\" >g47</text>\n <line class=\"solid\" x1=\"648.08\" y1=\"123.907\" x2=\"648.08\" y2=\"152.257\" />\n<circle cx=\"648.08\" cy=\"163.597\" r=\"11.34\" id=\"g49\" class=\"solid\"/>\n <text x=\"648.08\" y=\"206.181\" text-anchor=\"middle\" >g49</text>\n <line x1=\"659.42\" y1=\"163.597\" x2=\"727.46\" y2=\"163.597\" />\n <rect x=\"727.46\" y=\"152.257\" width=\"22.68\" height=\"22.68\" id=\"g48\" class=\"solid\"/>\n <text x=\"738.8\" y=\"206.181\" text-anchor=\"middle\" >g48</text>\n <line class=\"mating\" id=\"g49:g48\" x1=\"693.44\" y1=\"163.597\" x2=\"693.44\" y2=\"237.504\" />\n <line class=\"solid\" x1=\"602.72\" y1=\"237.504\" x2=\"602.72\" y2=\"265.854\" />\n<circle cx=\"602.72\" cy=\"277.194\" r=\"11.34\" id=\"g50\" class=\"solid\"/>\n <text x=\"602.72\" y=\"319.778\" text-anchor=\"middle\" >g50</text>\n <line class=\"solid\" x1=\"693.44\" y1=\"237.504\" x2=\"693.44\" y2=\"265.854\" />\n<circle cx=\"693.44\" cy=\"277.194\" r=\"11.34\" id=\"g51\" class=\"solid\"/>\n <text x=\"693.44\" y=\"319.778\" text-anchor=\"middle\" >g51</text>\n <line class=\"solid\" x1=\"784.16\" y1=\"237.504\" x2=\"784.16\" y2=\"265.854\" />\n <rect x=\"772.82\" y=\"265.854\" width=\"22.68\" height=\"22.68\" id=\"g52\" class=\"solid\"/>\n <text x=\"784.16\" y=\"319.778\" text-anchor=\"middle\" >g52</text>\n <line x1=\"602.72\" y1=\"237.504\" x2=\"784.16\" y2=\"237.504\" />\n <line x1=\"512\" y1=\"123.907\" x2=\"648.08\" y2=\"123.907\" />\n </g>\n\n </g>\n </svg>\n\n"
|
5
|
+
label_out: "<?xml version=\"1.0\" standalone=\"no\"?>\n <svg version=\"1.1\" id=\"svgDC\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"370.44\" height=\"380.481\" onload=\"init()\" >\n <defs>\n <style type=\"text/css\"><![CDATA[\n\nline{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nrect{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nellipse{\n\tstroke: #000;\n fill: #fff;\n\tstroke-width:0.25mm;\n}\n\ntext{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:12px;\n}\n\n.smallText{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:9px;\n\tfill:#444;\n}\n\n.layer text{\n\tfill:#930;\n}\n\n.layer line{\n\tstroke:#000;\n}\n\n.birthOrder,.unknownTwins{\n\tfont-size: 8px;\n}\n\n.header{\n\tfont-size:18px;\n\tfont-weight:bold;\n}\n\n.keyBox{\n\tfill:#e5e5e5;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\n.mating:hover{\n\tstroke-width:1mm;\n\tstroke:#d56300;\n}\n\n.selectedIndividual{\n\tstroke-width:1mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#d00;\n fill:none;\n}\n\n.selectedIndividual:hover{\n\tstroke:#d00;\n\tfill:#ffbbbb;\n\tfill-opacity:0.70;\n}\n\n.solid{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:none;\n}\n\n.dashed{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.solid:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.dashed:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.filled{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#000;\n}\n\n.specialIcons{\n\tstroke-width:0.25mm;\n\tstroke-linecap:round;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#fff;\n}\n\n.specialLines{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tfill:none;\n}\n\n.thinLine{\n\tfill:none;\n\tstroke: #000;\n\tstroke-width:0.25mm;\n}\n\n.curvedConnector{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-width:0.5mm;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.curvedConnector:hover{\n\tstroke:#d56300;\n}\n\n.whiteInkLetter_1{\n\tfont-size: 12px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_2{\n\tfont-size: 10px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_3{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.whiteInkLetter{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.blackInkLetter_1{\n\tfont-size: 12px;\n}\n\n.blackInkLetter_2{\n\tfont-size: 10px;\n}\n\n.blackInkLetter_3{\n\tfont-size: 8px;\n}\n\n.blackInkLetter{\n\tfont-size: 8px;\n\tfill: #000;\n}\n\n]]></style>\n <script type=\"text/javascript\" xlink:href=\"javascript/madeline.js\"></script>\n <marker id=\"endArrow\" viewBox=\"0 0 10 10\" refX=\"1\" refY=\"5\" markerUnits=\"strokeWidth\" orient=\"auto\" markerWidth=\"5\" markerHeight=\"4\"> <polyline points=\"0,0 10,5 0,10 1,5\" fill=\"#000\" /> </marker>\n </defs>\n <g class=\"pedigree\" transform=\"translate(-462.86)\">\n\n <g id=\"bottomLayer\" class=\"layer\" >\n\n </g>\n <g id=\"layer0\" class=\"layer\" >\n </g>\n\n <g class=\"drawing\">\n <text x=\"557.36\" y=\"30\" text-anchor=\"middle\" class=\"header\" >family1</text>\n <rect x=\"500.66\" y=\"38.66\" width=\"22.68\" height=\"22.68\" id=\"g43\" class=\"solid\"/>\n <text x=\"512\" y=\"92.5845\" text-anchor=\"middle\" >g43</text>\n <line x1=\"523.34\" y1=\"50\" x2=\"591.38\" y2=\"50\" />\n<circle cx=\"602.72\" cy=\"50\" r=\"11.34\" id=\"g44\" class=\"solid\"/>\n <text x=\"602.72\" y=\"92.5845\" text-anchor=\"middle\" >g44</text>\n <line class=\"mating\" id=\"g44:g43\" x1=\"557.36\" y1=\"50\" x2=\"557.36\" y2=\"123.907\" />\n <line class=\"solid\" x1=\"512\" y1=\"123.907\" x2=\"512\" y2=\"152.257\" />\n<circle cx=\"512\" cy=\"163.597\" r=\"11.34\" id=\"g47\" class=\"solid\"/>\n <text x=\"512\" y=\"206.181\" text-anchor=\"middle\" >g47</text>\n <line class=\"solid\" x1=\"648.08\" y1=\"123.907\" x2=\"648.08\" y2=\"152.257\" />\n<circle cx=\"648.08\" cy=\"163.597\" r=\"11.34\" id=\"g49\" class=\"solid\"/>\n <text x=\"648.08\" y=\"206.181\" text-anchor=\"middle\" >g49</text>\n <line x1=\"659.42\" y1=\"163.597\" x2=\"727.46\" y2=\"163.597\" />\n <rect x=\"727.46\" y=\"152.257\" width=\"22.68\" height=\"22.68\" id=\"g48\" class=\"solid\"/>\n <text x=\"738.8\" y=\"206.181\" text-anchor=\"middle\" >g48</text>\n <line class=\"mating\" id=\"g49:g48\" x1=\"693.44\" y1=\"163.597\" x2=\"693.44\" y2=\"237.504\" />\n <line class=\"solid\" x1=\"602.72\" y1=\"237.504\" x2=\"602.72\" y2=\"265.854\" />\n<circle cx=\"602.72\" cy=\"277.194\" r=\"11.34\" id=\"g50\" class=\"solid\"/>\n <text x=\"602.72\" y=\"319.778\" text-anchor=\"middle\" >g50</text>\n <line class=\"solid\" x1=\"693.44\" y1=\"237.504\" x2=\"693.44\" y2=\"265.854\" />\n<circle cx=\"693.44\" cy=\"277.194\" r=\"11.34\" id=\"g51\" class=\"solid\"/>\n <text x=\"693.44\" y=\"319.778\" text-anchor=\"middle\" >g51</text>\n <line class=\"solid\" x1=\"784.16\" y1=\"237.504\" x2=\"784.16\" y2=\"265.854\" />\n <rect x=\"772.82\" y=\"265.854\" width=\"22.68\" height=\"22.68\" id=\"g52\" class=\"solid\"/>\n <text x=\"784.16\" y=\"319.778\" text-anchor=\"middle\" >g52</text>\n <line x1=\"602.72\" y1=\"237.504\" x2=\"784.16\" y2=\"237.504\" />\n <line x1=\"512\" y1=\"123.907\" x2=\"648.08\" y2=\"123.907\" />\n </g>\n\n </g>\n </svg>\n\n"
|
data/test/labels.txt
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
FamilyID IndividualID Gender Father Mother cond1 cond2 cond3 geneID:79083
|
2
|
+
family1 g44 F . . Y . . non,nfs
|
3
|
+
family1 g43 M . . . . . .
|
4
|
+
family1 g21 M . . Y Y Y non
|
5
|
+
family1 g50 F g48 g49 . . . .
|
6
|
+
family1 g47 F g43 g44 Y . . nfs,non
|
7
|
+
family1 g51 F g48 g49 Y . . non,nfs
|
8
|
+
family1 g48 M . . . . . .
|
9
|
+
family1 g56 M . . Y Y Y non,nfs
|
10
|
+
family1 g52 M g48 g49 Y Y Y non,nfs
|
11
|
+
family1 g49 F g43 g44 Y . . non,nfs
|
data/test/madeline_test.rb
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
require 'test/unit'
|
2
2
|
require 'stringio'
|
3
|
+
require File.dirname(__FILE__) + '/test_helper'
|
4
|
+
require 'madeline'
|
3
5
|
|
4
6
|
class MadelineTest < Test::Unit::TestCase
|
5
|
-
|
6
|
-
|
7
|
-
def setup
|
8
|
-
@pedigree_out = "<?xml version=\"1.0\" standalone=\"no\"?>\n <svg version=\"1.1\" id=\"svgDC\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"370.44\" height=\"380.481\" onload=\"init()\" >\n <defs>\n <style type=\"text/css\"><![CDATA[\n\nline{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nrect{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nellipse{\n\tstroke: #000;\n fill: #fff;\n\tstroke-width:0.25mm;\n}\n\ntext{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:12px;\n}\n\n.smallText{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:9px;\n\tfill:#444;\n}\n\n.layer text{\n\tfill:#930;\n}\n\n.layer line{\n\tstroke:#000;\n}\n\n.birthOrder,.unknownTwins{\n\tfont-size: 8px;\n}\n\n.header{\n\tfont-size:18px;\n\tfont-weight:bold;\n}\n\n.keyBox{\n\tfill:#e5e5e5;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\n.mating:hover{\n\tstroke-width:1mm;\n\tstroke:#d56300;\n}\n\n.selectedIndividual{\n\tstroke-width:1mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#d00;\n fill:none;\n}\n\n.selectedIndividual:hover{\n\tstroke:#d00;\n\tfill:#ffbbbb;\n\tfill-opacity:0.70;\n}\n\n.solid{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:none;\n}\n\n.dashed{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.solid:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.dashed:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.filled{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#000;\n}\n\n.specialIcons{\n\tstroke-width:0.25mm;\n\tstroke-linecap:round;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#fff;\n}\n\n.specialLines{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tfill:none;\n}\n\n.thinLine{\n\tfill:none;\n\tstroke: #000;\n\tstroke-width:0.25mm;\n}\n\n.curvedConnector{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-width:0.5mm;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.curvedConnector:hover{\n\tstroke:#d56300;\n}\n\n.whiteInkLetter_1{\n\tfont-size: 12px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_2{\n\tfont-size: 10px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_3{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.whiteInkLetter{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.blackInkLetter_1{\n\tfont-size: 12px;\n}\n\n.blackInkLetter_2{\n\tfont-size: 10px;\n}\n\n.blackInkLetter_3{\n\tfont-size: 8px;\n}\n\n.blackInkLetter{\n\tfont-size: 8px;\n\tfill: #000;\n}\n\n]]></style>\n <script type=\"text/javascript\" xlink:href=\"javascript/madeline.js\"></script>\n <marker id=\"endArrow\" viewBox=\"0 0 10 10\" refX=\"1\" refY=\"5\" markerUnits=\"strokeWidth\" orient=\"auto\" markerWidth=\"5\" markerHeight=\"4\"> <polyline points=\"0,0 10,5 0,10 1,5\" fill=\"#000\" /> </marker>\n </defs>\n <g class=\"pedigree\" transform=\"translate(-462.86)\">\n\n <g id=\"bottomLayer\" class=\"layer\" >\n\n </g>\n <g id=\"layer0\" class=\"layer\" >\n </g>\n\n <g class=\"drawing\">\n <text x=\"557.36\" y=\"30\" text-anchor=\"middle\" class=\"header\" >madTest</text>\n <rect x=\"500.66\" y=\"38.66\" width=\"22.68\" height=\"22.68\" id=\"g43\" class=\"solid\"/>\n <text x=\"512\" y=\"92.5845\" text-anchor=\"middle\" >g43</text>\n <line x1=\"523.34\" y1=\"50\" x2=\"591.38\" y2=\"50\" />\n<circle cx=\"602.72\" cy=\"50\" r=\"11.34\" id=\"g44\" class=\"solid\"/>\n <text x=\"602.72\" y=\"92.5845\" text-anchor=\"middle\" >g44</text>\n <line class=\"mating\" id=\"g44:g43\" x1=\"557.36\" y1=\"50\" x2=\"557.36\" y2=\"123.907\" />\n <line class=\"solid\" x1=\"512\" y1=\"123.907\" x2=\"512\" y2=\"152.257\" />\n<circle cx=\"512\" cy=\"163.597\" r=\"11.34\" id=\"g47\" class=\"solid\"/>\n <text x=\"512\" y=\"206.181\" text-anchor=\"middle\" >g47</text>\n <line class=\"solid\" x1=\"648.08\" y1=\"123.907\" x2=\"648.08\" y2=\"152.257\" />\n<circle cx=\"648.08\" cy=\"163.597\" r=\"11.34\" id=\"g49\" class=\"solid\"/>\n <text x=\"648.08\" y=\"206.181\" text-anchor=\"middle\" >g49</text>\n <line x1=\"659.42\" y1=\"163.597\" x2=\"727.46\" y2=\"163.597\" />\n <rect x=\"727.46\" y=\"152.257\" width=\"22.68\" height=\"22.68\" id=\"g48\" class=\"solid\"/>\n <text x=\"738.8\" y=\"206.181\" text-anchor=\"middle\" >g48</text>\n <line class=\"mating\" id=\"g49:g48\" x1=\"693.44\" y1=\"163.597\" x2=\"693.44\" y2=\"237.504\" />\n <line class=\"solid\" x1=\"602.72\" y1=\"237.504\" x2=\"602.72\" y2=\"265.854\" />\n<circle cx=\"602.72\" cy=\"277.194\" r=\"11.34\" id=\"g50\" class=\"solid\"/>\n <text x=\"602.72\" y=\"319.778\" text-anchor=\"middle\" >g50</text>\n <line class=\"solid\" x1=\"693.44\" y1=\"237.504\" x2=\"693.44\" y2=\"265.854\" />\n<circle cx=\"693.44\" cy=\"277.194\" r=\"11.34\" id=\"g51\" class=\"solid\"/>\n <text x=\"693.44\" y=\"319.778\" text-anchor=\"middle\" >g51</text>\n <line class=\"solid\" x1=\"784.16\" y1=\"237.504\" x2=\"784.16\" y2=\"265.854\" />\n <rect x=\"772.82\" y=\"265.854\" width=\"22.68\" height=\"22.68\" id=\"g52\" class=\"solid\"/>\n <text x=\"784.16\" y=\"319.778\" text-anchor=\"middle\" >g52</text>\n <line x1=\"602.72\" y1=\"237.504\" x2=\"784.16\" y2=\"237.504\" />\n <line x1=\"512\" y1=\"123.907\" x2=\"648.08\" y2=\"123.907\" />\n </g>\n\n </g>\n </svg>\n\n"
|
9
|
-
@arial_out = "<?xml version=\"1.0\" standalone=\"no\"?>\n <svg version=\"1.1\" id=\"svgDC\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"370.44\" height=\"380.481\" onload=\"init()\" >\n <defs>\n <style type=\"text/css\"><![CDATA[\n\nline{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nrect{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nellipse{\n\tstroke: #000;\n fill: #fff;\n\tstroke-width:0.25mm;\n}\n\ntext{\n\tfont-family:\"Arial\",sans-serif;\n\tfont-size:12px;\n}\n\n.smallText{\n\tfont-family:\"Arial\",sans-serif;\n\tfont-size:9px;\n\tfill:#444;\n}\n\n.layer text{\n\tfill:#930;\n}\n\n.layer line{\n\tstroke:#000;\n}\n\n.birthOrder,.unknownTwins{\n\tfont-size: 8px;\n}\n\n.header{\n\tfont-size:18px;\n\tfont-weight:bold;\n}\n\n.keyBox{\n\tfill:#e5e5e5;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\n.mating:hover{\n\tstroke-width:1mm;\n\tstroke:#d56300;\n}\n\n.selectedIndividual{\n\tstroke-width:1mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#d00;\n fill:none;\n}\n\n.selectedIndividual:hover{\n\tstroke:#d00;\n\tfill:#ffbbbb;\n\tfill-opacity:0.70;\n}\n\n.solid{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:none;\n}\n\n.dashed{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.solid:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.dashed:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.filled{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#000;\n}\n\n.specialIcons{\n\tstroke-width:0.25mm;\n\tstroke-linecap:round;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#fff;\n}\n\n.specialLines{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tfill:none;\n}\n\n.thinLine{\n\tfill:none;\n\tstroke: #000;\n\tstroke-width:0.25mm;\n}\n\n.curvedConnector{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-width:0.5mm;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.curvedConnector:hover{\n\tstroke:#d56300;\n}\n\n.whiteInkLetter_1{\n\tfont-size: 12px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_2{\n\tfont-size: 10px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_3{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.whiteInkLetter{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.blackInkLetter_1{\n\tfont-size: 12px;\n}\n\n.blackInkLetter_2{\n\tfont-size: 10px;\n}\n\n.blackInkLetter_3{\n\tfont-size: 8px;\n}\n\n.blackInkLetter{\n\tfont-size: 8px;\n\tfill: #000;\n}\n\n]]></style>\n <script type=\"text/javascript\" xlink:href=\"javascript/madeline.js\"></script>\n <marker id=\"endArrow\" viewBox=\"0 0 10 10\" refX=\"1\" refY=\"5\" markerUnits=\"strokeWidth\" orient=\"auto\" markerWidth=\"5\" markerHeight=\"4\"> <polyline points=\"0,0 10,5 0,10 1,5\" fill=\"#000\" /> </marker>\n </defs>\n <g class=\"pedigree\" transform=\"translate(-462.86)\">\n\n <g id=\"bottomLayer\" class=\"layer\" >\n\n </g>\n <g id=\"layer0\" class=\"layer\" >\n </g>\n\n <g class=\"drawing\">\n <text x=\"557.36\" y=\"30\" text-anchor=\"middle\" class=\"header\" >madTest</text>\n <rect x=\"500.66\" y=\"38.66\" width=\"22.68\" height=\"22.68\" id=\"g43\" class=\"solid\"/>\n <text x=\"512\" y=\"92.5845\" text-anchor=\"middle\" >g43</text>\n <line x1=\"523.34\" y1=\"50\" x2=\"591.38\" y2=\"50\" />\n<circle cx=\"602.72\" cy=\"50\" r=\"11.34\" id=\"g44\" class=\"solid\"/>\n <text x=\"602.72\" y=\"92.5845\" text-anchor=\"middle\" >g44</text>\n <line class=\"mating\" id=\"g44:g43\" x1=\"557.36\" y1=\"50\" x2=\"557.36\" y2=\"123.907\" />\n <line class=\"solid\" x1=\"512\" y1=\"123.907\" x2=\"512\" y2=\"152.257\" />\n<circle cx=\"512\" cy=\"163.597\" r=\"11.34\" id=\"g47\" class=\"solid\"/>\n <text x=\"512\" y=\"206.181\" text-anchor=\"middle\" >g47</text>\n <line class=\"solid\" x1=\"648.08\" y1=\"123.907\" x2=\"648.08\" y2=\"152.257\" />\n<circle cx=\"648.08\" cy=\"163.597\" r=\"11.34\" id=\"g49\" class=\"solid\"/>\n <text x=\"648.08\" y=\"206.181\" text-anchor=\"middle\" >g49</text>\n <line x1=\"659.42\" y1=\"163.597\" x2=\"727.46\" y2=\"163.597\" />\n <rect x=\"727.46\" y=\"152.257\" width=\"22.68\" height=\"22.68\" id=\"g48\" class=\"solid\"/>\n <text x=\"738.8\" y=\"206.181\" text-anchor=\"middle\" >g48</text>\n <line class=\"mating\" id=\"g49:g48\" x1=\"693.44\" y1=\"163.597\" x2=\"693.44\" y2=\"237.504\" />\n <line class=\"solid\" x1=\"602.72\" y1=\"237.504\" x2=\"602.72\" y2=\"265.854\" />\n<circle cx=\"602.72\" cy=\"277.194\" r=\"11.34\" id=\"g50\" class=\"solid\"/>\n <text x=\"602.72\" y=\"319.778\" text-anchor=\"middle\" >g50</text>\n <line class=\"solid\" x1=\"693.44\" y1=\"237.504\" x2=\"693.44\" y2=\"265.854\" />\n<circle cx=\"693.44\" cy=\"277.194\" r=\"11.34\" id=\"g51\" class=\"solid\"/>\n <text x=\"693.44\" y=\"319.778\" text-anchor=\"middle\" >g51</text>\n <line class=\"solid\" x1=\"784.16\" y1=\"237.504\" x2=\"784.16\" y2=\"265.854\" />\n <rect x=\"772.82\" y=\"265.854\" width=\"22.68\" height=\"22.68\" id=\"g52\" class=\"solid\"/>\n <text x=\"784.16\" y=\"319.778\" text-anchor=\"middle\" >g52</text>\n <line x1=\"602.72\" y1=\"237.504\" x2=\"784.16\" y2=\"237.504\" />\n <line x1=\"512\" y1=\"123.907\" x2=\"648.08\" y2=\"123.907\" />\n </g>\n\n </g>\n </svg>\n\n"
|
10
|
-
@embedded_out = " <svg version=\"1.1\" id=\"svgDC\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"370.44\" height=\"380.481\" onload=\"init()\" >\n <defs>\n <style type=\"text/css\"><![CDATA[\n\nline{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nrect{\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\nellipse{\n\tstroke: #000;\n fill: #fff;\n\tstroke-width:0.25mm;\n}\n\ntext{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:12px;\n}\n\n.smallText{\n\tfont-family:\"DejaVu Sans\",sans-serif;\n\tfont-size:9px;\n\tfill:#444;\n}\n\n.layer text{\n\tfill:#930;\n}\n\n.layer line{\n\tstroke:#000;\n}\n\n.birthOrder,.unknownTwins{\n\tfont-size: 8px;\n}\n\n.header{\n\tfont-size:18px;\n\tfont-weight:bold;\n}\n\n.keyBox{\n\tfill:#e5e5e5;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tstroke-linejoin:miter;\n\tstroke-linecap:square;\n}\n\n.mating:hover{\n\tstroke-width:1mm;\n\tstroke:#d56300;\n}\n\n.selectedIndividual{\n\tstroke-width:1mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#d00;\n fill:none;\n}\n\n.selectedIndividual:hover{\n\tstroke:#d00;\n\tfill:#ffbbbb;\n\tfill-opacity:0.70;\n}\n\n.solid{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:none;\n}\n\n.dashed{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.solid:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.dashed:hover{\n\tfill:#ffb787;\n\tfill-opacity:0.70;\n\tstroke:#d56300;\n\tstroke-width:1mm;\n}\n\n.filled{\n\tstroke-width:0.5mm;\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#000;\n}\n\n.specialIcons{\n\tstroke-width:0.25mm;\n\tstroke-linecap:round;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tfill:#fff;\n}\n\n.specialLines{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#000;\n\tstroke-width:0.5mm;\n\tfill:none;\n}\n\n.thinLine{\n\tfill:none;\n\tstroke: #000;\n\tstroke-width:0.25mm;\n}\n\n.curvedConnector{\n\tstroke-linecap:square;\n\tstroke-linejoin:miter;\n\tstroke:#98afc7;\n\tstroke-width:0.5mm;\n\tstroke-dasharray:2mm,1mm;\n\tstroke-dashoffset:1.0mm;\n\tfill:none;\n}\n\n.curvedConnector:hover{\n\tstroke:#d56300;\n}\n\n.whiteInkLetter_1{\n\tfont-size: 12px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_2{\n\tfont-size: 10px;\n\tfill: #fff;\n}\n\n.whiteInkLetter_3{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.whiteInkLetter{\n\tfont-size: 8px;\n\tfill: #fff;\n}\n\n.blackInkLetter_1{\n\tfont-size: 12px;\n}\n\n.blackInkLetter_2{\n\tfont-size: 10px;\n}\n\n.blackInkLetter_3{\n\tfont-size: 8px;\n}\n\n.blackInkLetter{\n\tfont-size: 8px;\n\tfill: #000;\n}\n\n]]></style>\n <script type=\"text/javascript\" xlink:href=\"javascript/madeline.js\"></script>\n <marker id=\"endArrow\" viewBox=\"0 0 10 10\" refX=\"1\" refY=\"5\" markerUnits=\"strokeWidth\" orient=\"auto\" markerWidth=\"5\" markerHeight=\"4\"> <polyline points=\"0,0 10,5 0,10 1,5\" fill=\"#000\" /> </marker>\n </defs>\n <g class=\"pedigree\" transform=\"translate(-462.86)\">\n\n <g id=\"bottomLayer\" class=\"layer\" >\n\n </g>\n <g id=\"layer0\" class=\"layer\" >\n </g>\n\n <g class=\"drawing\">\n <text x=\"557.36\" y=\"30\" text-anchor=\"middle\" class=\"header\" >madTest</text>\n <rect x=\"500.66\" y=\"38.66\" width=\"22.68\" height=\"22.68\" id=\"g43\" class=\"solid\"/>\n <text x=\"512\" y=\"92.5845\" text-anchor=\"middle\" >g43</text>\n <line x1=\"523.34\" y1=\"50\" x2=\"591.38\" y2=\"50\" />\n<circle cx=\"602.72\" cy=\"50\" r=\"11.34\" id=\"g44\" class=\"solid\"/>\n <text x=\"602.72\" y=\"92.5845\" text-anchor=\"middle\" >g44</text>\n <line class=\"mating\" id=\"g44:g43\" x1=\"557.36\" y1=\"50\" x2=\"557.36\" y2=\"123.907\" />\n <line class=\"solid\" x1=\"512\" y1=\"123.907\" x2=\"512\" y2=\"152.257\" />\n<circle cx=\"512\" cy=\"163.597\" r=\"11.34\" id=\"g47\" class=\"solid\"/>\n <text x=\"512\" y=\"206.181\" text-anchor=\"middle\" >g47</text>\n <line class=\"solid\" x1=\"648.08\" y1=\"123.907\" x2=\"648.08\" y2=\"152.257\" />\n<circle cx=\"648.08\" cy=\"163.597\" r=\"11.34\" id=\"g49\" class=\"solid\"/>\n <text x=\"648.08\" y=\"206.181\" text-anchor=\"middle\" >g49</text>\n <line x1=\"659.42\" y1=\"163.597\" x2=\"727.46\" y2=\"163.597\" />\n <rect x=\"727.46\" y=\"152.257\" width=\"22.68\" height=\"22.68\" id=\"g48\" class=\"solid\"/>\n <text x=\"738.8\" y=\"206.181\" text-anchor=\"middle\" >g48</text>\n <line class=\"mating\" id=\"g49:g48\" x1=\"693.44\" y1=\"163.597\" x2=\"693.44\" y2=\"237.504\" />\n <line class=\"solid\" x1=\"602.72\" y1=\"237.504\" x2=\"602.72\" y2=\"265.854\" />\n<circle cx=\"602.72\" cy=\"277.194\" r=\"11.34\" id=\"g50\" class=\"solid\"/>\n <text x=\"602.72\" y=\"319.778\" text-anchor=\"middle\" >g50</text>\n <line class=\"solid\" x1=\"693.44\" y1=\"237.504\" x2=\"693.44\" y2=\"265.854\" />\n<circle cx=\"693.44\" cy=\"277.194\" r=\"11.34\" id=\"g51\" class=\"solid\"/>\n <text x=\"693.44\" y=\"319.778\" text-anchor=\"middle\" >g51</text>\n <line class=\"solid\" x1=\"784.16\" y1=\"237.504\" x2=\"784.16\" y2=\"265.854\" />\n <rect x=\"772.82\" y=\"265.854\" width=\"22.68\" height=\"22.68\" id=\"g52\" class=\"solid\"/>\n <text x=\"784.16\" y=\"319.778\" text-anchor=\"middle\" >g52</text>\n <line x1=\"602.72\" y1=\"237.504\" x2=\"784.16\" y2=\"237.504\" />\n <line x1=\"512\" y1=\"123.907\" x2=\"648.08\" y2=\"123.907\" />\n </g>\n\n </g>\n </svg>\n\n"
|
11
|
-
end
|
7
|
+
fixtures :madeline
|
12
8
|
|
13
9
|
def test_init
|
14
10
|
assert_nothing_raised do
|
@@ -18,14 +14,16 @@ class MadelineTest < Test::Unit::TestCase
|
|
18
14
|
|
19
15
|
def test_construction
|
20
16
|
artist = Madeline::Interface.new()
|
21
|
-
|
22
|
-
|
17
|
+
pedigree_file, warnings = artist.draw(File.open('test/pedigree.txt','r'))
|
18
|
+
pedigree = File.read(pedigree_file)
|
19
|
+
assert_equal(@@fixtures["pedigree"], pedigree)
|
23
20
|
end
|
24
21
|
|
25
22
|
def test_madeline_location
|
26
23
|
artist = Madeline::Interface.new(:madeline => '/u5/tools/bin/madeline2')
|
27
|
-
|
28
|
-
|
24
|
+
pedigree_file, warnings = artist.draw(File.open('test/pedigree.txt','r'))
|
25
|
+
pedigree = File.read(pedigree_file)
|
26
|
+
assert_equal(@@fixtures["pedigree"], pedigree)
|
29
27
|
end
|
30
28
|
|
31
29
|
def test_bad_madeline_location
|
@@ -37,20 +35,45 @@ class MadelineTest < Test::Unit::TestCase
|
|
37
35
|
|
38
36
|
def test_arial
|
39
37
|
artist = Madeline::Interface.new(:font => "Arial")
|
40
|
-
|
41
|
-
|
38
|
+
pedigree_file, warnings = artist.draw(File.open('test/pedigree.txt','r'))
|
39
|
+
pedigree = File.read(pedigree_file)
|
40
|
+
assert_equal(@@fixtures["arial_out"], pedigree)
|
42
41
|
end
|
43
42
|
|
44
43
|
def test_embedded
|
45
44
|
artist = Madeline::Interface.new(:embedded => true)
|
46
|
-
|
47
|
-
|
45
|
+
pedigree_file, warnings = artist.draw(File.open('test/pedigree.txt','r'))
|
46
|
+
pedigree = File.read(pedigree_file)
|
47
|
+
assert_equal(@@fixtures["embedded_out"], pedigree)
|
48
48
|
end
|
49
49
|
|
50
50
|
def test_bad_file_location
|
51
51
|
artist = Madeline::Interface.new()
|
52
52
|
assert_raises(Errno::ENOENT,"No such file or directory") do
|
53
|
-
pedigree = artist.draw(File.open('test/blah.txt','r'))
|
53
|
+
pedigree, warnings = artist.draw(File.open('test/blah.txt','r'))
|
54
54
|
end
|
55
55
|
end
|
56
|
+
|
57
|
+
def test_labels
|
58
|
+
artist = Madeline::Interface.new(:L => 'CM')
|
59
|
+
pedigree_file, warnings = artist.draw(File.open('test/labels.txt','r'))
|
60
|
+
pedigree = File.read(pedigree_file)
|
61
|
+
assert_equal(@@fixtures["single_label_out"], pedigree)
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_multiple_labels
|
65
|
+
artist = Madeline::Interface.new(:L => ["CM","TTLD"])
|
66
|
+
pedigree_file, warnings = artist.draw(File.open('test/labels.txt','r'))
|
67
|
+
pedigree = File.read(pedigree_file)
|
68
|
+
assert_equal(@@fixtures["label_out"], pedigree)
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_block
|
72
|
+
artist = Madeline::Interface.new(:L => ["CM","TTLD"])
|
73
|
+
file = File.open('test/labels.txt','r')
|
74
|
+
artist.draw(file) { |filehandle, warnings|
|
75
|
+
pedigree = filehandle.read
|
76
|
+
assert_equal(@@fixtures["label_out"], pedigree)
|
77
|
+
}
|
78
|
+
end
|
56
79
|
end
|
data/test/pedigree.txt
CHANGED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'yaml'
|
3
|
+
class Test::Unit::TestCase
|
4
|
+
@@fixtures = {}
|
5
|
+
def self.fixtures fixture
|
6
|
+
# load and cache the YAML
|
7
|
+
item = YAML.load_file("test/fixtures/#{fixture.to_s}.yml")
|
8
|
+
item.each do |name, value|
|
9
|
+
@@fixtures[name] = value
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: madeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Denise Mauldin
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-08 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: Interface to Madeline2
|
@@ -21,17 +21,20 @@ extensions: []
|
|
21
21
|
|
22
22
|
extra_rdoc_files:
|
23
23
|
- README.md
|
24
|
-
- ext/madeline2-linux-x86_64
|
24
|
+
- ext/madeline/madeline2-linux-x86_64
|
25
25
|
- lib/madeline.rb
|
26
26
|
- lib/madeline/interface.rb
|
27
27
|
files:
|
28
28
|
- README.md
|
29
29
|
- Rakefile
|
30
|
-
- ext/madeline2-linux-x86_64
|
30
|
+
- ext/madeline/madeline2-linux-x86_64
|
31
31
|
- lib/madeline.rb
|
32
32
|
- lib/madeline/interface.rb
|
33
|
+
- test/fixtures/madeline.yml
|
34
|
+
- test/labels.txt
|
33
35
|
- test/madeline_test.rb
|
34
36
|
- test/pedigree.txt
|
37
|
+
- test/test_helper.rb
|
35
38
|
- Manifest
|
36
39
|
- madeline.gemspec
|
37
40
|
homepage: http://github.com/dmauldin/madeline
|
@@ -68,4 +71,5 @@ signing_key:
|
|
68
71
|
specification_version: 3
|
69
72
|
summary: Interface to Madeline2
|
70
73
|
test_files:
|
74
|
+
- test/test_helper.rb
|
71
75
|
- test/madeline_test.rb
|