isoelectric_point 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/isoelectric_point/data.rb +56 -0
- data/test/extensions_test.rb +17 -0
- data/test/test_helper.rb +4 -0
- metadata +8 -3
@@ -0,0 +1,56 @@
|
|
1
|
+
module IsoelectricPoint
|
2
|
+
module Data
|
3
|
+
PKAS = {
|
4
|
+
'dtaselect' => { "N_TERMINUS" => 8.0,
|
5
|
+
"K" => 10.0,
|
6
|
+
"R" => 12.0,
|
7
|
+
"H" => 6.5,
|
8
|
+
"C_TERMINUS" => 3.1,
|
9
|
+
"D" => 4.4,
|
10
|
+
"E" => 4.4,
|
11
|
+
"C" => 8.5,
|
12
|
+
"Y" => 10.0
|
13
|
+
}.freeze,
|
14
|
+
'emboss' => { "N_TERMINUS" => 8.0,
|
15
|
+
"K" => 10.0,
|
16
|
+
"R" => 12.0,
|
17
|
+
"H" => 6.5,
|
18
|
+
"C_TERMINUS" => 3.1,
|
19
|
+
"D" => 4.4,
|
20
|
+
"E" => 4.4,
|
21
|
+
"C" => 8.5,
|
22
|
+
"Y" => 10.0
|
23
|
+
}.freeze,
|
24
|
+
'rodwell' => { "N_TERMINUS" => 8.0,
|
25
|
+
"K" => 11.5,
|
26
|
+
"R" => 11.5,
|
27
|
+
"H" => 6.0,
|
28
|
+
"C_TERMINUS" => 3.1,
|
29
|
+
"D" => 3.68,
|
30
|
+
"E" => 4.25,
|
31
|
+
"C" => 8.33,
|
32
|
+
"Y" => 10.07
|
33
|
+
}.freeze,
|
34
|
+
'wikipedia' => { "N_TERMINUS" => 8.2,
|
35
|
+
"K" => 10.54,
|
36
|
+
"R" => 12.48,
|
37
|
+
"H" => 6.04,
|
38
|
+
"C_TERMINUS" => 3.65,
|
39
|
+
"D" => 3.9,
|
40
|
+
"E" => 4.07,
|
41
|
+
"C" => 8.18,
|
42
|
+
"Y" => 10.47
|
43
|
+
}.freeze,
|
44
|
+
'silerio' => { "N_TERMINUS" => 8.2,
|
45
|
+
"K" => 10.4,
|
46
|
+
"R" => 12.0,
|
47
|
+
"H" => 6.4,
|
48
|
+
"C_TERMINUS" => 3.2,
|
49
|
+
"D" => 4.0,
|
50
|
+
"E" => 4.5,
|
51
|
+
"C" => 9.0,
|
52
|
+
"Y" => 10.0
|
53
|
+
}.freeze
|
54
|
+
}.freeze
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
class ExtensionsTest < Test::Unit::TestCase
|
3
|
+
context 'float' do
|
4
|
+
setup do
|
5
|
+
@float = 1.123456789
|
6
|
+
end
|
7
|
+
should 'round of at 0' do
|
8
|
+
assert_equal 1, @float.round_to_places(0)
|
9
|
+
end
|
10
|
+
should 'round of at 1' do
|
11
|
+
assert_equal 1.1, @float.round_to_places(1)
|
12
|
+
end
|
13
|
+
should 'round of at 2' do
|
14
|
+
assert_equal 1.12, @float.round_to_places(2)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isoelectric_point
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- GeorgeR
|
@@ -60,9 +60,12 @@ files:
|
|
60
60
|
- LICENSE
|
61
61
|
- README.rdoc
|
62
62
|
- lib/isoelectric_point.rb
|
63
|
+
- lib/isoelectric_point/data.rb
|
63
64
|
- lib/isoelectric_point/extensions.rb
|
64
65
|
- lib/isoelectric_point/sequence.rb
|
65
66
|
- test/sequence_test.rb
|
67
|
+
- test/extensions_test.rb
|
68
|
+
- test/test_helper.rb
|
66
69
|
has_rdoc: true
|
67
70
|
homepage: http://github.com/simplificator/isoelectric_point
|
68
71
|
licenses: []
|
@@ -99,3 +102,5 @@ specification_version: 3
|
|
99
102
|
summary: Calculate isoelectric point. Based on code frmo GeorgeR. We just took it and made a gem of it.
|
100
103
|
test_files:
|
101
104
|
- test/sequence_test.rb
|
105
|
+
- test/extensions_test.rb
|
106
|
+
- test/test_helper.rb
|