complearn 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +13 -0
- data/COPYING +340 -0
- data/ChangeLog +0 -0
- data/INSTALL +231 -0
- data/Makefile +352 -0
- data/Makefile.am +76 -0
- data/Makefile.in +352 -0
- data/NEWS +7 -0
- data/README +0 -0
- data/aclocal.m4 +104 -0
- data/bin/Makefile +209 -0
- data/bin/Makefile.am +8 -0
- data/bin/Makefile.in +209 -0
- data/bin/labeltree +68 -0
- data/bin/labeltree.in +68 -0
- data/bin/makesvm +70 -0
- data/bin/makesvm.in +70 -0
- data/bin/maketree +98 -0
- data/bin/maketree.in +98 -0
- data/bin/ncd +43 -0
- data/bin/ncd.in +43 -0
- data/bin/ncdmatrix +54 -0
- data/bin/ncdmatrix.in +54 -0
- data/bin/ncdvector +50 -0
- data/bin/ncdvector.in +50 -0
- data/complearn-0.6.2.gem +0 -0
- data/complearn.gemspec +57 -0
- data/config.log +597 -0
- data/config.status +1082 -0
- data/configure +4922 -0
- data/configure.ac +91 -0
- data/confstat5FpLBf/config.h +65 -0
- data/confstat5FpLBf/subs-1.sed +50 -0
- data/confstat5FpLBf/subs-2.sed +13 -0
- data/confstat5FpLBf/subs.frag +0 -0
- data/confstat5FpLBf/subs.sed +59 -0
- data/confstat5FpLBf/undefs.sed +24 -0
- data/doc/FAQ.txt +67 -0
- data/doc/Makefile +286 -0
- data/doc/Makefile.am +11 -0
- data/doc/Makefile.in +286 -0
- data/doc/devguide.txt +15 -0
- data/doc/example.complearnrc +14 -0
- data/doc/examples.txt +35 -0
- data/doc/man/Makefile +255 -0
- data/doc/man/Makefile.am +11 -0
- data/doc/man/Makefile.in +255 -0
- data/doc/man/complearn.5 +91 -0
- data/doc/man/labeltree.1 +35 -0
- data/doc/man/makesvm.1 +60 -0
- data/doc/man/maketree.1 +58 -0
- data/doc/man/ncd.1 +51 -0
- data/doc/man/ncdmatrix.1 +40 -0
- data/doc/man/ncdvector.1 +42 -0
- data/doc/readme.txt +101 -0
- data/doc/userguide.txt +46 -0
- data/examples/genes/blueWhale.txt +1 -0
- data/examples/genes/cat.txt +1 -0
- data/examples/genes/chimpanzee.txt +1 -0
- data/examples/genes/finWhale.txt +1 -0
- data/examples/genes/graySeal.txt +1 -0
- data/examples/genes/harborSeal.txt +1 -0
- data/examples/genes/horse.txt +1 -0
- data/examples/genes/human.txt +1 -0
- data/examples/genes/mouse.txt +1 -0
- data/examples/genes/rat.txt +1 -0
- data/ext/Makefile +167 -0
- data/ext/Quartet.c +399 -0
- data/ext/Quartet.h +62 -0
- data/ext/TreeScore.c +244 -0
- data/ext/TreeScore.h +3 -0
- data/ext/config.h +65 -0
- data/ext/config.h.in +64 -0
- data/ext/extconf.rb +3 -0
- data/ext/lib/CompLearnLib/CLConfig.rb +241 -0
- data/ext/lib/CompLearnLib/CompressionObject.rb +59 -0
- data/ext/lib/CompLearnLib/CompressionTask.rb +99 -0
- data/ext/lib/CompLearnLib/DistMatrix.rb +18 -0
- data/ext/lib/CompLearnLib/FoundComp.rb +10 -0
- data/ext/lib/CompLearnLib/FoundComp.rb.in +10 -0
- data/ext/lib/CompLearnLib/Ncd.rb +248 -0
- data/ext/lib/CompLearnLib/RunEnv.rb +150 -0
- data/ext/lib/CompLearnLib/Task.rb +39 -0
- data/ext/lib/CompLearnLib/TaskMaster.rb +13 -0
- data/ext/lib/CompLearnLib/TaskMasterMPI.rb +112 -0
- data/ext/lib/CompLearnLib/TaskMasterSingle.rb +39 -0
- data/ext/lib/CompLearnLib/Tree.rb +300 -0
- data/install-sh +294 -0
- data/missing +336 -0
- data/mkinstalldirs +111 -0
- data/o +24 -0
- data/scripts/CompLearn.iss +89 -0
- data/scripts/CompLearn.iss.in +89 -0
- data/scripts/debian/changelog +6 -0
- data/scripts/debian/control +14 -0
- data/scripts/makeSetup.sh +23 -0
- data/scripts/makeSetup.sh.in +23 -0
- data/scripts/makedeb.zsh +46 -0
- data/scripts/makedeb.zsh.in +46 -0
- data/tests/alltests.rb +2 -0
- data/tests/bz2test.rb +516 -0
- data/tests/sshagent-test.rb +48 -0
- data/tests/tests.rb +275 -0
- metadata +164 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'CompLearnLib/RunEnv'
|
3
|
+
include MRunEnv
|
4
|
+
require 'CompLearnLib/CLConfig'
|
5
|
+
require 'CompLearnLib/Task'
|
6
|
+
include MTask
|
7
|
+
|
8
|
+
class TaskMasterParTestTask < Task
|
9
|
+
attr_reader :misc
|
10
|
+
def initialize(i) @i = i end
|
11
|
+
def execute() reply(@i * @i) end
|
12
|
+
end
|
13
|
+
|
14
|
+
class TC_SSHAgentTest < Test::Unit::TestCase
|
15
|
+
def test_SSHAgent
|
16
|
+
assert(ENV.has_key?('SSH_AGENT_PID'), 'ssh-agent is not available')
|
17
|
+
end
|
18
|
+
def test_livingHosts
|
19
|
+
cfg = CLConfig.getDefaultCLConfig()
|
20
|
+
assert(cfg.hosts != nil)
|
21
|
+
assert(cfg.hosts.size >= 1)
|
22
|
+
if (cfg.hosts.size > 1)
|
23
|
+
h = cfg.hosts[1]
|
24
|
+
cmd = 'echo testing-party'
|
25
|
+
result = SSHAgent.runAt(cmd, h)
|
26
|
+
assert(result =~ /testing-party/, "Cannot run command #{cmd} on #{h}")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# This test may work, but not until LAM/MPI is installed
|
31
|
+
def test_MPI
|
32
|
+
if CLConfig.getDefaultCLConfig().hosts.size > 1 && !CLConfig.getDefaultCLConfig().isSingleProcess?()
|
33
|
+
TaskMaster.init
|
34
|
+
sum = 0
|
35
|
+
todo = 4
|
36
|
+
4.times { |i|
|
37
|
+
TaskMaster.enqueue(TaskMasterParTestTask.new(i)) { |s, t, src|
|
38
|
+
sum += s
|
39
|
+
todo -= 1
|
40
|
+
}
|
41
|
+
}
|
42
|
+
while todo > 0
|
43
|
+
TaskMaster.waitForSlave()
|
44
|
+
end
|
45
|
+
assert(sum == 14, "TaskMaster parallel-threading is not working")
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/tests/tests.rb
ADDED
@@ -0,0 +1,275 @@
|
|
1
|
+
##########################################################################
|
2
|
+
#
|
3
|
+
# Test suite for CompLearn system
|
4
|
+
#
|
5
|
+
# Invoke with
|
6
|
+
# ruby tests/tests.rb # normal test suite
|
7
|
+
# ruby tests/alltests.rb # run all tests, including ssh-agent (password req'd)
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'test/unit'
|
11
|
+
|
12
|
+
require 'CompLearn'
|
13
|
+
require 'CompLearnLib/CLConfig'
|
14
|
+
require 'CompLearnLib/Tree'
|
15
|
+
require 'CompLearnLib/RunEnv'
|
16
|
+
require 'CompLearnLib/DistMatrix'
|
17
|
+
|
18
|
+
#require 'bz2'
|
19
|
+
require 'CompLearnLib/Task'
|
20
|
+
|
21
|
+
include MRunEnv
|
22
|
+
include MTree
|
23
|
+
include MTask
|
24
|
+
|
25
|
+
class TaskMasterTestTask < Task
|
26
|
+
attr_reader :misc
|
27
|
+
def initialize(i) @i = i end
|
28
|
+
def execute() reply(@i * @i) end
|
29
|
+
end
|
30
|
+
|
31
|
+
class TC_TaskMasterTest < Test::Unit::TestCase
|
32
|
+
def test_TaskMasterSingle
|
33
|
+
CLConfig.setSingleUser
|
34
|
+
TaskMaster.init
|
35
|
+
sum = 0
|
36
|
+
4.times { |i|
|
37
|
+
TaskMaster.enqueue(TaskMasterTestTask.new(i)) { |s, t, src|
|
38
|
+
sum += s
|
39
|
+
}
|
40
|
+
}
|
41
|
+
assert(sum == 14, "TaskMaster single-threading is not working")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
class TC_EnvironmentTest < Test::Unit::TestCase
|
46
|
+
def test_configFile
|
47
|
+
cfg = CLConfig.getDefaultCLConfig()
|
48
|
+
assert(cfg != nil)
|
49
|
+
assert(cfg.hosts.size >= 1)
|
50
|
+
end
|
51
|
+
# def test_BZ2
|
52
|
+
# a = 'the best coders are the lazy ones.'
|
53
|
+
# b = BZ2.compress(a)
|
54
|
+
# c = BZ2.decompress(b)
|
55
|
+
# assert(c == a)
|
56
|
+
# end
|
57
|
+
end
|
58
|
+
|
59
|
+
class TC_CLConfigFileParserTest < Test::Unit::TestCase
|
60
|
+
def test_CLConfigFileParser
|
61
|
+
fname = RunEnv.getTemporaryFilename()
|
62
|
+
assert(fname, "Cannot get temporary filename")
|
63
|
+
f = File.open(fname, "w")
|
64
|
+
assert(f, "Cannot open #{fname} for writing")
|
65
|
+
f.write <<EOF
|
66
|
+
#
|
67
|
+
# Test config file used by testconfig.rb
|
68
|
+
#
|
69
|
+
# $Id: tests.rb,v 1.6 2004/04/06 11:38:27 cilibrar Exp $
|
70
|
+
|
71
|
+
# comment
|
72
|
+
InputDir: testInputDir
|
73
|
+
OutputDir: testOutputDir
|
74
|
+
WorkDir: testWorkDir
|
75
|
+
|
76
|
+
Symmetric: false
|
77
|
+
|
78
|
+
Hosts:
|
79
|
+
- host1
|
80
|
+
- host2
|
81
|
+
- host3
|
82
|
+
|
83
|
+
EOF
|
84
|
+
f.close
|
85
|
+
|
86
|
+
cfg = CLConfig.new(fname)
|
87
|
+
|
88
|
+
assert("testInputDir" == cfg.inputDir, "Error with InputDir")
|
89
|
+
assert("testOutputDir"== cfg.outputDir, "Error with OutputDir")
|
90
|
+
assert("testWorkDir" == cfg.workDir, "Error with WorkDir")
|
91
|
+
assert(!cfg.symmetric, "Error reading Symmetric")
|
92
|
+
assert(["host1","host2","host3"] == cfg.hosts, "Error with hosts")
|
93
|
+
|
94
|
+
File.unlink(fname)
|
95
|
+
|
96
|
+
cfg = CLConfig.getDefaultCLConfig
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
class TC_Tree < Test::Unit::TestCase
|
103
|
+
def test_TreeScore
|
104
|
+
dm = [
|
105
|
+
[ 0.1, 0.5, 0.1, 0.1],
|
106
|
+
[ 0.5, 0.1, 0.1, 0.1],
|
107
|
+
[ 0.1, 0.1, 0.1, 0.1],
|
108
|
+
[ 0.1, 0.1, 0.1, 0.1],
|
109
|
+
]
|
110
|
+
t = TreeScore.makeFullList(dm)
|
111
|
+
assert(t.best == -0.2, "Best tree score is not -0.2 like it should be; got #{t.best}.")
|
112
|
+
assert(t.worst == -0.6, "Worst tree score is not -0.6 like it should be; got #{t.worst}.")
|
113
|
+
end
|
114
|
+
def test_TreeBasics
|
115
|
+
t = Tree.randomTree(8)
|
116
|
+
assert(t.verifyTree)
|
117
|
+
ot = t.clone()
|
118
|
+
assert((ot <=> t) == 0)
|
119
|
+
assert(t.getSpeciesCount() == 8)
|
120
|
+
assert(t.getKernelCount() == 6)
|
121
|
+
assert(t.getNodeCount() == 14)
|
122
|
+
k = t.randomKernelNodes(3)
|
123
|
+
k.each { |n| assert(t.isKernel?(n)) }
|
124
|
+
s = t.randomSpeciesNodes(5)
|
125
|
+
s.each { |n| assert(t.isSpecies?(n)) }
|
126
|
+
a = t.randomNode()
|
127
|
+
p = t.findPath(a,a)
|
128
|
+
assert(p.size == 1)
|
129
|
+
assert(p[0] == a)
|
130
|
+
20.times {
|
131
|
+
a,b = t.randomNodes(2)
|
132
|
+
p = t.findPath(a,b)
|
133
|
+
assert(p[0] == a)
|
134
|
+
assert(p[-1] == b)
|
135
|
+
(p.size-1).times { |n|
|
136
|
+
assert(p[n] != p[n+1])
|
137
|
+
assert(t.connected?(p[n],p[n+1]))
|
138
|
+
}
|
139
|
+
}
|
140
|
+
50.times { # should n3v3r be the sam3 aft3r a mut4t10n
|
141
|
+
t = ot.clone
|
142
|
+
assert((ot <=> t) == 0)
|
143
|
+
t.mutateSpecies
|
144
|
+
assert((ot <=> t) != 0)
|
145
|
+
assert(t.verifyTree())
|
146
|
+
t = ot.clone
|
147
|
+
t.mutateSubtreeInterchange
|
148
|
+
assert(t.verifyTree())
|
149
|
+
assert((ot <=> t) != 0)
|
150
|
+
t = ot.clone
|
151
|
+
t.mutateSubtreeTransfer
|
152
|
+
assert((ot <=> t) != 0)
|
153
|
+
assert(t.verifyTree())
|
154
|
+
t = ot.clone
|
155
|
+
t.mutateRandom
|
156
|
+
assert((ot <=> t) != 0)
|
157
|
+
assert(t.verifyTree())
|
158
|
+
t = ot.clone
|
159
|
+
t.mutateComplex
|
160
|
+
assert((ot <=> t) != 0)
|
161
|
+
assert(t.verifyTree())
|
162
|
+
}
|
163
|
+
t = ot.clone
|
164
|
+
t.mutateSpecies
|
165
|
+
begin
|
166
|
+
z = t.clone
|
167
|
+
z.mutateSpecies
|
168
|
+
end until ((ot <=> z) == 0) # should be able to mutate back
|
169
|
+
t = ot.clone
|
170
|
+
t.mutateSubtreeInterchange
|
171
|
+
begin
|
172
|
+
z = t.clone
|
173
|
+
z.mutateSubtreeInterchange
|
174
|
+
end until ((ot <=> z) == 0)
|
175
|
+
5.times {
|
176
|
+
t = ot.clone
|
177
|
+
t.mutateSubtreeTransfer
|
178
|
+
counter=0
|
179
|
+
begin
|
180
|
+
counter += 1
|
181
|
+
z = t.clone
|
182
|
+
z.mutateSubtreeTransfer
|
183
|
+
end until ((ot <=> z) == 0)
|
184
|
+
}
|
185
|
+
t = ot.clone
|
186
|
+
t.mutateRandom
|
187
|
+
begin
|
188
|
+
z = t.clone
|
189
|
+
z.mutateComplex
|
190
|
+
end until ((ot <=> z) == 0)
|
191
|
+
end
|
192
|
+
|
193
|
+
class TC_RunEnv < Test::Unit::TestCase
|
194
|
+
def test_tmpnames
|
195
|
+
a,b,c = RunEnv.getTemporaryFilenames(3)
|
196
|
+
assert( (a <= b) != 0 )
|
197
|
+
assert( (b <=> c) != 0 )
|
198
|
+
assert( (a <=> c) != 0 )
|
199
|
+
f = File.open(a, "wb")
|
200
|
+
f.write("hi!\n")
|
201
|
+
f.close()
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
class TC_DistMatrix < Test::Unit::TestCase
|
206
|
+
def test_distmatrix()
|
207
|
+
a,b,c = RunEnv.getTemporaryFilenames(3)
|
208
|
+
f = File.open(a, "wb")
|
209
|
+
f.write <<EOF
|
210
|
+
20
|
211
|
+
BlueWhale 0.000000 0.956323 0.972438 0.933378 0.602634 0.976144 0.979629 0.952030 0.951910 0.944889 0.969844 0.976034 0.981995 0.977991 0.982811 0.974382 0.972313 0.976209 0.982206 0.945881
|
212
|
+
Cat 0.956323 0.000000 0.974313 0.944650 0.956363 0.975953 0.975125 0.926396 0.928524 0.932140 0.964397 0.977328 0.979132 0.977075 0.982982 0.974569 0.964113 0.979347 0.976386 0.937550
|
213
|
+
Chimpanzee 0.972438 0.974313 0.000000 0.970806 0.977246 0.873617 0.727796 0.972297 0.971715 0.968993 0.981926 0.657387 0.985329 0.851432 0.987256 0.428991 0.976425 0.850383 0.986032 0.969842
|
214
|
+
Cow 0.933378 0.944650 0.970806 0.000000 0.938797 0.972798 0.972197 0.941317 0.942067 0.940301 0.967403 0.973620 0.978456 0.973127 0.980380 0.970828 0.969176 0.977041 0.973974 0.933010
|
215
|
+
FinbackWhale 0.602634 0.956363 0.977246 0.938797 0.000000 0.981417 0.979665 0.957940 0.958546 0.947599 0.976451 0.980493 0.981616 0.978559 0.982824 0.979584 0.970869 0.980316 0.982494 0.948306
|
216
|
+
Gibbon 0.976144 0.975953 0.873617 0.972798 0.981417 0.000000 0.880709 0.973661 0.976154 0.969450 0.981696 0.880203 0.984314 0.891729 0.990322 0.875655 0.979186 0.891283 0.985513 0.968633
|
217
|
+
Gorilla 0.979629 0.975125 0.727796 0.972197 0.979665 0.880709 0.000000 0.975026 0.974955 0.973320 0.982952 0.732325 0.986312 0.857432 0.986569 0.720617 0.982154 0.854869 0.986469 0.969977
|
218
|
+
GreySeal 0.952030 0.926396 0.972297 0.941317 0.957940 0.973661 0.975026 0.000000 0.428044 0.938868 0.968053 0.975760 0.979947 0.978015 0.981756 0.975585 0.967721 0.976995 0.977296 0.933762
|
219
|
+
HarborSeal 0.951910 0.928524 0.971715 0.942067 0.958546 0.976154 0.974955 0.428044 0.000000 0.934823 0.965112 0.974737 0.980340 0.978275 0.981906 0.974849 0.966301 0.975989 0.977183 0.934832
|
220
|
+
Horse 0.944889 0.932140 0.968993 0.940301 0.947599 0.969450 0.973320 0.938868 0.934823 0.000000 0.972751 0.971558 0.977220 0.975414 0.984268 0.970180 0.964328 0.975455 0.978211 0.879802
|
221
|
+
HouseMouse 0.969844 0.964397 0.981926 0.967403 0.976451 0.981696 0.982952 0.968053 0.965112 0.972751 0.000000 0.980400 0.974406 0.983850 0.981355 0.980623 0.901139 0.983575 0.973949 0.968500
|
222
|
+
Human 0.976034 0.977328 0.657387 0.973620 0.980493 0.880203 0.732325 0.975760 0.974737 0.971558 0.980400 0.000000 0.986243 0.847139 0.988041 0.654234 0.981715 0.841775 0.985926 0.973694
|
223
|
+
Opossum 0.981995 0.979132 0.985329 0.978456 0.981616 0.984314 0.986312 0.979947 0.980340 0.977220 0.974406 0.986243 0.000000 0.987712 0.984083 0.985832 0.979062 0.986586 0.942194 0.979566
|
224
|
+
Orangutan 0.977991 0.977075 0.851432 0.973127 0.978559 0.891729 0.857432 0.978015 0.978275 0.975414 0.983850 0.847139 0.987712 0.000000 0.990018 0.849235 0.982004 0.569297 0.986478 0.978454
|
225
|
+
Platypus 0.982811 0.982982 0.987256 0.980380 0.982824 0.990322 0.986569 0.981756 0.981906 0.984268 0.981355 0.988041 0.984083 0.990018 0.000000 0.987128 0.983857 0.989407 0.981747 0.986069
|
226
|
+
PygmyChimpanzee 0.974382 0.974569 0.428991 0.970828 0.979584 0.875655 0.720617 0.975585 0.974849 0.970180 0.980623 0.654234 0.985832 0.849235 0.987128 0.000000 0.976925 0.849978 0.984617 0.971307
|
227
|
+
Rat 0.972313 0.964113 0.976425 0.969176 0.970869 0.979186 0.982154 0.967721 0.966301 0.964328 0.901139 0.981715 0.979062 0.982004 0.983857 0.976925 0.000000 0.979808 0.976307 0.964887
|
228
|
+
SumatranOrangutan 0.976209 0.979347 0.850383 0.977041 0.980316 0.891283 0.854869 0.976995 0.975989 0.975455 0.983575 0.841775 0.986586 0.569297 0.989407 0.849978 0.979808 0.000000 0.988176 0.975742
|
229
|
+
Wallaroo 0.982206 0.976386 0.986032 0.973974 0.982494 0.985513 0.986469 0.977296 0.977183 0.978211 0.973949 0.985926 0.942194 0.986478 0.981747 0.984617 0.976307 0.988176 0.000000 0.972083
|
230
|
+
WhiteRhino 0.945881 0.937550 0.969842 0.933010 0.948306 0.968633 0.969977 0.933762 0.934832 0.879802 0.968500 0.973694 0.979566 0.978454 0.986069 0.971307 0.964887 0.975742 0.972083 0.000000
|
231
|
+
EOF
|
232
|
+
f.close
|
233
|
+
|
234
|
+
# dm, names = DistMatrix.readFile(a)
|
235
|
+
# DistMatrix.writeFile(b, dm, names)
|
236
|
+
# dm2, names2 = DistMatrix.readFile(b)
|
237
|
+
# DistMatrix.writeFile(c, dm2, names2)
|
238
|
+
# dm3, names3 = DistMatrix.readFile(c)
|
239
|
+
# assert(names.size == 20)
|
240
|
+
# assert(names2.size == 20)
|
241
|
+
# assert(names3.size == 20)
|
242
|
+
# assert((dm2 <=> dm3) == 0)
|
243
|
+
# [a,b,c].each { |n| File.unlink(n) }
|
244
|
+
# ts = TreeScore.makeFullList(dm)
|
245
|
+
# randtree = Tree.randomTree(dm.size)
|
246
|
+
# assert(randtree.verifyTree)
|
247
|
+
# score = ts.score(randtree)
|
248
|
+
# assert(score >= 0.0 && score <= 1.0)
|
249
|
+
#DistMatrix.makeFromDir("/ufs/cilibrar/src/mpicquart/data/genres", "genresdist.txt")
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
end
|
254
|
+
|
255
|
+
class TC_WholeSystem < Test::Unit::TestCase
|
256
|
+
def test_wholesystem
|
257
|
+
exampledir = "../examples/genes"
|
258
|
+
a,b,treename = RunEnv.getTemporaryFilenames(3)
|
259
|
+
`ncdmatrix #{exampledir} >#{a}`
|
260
|
+
assert( File.exist?(a) && File.stat(a).size > 100, "Distance Matrix file #{a} problem!" )
|
261
|
+
`maketree #{a} #{treename} >#{b}`
|
262
|
+
lastscore = nil
|
263
|
+
File.open(b, 'r') { |f|
|
264
|
+
while line = f.gets
|
265
|
+
lastscore = $1.to_f if line =~ /([0-9.]+)\s*$/
|
266
|
+
end
|
267
|
+
}
|
268
|
+
assert(lastscore > 0.7, "Final tree score too low: #{lastscore}")
|
269
|
+
assert(File.exist?(treename), "No #{treename} file created!")
|
270
|
+
File.unlink(a)
|
271
|
+
File.unlink(b)
|
272
|
+
File.unlink(treename)
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
metadata
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.8.1
|
3
|
+
specification_version: 1
|
4
|
+
name: complearn
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.6.2
|
7
|
+
date: 2004-10-02
|
8
|
+
summary: The CompLearn Toolkit enables you to do data mining using data compression. It also allows you to do Quartet Tree Reconstruction as well as Support Vector Machine experiments with these techniques.
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
author: Rudi Cilibrasi
|
12
|
+
email: cilibrar@ofb.net
|
13
|
+
homepage: http://complearn.sourceforge.net/
|
14
|
+
rubyforge_project: complearn
|
15
|
+
description: "Using this package, you can do powerful pattern recognition easily from your
|
16
|
+
shell command line using a simple suite of tools. Applications include music
|
17
|
+
cateogrization, text classification, handwritten digit recognition, and
|
18
|
+
evolutionary tree reconstruction. The technique is based on a very general
|
19
|
+
theoretical notion of Kolmogorov Complexity, and so is undoubtedly applicable to
|
20
|
+
many as yet unknown disciplines. See the webpage for research papers explaining
|
21
|
+
the math behind these techniques."
|
22
|
+
autorequire:
|
23
|
+
default_executable: ncd
|
24
|
+
bindir: bin
|
25
|
+
has_rdoc: true
|
26
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
27
|
+
requirements:
|
28
|
+
-
|
29
|
+
- ">"
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 0.0.0
|
32
|
+
version:
|
33
|
+
platform: ruby
|
34
|
+
files:
|
35
|
+
- AUTHORS
|
36
|
+
- COPYING
|
37
|
+
- ChangeLog
|
38
|
+
- INSTALL
|
39
|
+
- Makefile.am
|
40
|
+
- Makefile.in
|
41
|
+
- NEWS
|
42
|
+
- README
|
43
|
+
- aclocal.m4
|
44
|
+
- bin
|
45
|
+
- configure
|
46
|
+
- configure.ac
|
47
|
+
- doc
|
48
|
+
- examples
|
49
|
+
- ext
|
50
|
+
- install-sh
|
51
|
+
- missing
|
52
|
+
- mkinstalldirs
|
53
|
+
- scripts
|
54
|
+
- tests
|
55
|
+
- complearn.gemspec
|
56
|
+
- complearn-0.6.2.gem
|
57
|
+
- config.log
|
58
|
+
- o
|
59
|
+
- config.status
|
60
|
+
- Makefile
|
61
|
+
- confstat5FpLBf
|
62
|
+
- bin/Makefile.am
|
63
|
+
- bin/Makefile.in
|
64
|
+
- bin/labeltree.in
|
65
|
+
- bin/makesvm.in
|
66
|
+
- bin/maketree.in
|
67
|
+
- bin/ncd.in
|
68
|
+
- bin/ncdmatrix.in
|
69
|
+
- bin/ncdvector.in
|
70
|
+
- bin/Makefile
|
71
|
+
- bin/ncd
|
72
|
+
- bin/ncdvector
|
73
|
+
- bin/ncdmatrix
|
74
|
+
- bin/labeltree
|
75
|
+
- bin/maketree
|
76
|
+
- bin/makesvm
|
77
|
+
- doc/FAQ.txt
|
78
|
+
- doc/Makefile.am
|
79
|
+
- doc/Makefile.in
|
80
|
+
- doc/devguide.txt
|
81
|
+
- doc/example.complearnrc
|
82
|
+
- doc/examples.txt
|
83
|
+
- doc/man
|
84
|
+
- doc/readme.txt
|
85
|
+
- doc/userguide.txt
|
86
|
+
- doc/Makefile
|
87
|
+
- doc/man/Makefile.am
|
88
|
+
- doc/man/Makefile.in
|
89
|
+
- doc/man/complearn.5
|
90
|
+
- doc/man/labeltree.1
|
91
|
+
- doc/man/makesvm.1
|
92
|
+
- doc/man/maketree.1
|
93
|
+
- doc/man/ncd.1
|
94
|
+
- doc/man/ncdmatrix.1
|
95
|
+
- doc/man/ncdvector.1
|
96
|
+
- doc/man/Makefile
|
97
|
+
- examples/genes
|
98
|
+
- examples/genes/blueWhale.txt
|
99
|
+
- examples/genes/cat.txt
|
100
|
+
- examples/genes/chimpanzee.txt
|
101
|
+
- examples/genes/finWhale.txt
|
102
|
+
- examples/genes/graySeal.txt
|
103
|
+
- examples/genes/harborSeal.txt
|
104
|
+
- examples/genes/horse.txt
|
105
|
+
- examples/genes/human.txt
|
106
|
+
- examples/genes/mouse.txt
|
107
|
+
- examples/genes/rat.txt
|
108
|
+
- ext/Quartet.c
|
109
|
+
- ext/Quartet.h
|
110
|
+
- ext/TreeScore.c
|
111
|
+
- ext/TreeScore.h
|
112
|
+
- ext/config.h.in
|
113
|
+
- ext/extconf.rb
|
114
|
+
- ext/lib
|
115
|
+
- ext/config.h
|
116
|
+
- ext/Makefile
|
117
|
+
- ext/lib/CompLearnLib
|
118
|
+
- ext/lib/CompLearnLib/CompressionObject.rb
|
119
|
+
- ext/lib/CompLearnLib/CompressionTask.rb
|
120
|
+
- ext/lib/CompLearnLib/FoundComp.rb
|
121
|
+
- ext/lib/CompLearnLib/DistMatrix.rb
|
122
|
+
- ext/lib/CompLearnLib/FoundComp.rb.in
|
123
|
+
- ext/lib/CompLearnLib/Ncd.rb
|
124
|
+
- ext/lib/CompLearnLib/RunEnv.rb
|
125
|
+
- ext/lib/CompLearnLib/Task.rb
|
126
|
+
- ext/lib/CompLearnLib/TaskMaster.rb
|
127
|
+
- ext/lib/CompLearnLib/TaskMasterMPI.rb
|
128
|
+
- ext/lib/CompLearnLib/TaskMasterSingle.rb
|
129
|
+
- ext/lib/CompLearnLib/Tree.rb
|
130
|
+
- ext/lib/CompLearnLib/CLConfig.rb
|
131
|
+
- scripts/CompLearn.iss.in
|
132
|
+
- scripts/debian
|
133
|
+
- scripts/makeSetup.sh.in
|
134
|
+
- scripts/makedeb.zsh.in
|
135
|
+
- scripts/CompLearn.iss
|
136
|
+
- scripts/makeSetup.sh
|
137
|
+
- scripts/makedeb.zsh
|
138
|
+
- scripts/debian/changelog
|
139
|
+
- scripts/debian/control
|
140
|
+
- tests/alltests.rb
|
141
|
+
- tests/bz2test.rb
|
142
|
+
- tests/sshagent-test.rb
|
143
|
+
- tests/tests.rb
|
144
|
+
- confstat5FpLBf/subs.sed
|
145
|
+
- confstat5FpLBf/subs.frag
|
146
|
+
- confstat5FpLBf/subs-1.sed
|
147
|
+
- confstat5FpLBf/subs-2.sed
|
148
|
+
- confstat5FpLBf/undefs.sed
|
149
|
+
- confstat5FpLBf/config.h
|
150
|
+
test_files: []
|
151
|
+
rdoc_options: []
|
152
|
+
extra_rdoc_files: []
|
153
|
+
executables:
|
154
|
+
- ncd
|
155
|
+
- ncdvector
|
156
|
+
- ncdmatrix
|
157
|
+
- maketree
|
158
|
+
- makesvm
|
159
|
+
- labeltree
|
160
|
+
extensions:
|
161
|
+
- ext/extconf.rb
|
162
|
+
requirements:
|
163
|
+
- "Data compressors such as bzip, gzip, or ppmz"
|
164
|
+
dependencies: []
|