ulla 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -0
- data/README.rdoc +1 -1
- data/lib/narray_extensions.rb +9 -6
- data/lib/nmatrix_extensions.rb +10 -8
- data/lib/ulla.rb +1 -1
- data/lib/ulla/cli.rb +372 -274
- data/lib/ulla/environment.rb +8 -4
- data/lib/ulla/environment_class_hash.rb +6 -2
- data/lib/ulla/environment_feature.rb +5 -5
- data/lib/ulla/environment_feature_array.rb +8 -0
- data/script/console +3 -3
- data/ulla.gemspec +2 -2
- metadata +7 -5
data/lib/ulla/environment.rb
CHANGED
@@ -10,21 +10,25 @@ module Ulla
|
|
10
10
|
:smooth_prob_array
|
11
11
|
|
12
12
|
def initialize(number, label, amino_acids = "ACDEFGHIKLMNPQRSTVWYJ".split(''))
|
13
|
-
@amino_acids = amino_acids
|
14
13
|
@number = number
|
15
14
|
@label = label
|
16
|
-
@
|
15
|
+
@amino_acids = amino_acids
|
16
|
+
@freq_array = NArray.float(@amino_acids.size)
|
17
17
|
@prob_array = NArray.float(@amino_acids.size)
|
18
18
|
@logo_array = NArray.float(@amino_acids.size)
|
19
19
|
@smooth_prob_array = NArray.float(@amino_acids.size)
|
20
20
|
end
|
21
21
|
|
22
22
|
def increase_residue_count(a, inc = 1.0)
|
23
|
-
@freq_array[@amino_acids.index(a
|
23
|
+
@freq_array[@amino_acids.index(a)] += inc
|
24
24
|
end
|
25
25
|
|
26
26
|
def label_set
|
27
|
-
|
27
|
+
if $direction == 0
|
28
|
+
label.split("").map_with_index { |l, i| "#{i}#{l}" }.to_set
|
29
|
+
else
|
30
|
+
label.gsub('-', '').split("").map_with_index { |l, i| "#{i}#{l}" }.to_set
|
31
|
+
end
|
28
32
|
end
|
29
33
|
|
30
34
|
def to_s
|
@@ -7,8 +7,12 @@ module Ulla
|
|
7
7
|
|
8
8
|
def groups_sorted_by_residue_labels
|
9
9
|
group_by_non_residue_labels.to_a.sort_by { |env_group|
|
10
|
-
env_group[0].split('').map_with_index { |l, i|
|
11
|
-
$env_features
|
10
|
+
env_group[0].gsub('-', '').split('').map_with_index { |l, i|
|
11
|
+
if i < ($env_features.size - 1)
|
12
|
+
$env_features[i + 1].labels.index(l)
|
13
|
+
else
|
14
|
+
$env_features[i + 2 - $env_features.size].labels.index(l)
|
15
|
+
end
|
12
16
|
}
|
13
17
|
}
|
14
18
|
end
|
@@ -4,11 +4,11 @@ module Ulla
|
|
4
4
|
attr_accessor :name, :symbols, :labels, :constrained, :silent
|
5
5
|
|
6
6
|
def initialize(name, symbols, labels, constrained, silent)
|
7
|
-
@name
|
8
|
-
@symbols
|
9
|
-
@labels
|
10
|
-
@constrained
|
11
|
-
@silent
|
7
|
+
@name = name
|
8
|
+
@symbols = symbols
|
9
|
+
@labels = labels
|
10
|
+
@constrained = constrained
|
11
|
+
@silent = silent
|
12
12
|
end
|
13
13
|
|
14
14
|
def to_s
|
data/script/console
CHANGED
@@ -5,6 +5,6 @@ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
|
5
5
|
libs = " -r irb/completion"
|
6
6
|
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
7
|
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
-
libs << " -r #{File.dirname(__FILE__) + '/../lib/
|
9
|
-
puts "Loading
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/ulla.rb'}"
|
9
|
+
puts "Loading ulla gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/ulla.gemspec
CHANGED
@@ -6,13 +6,13 @@ Gem::Specification.new do |s|
|
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Semin Lee"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-04-16}
|
10
10
|
s.default_executable = %q{ulla}
|
11
11
|
s.description = %q{'ulla' is a program for calculating environment-specific substitution tables from user providing environmental class definitions and sequence alignments with the annotations of the environment classes.}
|
12
12
|
s.email = ["seminlee@gmail.com"]
|
13
13
|
s.executables = ["ulla"]
|
14
14
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "website/index.txt"]
|
15
|
-
s.files = [".autotest", "History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "bin/ulla", "config/website.yml", "config/website.yml.sample", "lib
|
15
|
+
s.files = [".autotest", "History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "bin/ulla", "config/website.yml", "config/website.yml.sample", "lib/math_extensions.rb", "lib/narray_extensions.rb", "lib/nmatrix_extensions.rb", "lib/string_extensions.rb", "lib/ulla.rb", "lib/ulla/cli.rb", "lib/ulla/environment.rb", "lib/ulla/environment_class_hash.rb", "lib/ulla/environment_feature.rb", "lib/ulla/environment_feature_array.rb", "lib/ulla/heatmap_array.rb", "script/console", "script/destroy", "script/generate", "script/txt2html", "test/test_helper.rb", "test/test_math_extensions.rb", "test/test_narray_extensions.rb", "test/test_nmatrix_extensions.rb", "test/test_string_extensions.rb", "test/test_ulla.rb", "test/ulla/test_cli.rb", "test/ulla/test_environment_class_hash.rb", "test/ulla/test_environment_feature.rb", "ulla.gemspec", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.html.erb"]
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.homepage = %q{http://www-cryst.bioc.cam.ac.uk/ulla}
|
18
18
|
s.post_install_message = %q{PostInstall.txt}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ulla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Semin Lee
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-05-30 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -60,7 +60,7 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.
|
63
|
+
version: 1.4.1
|
64
64
|
version:
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: hoe
|
@@ -127,6 +127,8 @@ files:
|
|
127
127
|
- website/template.html.erb
|
128
128
|
has_rdoc: true
|
129
129
|
homepage: http://www-cryst.bioc.cam.ac.uk/ulla
|
130
|
+
licenses: []
|
131
|
+
|
130
132
|
post_install_message: PostInstall.txt
|
131
133
|
rdoc_options:
|
132
134
|
- --main
|
@@ -148,9 +150,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
150
|
requirements: []
|
149
151
|
|
150
152
|
rubyforge_project: ulla
|
151
|
-
rubygems_version: 1.3.
|
153
|
+
rubygems_version: 1.3.3
|
152
154
|
signing_key:
|
153
|
-
specification_version:
|
155
|
+
specification_version: 3
|
154
156
|
summary: "'ulla' is a program for calculating environment-specific substitution tables from user providing environmental class definitions and sequence alignments with the annotations of the environment classes."
|
155
157
|
test_files:
|
156
158
|
- test/test_math_extensions.rb
|