scbi_testcode 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/Manifest.txt +12 -0
- data/PostInstall.txt +7 -0
- data/README.rdoc +62 -0
- data/Rakefile +26 -0
- data/lib/scbi_testcode.rb +8 -0
- data/lib/scbi_testcode/testcode.rb +193 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/test/test_helper.rb +3 -0
- data/test/test_scbi_testcode.rb +49 -0
- metadata +80 -0
data/History.txt
ADDED
data/Manifest.txt
ADDED
data/PostInstall.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
= scbi_testcode
|
2
|
+
|
3
|
+
* http://www.scbi.uma.es/downloads
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
scbi_testcode is a ruby gem that checks if a genetic sequence is coding or not based on the testcode algorithm.
|
8
|
+
|
9
|
+
== FEATURES/PROBLEMS:
|
10
|
+
|
11
|
+
Returns:
|
12
|
+
|
13
|
+
* Testcode algorithm value
|
14
|
+
* Coding conclusion (:coding, :non_coding, :unknown)
|
15
|
+
|
16
|
+
|
17
|
+
== SYNOPSIS:
|
18
|
+
|
19
|
+
Usage:
|
20
|
+
|
21
|
+
s='gcagcccagccaagcactgtacaggaatcctgtgaagcagctccagctatgtgtgaagaagaggacagcactgccttggtgtgtgacaatggctctgggctctgtaaggccggctttgctggggacgatgctcccagggctgttttcccatccattgtgggacgtcccagacatcagggggtgatggtgggaatgggacaaaaagacagctacgtgggtgacgaagcacagagcaaaagaggaatcctgaccctgaagtacccgatagaacatggcatcatcaccaactgggacgacatggaaaagatctggcaccactctttctacaatgagcttcgtgttgcccctgaagagcatcccaccctgctcacggaggcacccctgaaccccaaggccaaccgggagaaaatgactcaaattatgtttgagactttcaatgtcccagccatgtatgtggctatccaggcggtgctgtctctctatgcctctggacgcacaactggcatcgtgctggactctggagatggtgtcacccacaatgtccccatctatgagggctatgccttgccccatgccatcatgcgtctggatctggctggccgagatctcactgactacctcatgaagatcctgactgagcgtggctattccttcgttactactgctgagcgtgagattgtccgggacatcaaggagaaactgtgttatgtagctctggactttgaaaatgagatggccactgccgcatggtcatcctcccttgagaagagttacgagttgcctgatgggcaagtgatcaccatcggaaatgaacgtttccgctgcccagagaccctgttccagccatccttcatcgggatggagtctgctggcatccatgaaaccacctacaacagcatcatgaagtgtgatattgacatcaggaaggacctctatgctaacaatgtcctatcagggggcaccactatgtaccctggcattgccgaccgaatgcagaaggagatcacggccctagcacccagcaccatgaagatcaagatcattgcccctccggagcgcaaatactctgtctggatcggtggctccatcctggcctctctgtccaccttccagcagatgtggatcagcaaacaggaatacgatgaagccgggccttccattgtccaccgcaaatgcttctaaaacactttcctgctcctctctgtctcatgcacacaactgtgaatgtcctgtggaattatgccttcagttcttttccaaatcattcctagccaaagctctgactcgttacctatgtgttttttaataaatctgaaataggctactggt'
|
22
|
+
|
23
|
+
require 'scbi_testcode'
|
24
|
+
|
25
|
+
tc=Testcode.new(s)
|
26
|
+
|
27
|
+
puts tc.testcode_value
|
28
|
+
puts tc.coding_conclusion
|
29
|
+
|
30
|
+
|
31
|
+
== REQUIREMENTS:
|
32
|
+
|
33
|
+
None
|
34
|
+
|
35
|
+
== INSTALL:
|
36
|
+
|
37
|
+
gem install scbi_testcode
|
38
|
+
|
39
|
+
== LICENSE:
|
40
|
+
|
41
|
+
(The MIT License)
|
42
|
+
|
43
|
+
Copyright (c) 2011 Dario Guerrero
|
44
|
+
|
45
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
46
|
+
a copy of this software and associated documentation files (the
|
47
|
+
'Software'), to deal in the Software without restriction, including
|
48
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
49
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
50
|
+
permit persons to whom the Software is furnished to do so, subject to
|
51
|
+
the following conditions:
|
52
|
+
|
53
|
+
The above copyright notice and this permission notice shall be
|
54
|
+
included in all copies or substantial portions of the Software.
|
55
|
+
|
56
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
57
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
58
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
59
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
60
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
61
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
62
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
gem 'hoe', '>= 2.1.0'
|
3
|
+
require 'hoe'
|
4
|
+
require 'fileutils'
|
5
|
+
require './lib/scbi_testcode'
|
6
|
+
|
7
|
+
Hoe.plugin :newgem
|
8
|
+
# Hoe.plugin :website
|
9
|
+
# Hoe.plugin :cucumberfeatures
|
10
|
+
|
11
|
+
# Generate all the Rake tasks
|
12
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
13
|
+
$hoe = Hoe.spec 'scbi_testcode' do
|
14
|
+
self.developer 'Dario Guerrero', 'dariogf@gmail.com'
|
15
|
+
# self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
16
|
+
self.rubyforge_name = self.name # TODO this is default value
|
17
|
+
# self.extra_deps = [['activesupport','>= 2.0.2']]
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'newgem/tasks'
|
22
|
+
Dir['tasks/**/*.rake'].each { |t| load t }
|
23
|
+
|
24
|
+
# TODO - want other tests/tasks run by default? Add them to the list
|
25
|
+
# remove_task :default
|
26
|
+
# task :default => [:spec, :features]
|
@@ -0,0 +1,193 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
class Testcode
|
4
|
+
|
5
|
+
|
6
|
+
attr_accessor :testcode_value,:coding_conclusion
|
7
|
+
|
8
|
+
def initialize(sequence)
|
9
|
+
|
10
|
+
@testcode_value=testcode_calculation(sequence)
|
11
|
+
@coding_conclusion=getConclusion(@testcode_value)
|
12
|
+
end
|
13
|
+
|
14
|
+
def testcode_calculation(sequence)
|
15
|
+
sequence.downcase!
|
16
|
+
basesOne = [0,0,0,0];
|
17
|
+
basesTwo = [0,0,0,0];
|
18
|
+
basesThree = [0,0,0,0];
|
19
|
+
|
20
|
+
#for (j = 0; j < sequence.length; j = j + 3)
|
21
|
+
0.step(sequence.length-1,3) do |j|
|
22
|
+
if (sequence[j].chr == "g")
|
23
|
+
basesOne[0] = basesOne[0] + 1;
|
24
|
+
elsif (sequence[j].chr == "a")
|
25
|
+
basesOne[1] = basesOne[1] + 1;
|
26
|
+
elsif (sequence[j].chr == "t")
|
27
|
+
basesOne[2] = basesOne[2] + 1;
|
28
|
+
elsif (sequence[j].chr == "c")
|
29
|
+
basesOne[3] = basesOne[3] + 1;
|
30
|
+
else
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
#for (j = 1; j < sequence.length; j = j + 3)
|
35
|
+
1.step(sequence.length-1,3) do |j|
|
36
|
+
if (sequence[j].chr == "g")
|
37
|
+
basesTwo[0] = basesTwo[0] + 1;
|
38
|
+
elsif (sequence[j].chr == "a")
|
39
|
+
basesTwo[1] = basesTwo[1] + 1;
|
40
|
+
elsif (sequence[j].chr == "t")
|
41
|
+
basesTwo[2] = basesTwo[2] + 1;
|
42
|
+
elsif (sequence[j].chr == "c")
|
43
|
+
basesTwo[3] = basesTwo[3] + 1;
|
44
|
+
else
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
#for (j = 2; j < sequence.length; j = j + 3)
|
50
|
+
2.step(sequence.length-1,3) do |j|
|
51
|
+
if (sequence[j].chr == "g")
|
52
|
+
basesThree[0] = basesThree[0] + 1;
|
53
|
+
elsif (sequence[j].chr == "a")
|
54
|
+
basesThree[1] = basesThree[1] + 1;
|
55
|
+
elsif (sequence[j].chr == "t")
|
56
|
+
basesThree[2] = basesThree[2] + 1;
|
57
|
+
elsif (sequence[j].chr == "c")
|
58
|
+
basesThree[3] = basesThree[3] + 1;
|
59
|
+
else
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
paramG = calcParam(basesOne[0],basesTwo[0],basesThree[0]);
|
64
|
+
contentG = countBases(basesOne[0],basesTwo[0],basesThree[0]) / sequence.length.to_f;
|
65
|
+
posProbG = usePosParam(paramG,"g");
|
66
|
+
contProbG = useContParam(contentG,"g");
|
67
|
+
paramA = calcParam(basesOne[1],basesTwo[1],basesThree[1]);
|
68
|
+
contentA = countBases(basesOne[1],basesTwo[1],basesThree[1]) / sequence.length.to_f;
|
69
|
+
posProbA = usePosParam(paramA,"a");
|
70
|
+
contProbA = useContParam(contentA,"a");
|
71
|
+
paramT = calcParam(basesOne[2],basesTwo[2],basesThree[2]);
|
72
|
+
contentT = countBases(basesOne[2],basesTwo[2],basesThree[2]) / sequence.length.to_f;
|
73
|
+
posProbT = usePosParam(paramT,"t");
|
74
|
+
contProbT = useContParam(contentT,"t");
|
75
|
+
paramC = calcParam(basesOne[3],basesTwo[3],basesThree[3]);
|
76
|
+
contentC = countBases(basesOne[3],basesTwo[3],basesThree[3]) / sequence.length.to_f;
|
77
|
+
posProbC = usePosParam(paramC,"c");
|
78
|
+
contProbC = useContParam(contentC,"c");
|
79
|
+
valueY = posProbG * 0.31 + contProbG * 0.15 + posProbA * 0.26 + contProbA * 0.11 + posProbT * 0.33 + contProbT * 0.14 + posProbC * 0.18 + contProbC * 0.12;
|
80
|
+
valueY = ((valueY*1000.0).round/1000.0);
|
81
|
+
# return 'The TestCode value is <b>' + valueY.to_s + '</b>, which indicates that the sequence ' + getConclusion(valueY) + '.';
|
82
|
+
return valueY
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
def calcParam (valueOne,valueTwo,valueThree)
|
87
|
+
paramArray = [valueOne,valueTwo,valueThree];
|
88
|
+
paramArray = paramArray.sort#{|a,b| return a-b}#(compareNumbers);
|
89
|
+
paramValue = paramArray[2] / (paramArray[0] + 1.0);
|
90
|
+
#puts paramArray.to_json
|
91
|
+
return paramValue;
|
92
|
+
end
|
93
|
+
|
94
|
+
def countBases (valueOne,valueTwo,valueThree)
|
95
|
+
return valueOne + valueTwo + valueThree;
|
96
|
+
end
|
97
|
+
|
98
|
+
def usePosParam (paramValue,base)
|
99
|
+
arrayOfCodingProb = [];
|
100
|
+
codeProb = 0;
|
101
|
+
if (base == "g")
|
102
|
+
arrayOfCodingProb = [0.08,0.08,0.16,0.27,0.48,0.53,0.64,0.74,0.88,0.90]
|
103
|
+
elsif (base == "a")
|
104
|
+
arrayOfCodingProb = [0.22,0.20,0.34,0.45,0.68,0.58,0.93,0.84,0.68,0.94]
|
105
|
+
elsif (base == "t")
|
106
|
+
arrayOfCodingProb = [0.09,0.09,0.20,0.54,0.44,0.69,0.68,0.91,0.97,0.97]
|
107
|
+
elsif (base == "c")
|
108
|
+
arrayOfCodingProb = [0.23,0.30,0.33,0.51,0.48,0.66,0.81,0.70,0.70,0.80]
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
if (paramValue >= 0 and paramValue < 1.1)
|
113
|
+
codeProb = arrayOfCodingProb[0];
|
114
|
+
elsif (paramValue >=1.1 and paramValue < 1.2)
|
115
|
+
codeProb = arrayOfCodingProb[1];
|
116
|
+
elsif (paramValue >=1.2 and paramValue < 1.3)
|
117
|
+
codeProb = arrayOfCodingProb[2];
|
118
|
+
elsif (paramValue >=1.3 and paramValue < 1.4)
|
119
|
+
codeProb = arrayOfCodingProb[3];
|
120
|
+
elsif (paramValue >=1.4 and paramValue < 1.5)
|
121
|
+
codeProb = arrayOfCodingProb[4];
|
122
|
+
elsif (paramValue >=1.5 and paramValue < 1.6)
|
123
|
+
codeProb = arrayOfCodingProb[5];
|
124
|
+
elsif (paramValue >=1.6 and paramValue < 1.7)
|
125
|
+
codeProb = arrayOfCodingProb[6];
|
126
|
+
elsif (paramValue >=1.7 and paramValue < 1.8)
|
127
|
+
codeProb = arrayOfCodingProb[7];
|
128
|
+
elsif (paramValue >=1.8 and paramValue < 1.9)
|
129
|
+
codeProb = arrayOfCodingProb[8];
|
130
|
+
elsif (paramValue >=1.9)
|
131
|
+
codeProb = arrayOfCodingProb[9];
|
132
|
+
end
|
133
|
+
|
134
|
+
return codeProb;
|
135
|
+
end
|
136
|
+
def useContParam (paramValue,base)
|
137
|
+
arrayOfCodingProb = [];
|
138
|
+
codeProb = 0;
|
139
|
+
if (base == "g")
|
140
|
+
arrayOfCodingProb = [0.29,0.33,0.41,0.41,0.73,0.64,0.64,0.47,0.54,0.40]
|
141
|
+
elsif (base == "a")
|
142
|
+
arrayOfCodingProb = [0.21,0.81,0.65,0.67,0.49,0.62,0.55,0.44,0.49,0.28]
|
143
|
+
elsif (base == "t")
|
144
|
+
arrayOfCodingProb = [0.58,0.51,0.69,0.56,0.75,0.55,0.40,0.39,0.24,0.28]
|
145
|
+
elsif (base == "c")
|
146
|
+
arrayOfCodingProb = [0.31,0.39,0.44,0.43,0.59,0.59,0.64,0.51,0.64,0.82]
|
147
|
+
end
|
148
|
+
|
149
|
+
if (paramValue >= 0 and paramValue < 0.17)
|
150
|
+
codeProb = arrayOfCodingProb[0];
|
151
|
+
elsif (paramValue >=0.17 and paramValue < 0.19)
|
152
|
+
codeProb = arrayOfCodingProb[1];
|
153
|
+
elsif (paramValue >=0.19 and paramValue < 0.21)
|
154
|
+
codeProb = arrayOfCodingProb[2];
|
155
|
+
elsif (paramValue >=0.21 and paramValue < 0.23)
|
156
|
+
codeProb = arrayOfCodingProb[3];
|
157
|
+
elsif (paramValue >=0.23 and paramValue < 0.25)
|
158
|
+
codeProb = arrayOfCodingProb[4];
|
159
|
+
elsif (paramValue >=0.25 and paramValue < 0.27)
|
160
|
+
codeProb = arrayOfCodingProb[5];
|
161
|
+
elsif (paramValue >=0.27 and paramValue < 0.29)
|
162
|
+
codeProb = arrayOfCodingProb[6];
|
163
|
+
elsif (paramValue >=0.29 and paramValue < 0.31)
|
164
|
+
codeProb = arrayOfCodingProb[7];
|
165
|
+
elsif (paramValue >=0.31 and paramValue < 0.33)
|
166
|
+
codeProb = arrayOfCodingProb[8];
|
167
|
+
elsif (paramValue >=0.33)
|
168
|
+
codeProb = arrayOfCodingProb[9];
|
169
|
+
end
|
170
|
+
|
171
|
+
return codeProb;
|
172
|
+
end
|
173
|
+
|
174
|
+
|
175
|
+
def getConclusion (testCode)
|
176
|
+
codeProb = :non_coding;
|
177
|
+
if (testCode < 0.74)
|
178
|
+
codeProb = :non_coding;
|
179
|
+
elsif (testCode >=0.74 and testCode < 0.95)
|
180
|
+
codeProb = :unknown;
|
181
|
+
elsif (testCode >=0.95)
|
182
|
+
codeProb = :coding;
|
183
|
+
end
|
184
|
+
|
185
|
+
return codeProb;
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
end
|
190
|
+
|
191
|
+
#The Sequence Manipulation Suite: TestCode
|
192
|
+
#Results for 1329 residue sequence "sample sequence" starting "gcagcccagc".
|
193
|
+
#The TestCode value is 1.236, which indicates that the sequence is coding.
|
data/script/console
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/console
|
3
|
+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
+
|
5
|
+
libs = " -r irb/completion"
|
6
|
+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/scbi_testcode.rb'}"
|
9
|
+
puts "Loading scbi_testcode gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/destroy'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/generate'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
+
|
3
|
+
class TestScbiTestcode < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def setup
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_coding
|
9
|
+
s='gcagcccagccaagcactgtacaggaatcctgtgaagcagctccagctatgtgtgaagaagaggacagcactgccttggtgtgtgacaatggctctgggctctgtaaggccggctttgctggggacgatgctcccagggctgttttcccatccattgtgggacgtcccagacatcagggggtgatggtgggaatgggacaaaaagacagctacgtgggtgacgaagcacagagcaaaagaggaatcctgaccctgaagtacccgatagaacatggcatcatcaccaactgggacgacatggaaaagatctggcaccactctttctacaatgagcttcgtgttgcccctgaagagcatcccaccctgctcacggaggcacccctgaaccccaaggccaaccgggagaaaatgactcaaattatgtttgagactttcaatgtcccagccatgtatgtggctatccaggcggtgctgtctctctatgcctctggacgcacaactggcatcgtgctggactctggagatggtgtcacccacaatgtccccatctatgagggctatgccttgccccatgccatcatgcgtctggatctggctggccgagatctcactgactacctcatgaagatcctgactgagcgtggctattccttcgttactactgctgagcgtgagattgtccgggacatcaaggagaaactgtgttatgtagctctggactttgaaaatgagatggccactgccgcatggtcatcctcccttgagaagagttacgagttgcctgatgggcaagtgatcaccatcggaaatgaacgtttccgctgcccagagaccctgttccagccatccttcatcgggatggagtctgctggcatccatgaaaccacctacaacagcatcatgaagtgtgatattgacatcaggaaggacctctatgctaacaatgtcctatcagggggcaccactatgtaccctggcattgccgaccgaatgcagaaggagatcacggccctagcacccagcaccatgaagatcaagatcattgcccctccggagcgcaaatactctgtctggatcggtggctccatcctggcctctctgtccaccttccagcagatgtggatcagcaaacaggaatacgatgaagccgggccttccattgtccaccgcaaatgcttctaaaacactttcctgctcctctctgtctcatgcacacaactgtgaatgtcctgtggaattatgccttcagttcttttccaaatcattcctagccaaagctctgactcgttacctatgtgttttttaataaatctgaaataggctactggt'
|
10
|
+
|
11
|
+
tc=Testcode.new(s)
|
12
|
+
|
13
|
+
assert_equal(tc.testcode_value,1.236)
|
14
|
+
assert_equal(tc.coding_conclusion,:coding)
|
15
|
+
|
16
|
+
puts tc.testcode_value
|
17
|
+
puts tc.coding_conclusion
|
18
|
+
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_non_coding
|
23
|
+
|
24
|
+
s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'
|
25
|
+
|
26
|
+
tc=Testcode.new(s)
|
27
|
+
|
28
|
+
assert_equal(tc.testcode_value,0.448)
|
29
|
+
assert_equal(tc.coding_conclusion,:non_coding)
|
30
|
+
|
31
|
+
puts tc.testcode_value
|
32
|
+
puts tc.coding_conclusion
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_unknown
|
37
|
+
s='AAAAATATATATTATATATATATATTATACGCTCTCTCTCTCTCTCTCTCTCTCTTCTCTCTCTCTCCCCCCCCCCCCCCCCCCCCCCCTTTTTTTTTTTTTTTTTTTTTTTTTTAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCCCCCCCCCCCCCCCcccaccctgctcacggaggcacccctgaaccccaaggccaaccgggagaaaatgactcaaattatgtttgagactttcaatgtcccagccatgtatgtggctatccaggcggtgctgtctctctatgcctctggacgcacaactggcatcgtgctggactctggagatggtgtcacccacaatgtccccatctatgagggctatgccttgccccatgccatcatgcgtctggatctggctggccgagatctcactgactacctcatgaagatcctgactgagcgtggctattccttcgttactactgctgagcgtgagattgtccgggacatcaaggagaaactgtgttatgtagctctggactttgaaaatgagatggccactgccgcatggtcatcctcccttgagaagagttacgagttgcctgatgggcaagtgatcaccatcGACCGTTACACTTACGGTATCAGTATGACGTACTACGTACTACTCAGTACGTCAGTAGCTACGGTACGTACGTAGCTACGTACGTACGTAGCGTACGTATAGCGTACGTACATTC'
|
38
|
+
|
39
|
+
tc=Testcode.new(s)
|
40
|
+
|
41
|
+
assert_equal(tc.testcode_value,0.926)
|
42
|
+
assert_equal(tc.coding_conclusion,:unknown)
|
43
|
+
|
44
|
+
puts tc.testcode_value
|
45
|
+
puts tc.coding_conclusion
|
46
|
+
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scbi_testcode
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Dario Guerrero
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2012-07-02 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hoe
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.8.0
|
24
|
+
type: :development
|
25
|
+
version_requirements: *id001
|
26
|
+
description: scbi_testcode is a ruby gem that checks if a genetic sequence is coding or not based on the testcode algorithm.
|
27
|
+
email:
|
28
|
+
- dariogf@gmail.com
|
29
|
+
executables: []
|
30
|
+
|
31
|
+
extensions: []
|
32
|
+
|
33
|
+
extra_rdoc_files:
|
34
|
+
- History.txt
|
35
|
+
- Manifest.txt
|
36
|
+
- PostInstall.txt
|
37
|
+
files:
|
38
|
+
- History.txt
|
39
|
+
- Manifest.txt
|
40
|
+
- PostInstall.txt
|
41
|
+
- README.rdoc
|
42
|
+
- Rakefile
|
43
|
+
- lib/scbi_testcode.rb
|
44
|
+
- lib/scbi_testcode/testcode.rb
|
45
|
+
- script/console
|
46
|
+
- script/destroy
|
47
|
+
- script/generate
|
48
|
+
- test/test_helper.rb
|
49
|
+
- test/test_scbi_testcode.rb
|
50
|
+
homepage: http://www.scbi.uma.es/downloads
|
51
|
+
licenses: []
|
52
|
+
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options:
|
55
|
+
- --main
|
56
|
+
- README.rdoc
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: "0"
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: "0"
|
71
|
+
requirements: []
|
72
|
+
|
73
|
+
rubyforge_project: scbi_testcode
|
74
|
+
rubygems_version: 1.8.24
|
75
|
+
signing_key:
|
76
|
+
specification_version: 3
|
77
|
+
summary: scbi_testcode is a ruby gem that checks if a genetic sequence is coding or not based on the testcode algorithm.
|
78
|
+
test_files:
|
79
|
+
- test/test_helper.rb
|
80
|
+
- test/test_scbi_testcode.rb
|