ulla 0.9.9.1 → 0.9.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/History.txt +1 -1
- data/Manifest.txt +4 -0
- data/PostInstall.txt +1 -1
- data/README.rdoc +6 -7
- data/Rakefile +2 -2
- data/lib/narray_extensions.rb +0 -3
- data/lib/nmatrix_extensions.rb +0 -11
- data/lib/ulla.rb +45 -1
- data/lib/ulla/cli.rb +192 -89
- data/lib/ulla/esst.rb +32 -0
- data/lib/ulla/essts.rb +84 -0
- data/lib/ulla/heatmap_array.rb +0 -12
- data/lib/ulla/joy_tem.rb +63 -0
- data/lib/ulla/sequence.rb +7 -0
- data/script/txt2html +5 -5
- data/ulla.gemspec +3 -3
- data/website/index.html +286 -19
- data/website/stylesheets/screen.css +80 -81
- metadata +109 -71
data/lib/ulla/esst.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module Ulla
|
2
|
+
class Esst
|
3
|
+
|
4
|
+
attr_accessor :type, :label, :no, :colnames, :rownames, :matrix
|
5
|
+
|
6
|
+
def initialize(type, label, no, colnames=[], rownames=[], matrix = nil)
|
7
|
+
@type = type
|
8
|
+
@label = label
|
9
|
+
@no = no
|
10
|
+
@colnames = colnames
|
11
|
+
@rownames = rownames
|
12
|
+
@matrix = matrix
|
13
|
+
end
|
14
|
+
|
15
|
+
def scores_from(aa)
|
16
|
+
i = colnames.index(aa)
|
17
|
+
@matrix[i, 0..-1]
|
18
|
+
end
|
19
|
+
|
20
|
+
def scores_to(aa)
|
21
|
+
j = rownames.index(aa)
|
22
|
+
@matrix[0..-1, j]
|
23
|
+
end
|
24
|
+
|
25
|
+
def score(from_aa, to_aa)
|
26
|
+
i = colnames.index(from_aa)
|
27
|
+
j = rownames.index(to_aa)
|
28
|
+
@matrix[i, j]
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
data/lib/ulla/essts.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
module Ulla
|
2
|
+
class Essts
|
3
|
+
|
4
|
+
attr_reader :file, :type, :aa_symbols,
|
5
|
+
:environments, :essts, :total_table,
|
6
|
+
:number_of_environments, :number_of_alignments
|
7
|
+
|
8
|
+
def initialize(file, type = :logo)
|
9
|
+
@file = file
|
10
|
+
@type = type
|
11
|
+
@environments = []
|
12
|
+
@essts = []
|
13
|
+
@total_table = nil
|
14
|
+
parse_tag = nil
|
15
|
+
|
16
|
+
IO.readlines(@file).each_with_index do |line, li|
|
17
|
+
line.chomp!
|
18
|
+
if line =~ /^#\s+(ACDEFGHIKLMNPQRSTV\w+)/
|
19
|
+
@aa_symbols = $1.split('')
|
20
|
+
elsif line =~ /^#\s+(.*;\w+;\w+;[T|F];[T|F])/
|
21
|
+
elems = $1.split(';')
|
22
|
+
@environments << (env = OpenStruct.new)
|
23
|
+
@environments[-1].name = elems[0]
|
24
|
+
@environments[-1].values = elems[1].split('')
|
25
|
+
@environments[-1].labels = elems[2].split('')
|
26
|
+
@environments[-1].constraind = elems[3] == 'T' ? true : false
|
27
|
+
@environments[-1].silent = elems[4] == 'T' ? true : false
|
28
|
+
elsif line =~ /^#\s+Total\s+number\s+of\s+environments:\s+(\d+)/
|
29
|
+
@number_of_environments = Integer($1)
|
30
|
+
elsif line =~ /^#\s+Number\s+of\s+alignments:\s+(\d+)/
|
31
|
+
@number_of_alignments = Integer($1)
|
32
|
+
elsif line =~ /^#/ # skip other comments!
|
33
|
+
next
|
34
|
+
elsif line =~ /^>Total/i
|
35
|
+
@total_table = Esst.new(type, 'total', @essts.size, @aa_symbols)
|
36
|
+
parse_tag = :tot_row
|
37
|
+
elsif line =~ /^>Total\s+(\S+)/i
|
38
|
+
@total_table = Esst.new(type, 'total', Integer($1), @aa_symbols)
|
39
|
+
parse_tag = :tot_row
|
40
|
+
elsif line =~ /^>(\S+)\s+(\S+)/
|
41
|
+
break if parse_tag == :tot_row
|
42
|
+
@essts << Esst.new(type, $1, Integer($2), @aa_symbols)
|
43
|
+
parse_tag = :esst_row
|
44
|
+
elsif line =~ /^(\S+)\s+(\S+.*)$/ && (parse_tag == :esst_row || parse_tag == :tot_row)
|
45
|
+
row_name = $1
|
46
|
+
row_values = $2.strip.split(/\s+/).map { |v| Float(v) }
|
47
|
+
if parse_tag == :esst_row
|
48
|
+
@essts[-1].rownames << row_name
|
49
|
+
@essts[-1].matrix = NMatrix[*(@essts[-1].matrix.to_a << row_values)]
|
50
|
+
elsif parse_tag == :tot_row
|
51
|
+
@total_table.rownames << row_name
|
52
|
+
@total_table.matrix = NMatrix[*(@total_table.matrix.to_a << row_values)]
|
53
|
+
else
|
54
|
+
$logger.error "Something wrong at line #{li}: #{line}"
|
55
|
+
exit 1
|
56
|
+
end
|
57
|
+
else
|
58
|
+
raise "Something wrong at line, #{li}: #{line}"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def colnames
|
64
|
+
@essts[0].colnames
|
65
|
+
end
|
66
|
+
|
67
|
+
def rownames
|
68
|
+
@essts[0].rownames
|
69
|
+
end
|
70
|
+
|
71
|
+
def [](index)
|
72
|
+
case index
|
73
|
+
when Integer
|
74
|
+
@essts[index]
|
75
|
+
when String
|
76
|
+
@essts.find { |e| e.label == index }
|
77
|
+
else
|
78
|
+
$logger.error "#{index} is not available for indexing ESSTs"
|
79
|
+
exit
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
end
|
data/lib/ulla/heatmap_array.rb
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'RMagick'
|
5
|
-
include Magick
|
6
|
-
rescue Exception => e
|
7
|
-
$logger.warn "#{e.to_s.chomp} For this reason, heat maps cannot be generated."
|
8
|
-
$no_rmagick = true
|
9
|
-
end
|
10
|
-
|
11
|
-
|
12
|
-
|
13
1
|
module Ulla
|
14
2
|
class HeatmapArray < Array
|
15
3
|
|
data/lib/ulla/joy_tem.rb
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
module Ulla
|
2
|
+
class JoyTem
|
3
|
+
|
4
|
+
attr_reader :file, :entries
|
5
|
+
|
6
|
+
def initialize(file)
|
7
|
+
@file = file
|
8
|
+
io = File.exist?(file) ? File.open(file, 'r') : StringIO.new(file)
|
9
|
+
@entries = {}
|
10
|
+
ent_code = nil
|
11
|
+
ent_desc = nil
|
12
|
+
ent_data = nil
|
13
|
+
parse_tag = nil
|
14
|
+
|
15
|
+
io.each_with_index do |line, li|
|
16
|
+
line.chomp!
|
17
|
+
if line =~ /^#/ || line =~ /^\s*$/
|
18
|
+
next
|
19
|
+
elsif line =~ /^>\S+;(\S+)/
|
20
|
+
parse_tag = :desc
|
21
|
+
ent_code = $1
|
22
|
+
@entries[ent_code] = {} unless @entries.has_key?(ent_code)
|
23
|
+
elsif line =~ /^(\S+.*)/ && parse_tag == :desc
|
24
|
+
parse_tag = :data
|
25
|
+
ent_desc = $1.strip
|
26
|
+
@entries[ent_code][ent_desc] = ''
|
27
|
+
elsif line =~ /^\s*(\S+.*)/ && parse_tag == :data
|
28
|
+
ent_data = $1.strip.gsub('*', '')
|
29
|
+
@entries[ent_code][ent_desc] += ent_data
|
30
|
+
else
|
31
|
+
$logger.error "Cannot parse line #{li+1}: #{line}"
|
32
|
+
exit 1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def entry_codes
|
38
|
+
@entries.keys
|
39
|
+
end
|
40
|
+
|
41
|
+
def entry_descriptions
|
42
|
+
@entries[entry_codes[0]].keys
|
43
|
+
end
|
44
|
+
|
45
|
+
def alignment_length
|
46
|
+
@entries[entry_codes[0]][entry_descriptions[0]].length
|
47
|
+
end
|
48
|
+
|
49
|
+
def sequences
|
50
|
+
seqs = []
|
51
|
+
@entries.keys.each do |code|
|
52
|
+
if @entries[code].has_key?('sequence')
|
53
|
+
seqs << Sequence.new(@entries[code]['sequence'], code)
|
54
|
+
else
|
55
|
+
$logger.error "Cannot find 'sequence' data for #{code} in JOY template: #{@file}"
|
56
|
+
exit 1
|
57
|
+
end
|
58
|
+
end
|
59
|
+
seqs
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
data/script/txt2html
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
load File.dirname(__FILE__) + "/../Rakefile"
|
4
|
-
require 'rubyforge'
|
4
|
+
#require 'rubyforge'
|
5
5
|
require 'redcloth'
|
6
6
|
require 'syntax/convertors/html'
|
7
7
|
require 'erb'
|
8
8
|
|
9
|
-
download = "http://rubyforge.org/projects/#{$hoe.rubyforge_name}"
|
9
|
+
#download = "http://rubyforge.org/projects/#{$hoe.rubyforge_name}"
|
10
10
|
version = $hoe.version
|
11
11
|
|
12
|
-
def rubyforge_project_id
|
13
|
-
RubyForge.new.configure.autoconfig["group_ids"][$hoe.rubyforge_name]
|
14
|
-
end
|
12
|
+
#def rubyforge_project_id
|
13
|
+
#RubyForge.new.configure.autoconfig["group_ids"][$hoe.rubyforge_name]
|
14
|
+
#end
|
15
15
|
|
16
16
|
class Fixnum
|
17
17
|
def ordinal
|
data/ulla.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{ulla}
|
5
|
-
s.version = "0.9.9.
|
5
|
+
s.version = "0.9.9.2"
|
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"]
|
@@ -12,12 +12,12 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.email = ["seminlee@gmail.com"]
|
13
13
|
s.executables = ["ulla"]
|
14
14
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "website/index.txt"]
|
15
|
-
s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "bin/ulla", "config/website.yml", "config/website.yml.sample", "lib/array_extensions.rb", "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"]
|
15
|
+
s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "bin/ulla", "config/website.yml", "config/website.yml.sample", "lib/array_extensions.rb", "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", "lib/ulla/esst.rb", "lib/ulla/essts.rb", "lib/ulla/joy_tem.rb", "lib/ulla/sequence.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.homepage = %q{http://www-cryst.bioc.cam.ac.uk/ulla}
|
17
17
|
s.post_install_message = %q{PostInstall.txt}
|
18
18
|
s.rdoc_options = ["--main", "README.rdoc"]
|
19
19
|
s.require_paths = ["lib"]
|
20
|
-
s.rubyforge_project = %q{ulla}
|
20
|
+
#s.rubyforge_project = %q{ulla}
|
21
21
|
s.rubygems_version = %q{1.3.5}
|
22
22
|
s.summary = %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.}
|
23
23
|
s.test_files = ["test/test_math_extensions.rb", "test/test_narray_extensions.rb", "test/test_nmatrix_extensions.rb", "test/test_string_extensions.rb", "test/ulla/test_cli.rb", "test/ulla/test_environment_class_hash.rb", "test/ulla/test_environment_feature.rb", "test/test_helper.rb", "test/test_ulla.rb"]
|
data/website/index.html
CHANGED
@@ -1,26 +1,293 @@
|
|
1
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
<head>
|
5
|
+
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>
|
8
|
+
ULLA
|
9
|
+
</title>
|
10
|
+
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
+
<style>
|
12
|
+
|
13
|
+
</style>
|
14
|
+
<script type="text/javascript">
|
15
|
+
window.onload = function() {
|
16
|
+
settings = {
|
17
|
+
tl: { radius: 10 },
|
18
|
+
tr: { radius: 10 },
|
19
|
+
bl: { radius: 10 },
|
20
|
+
br: { radius: 10 },
|
21
|
+
antiAlias: true,
|
22
|
+
autoPad: true,
|
23
|
+
validTags: ["div"]
|
24
|
+
}
|
25
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
26
|
+
versionBox.applyCornersToAll();
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
<script type="text/javascript">
|
30
|
+
var _gaq = _gaq || [];
|
31
|
+
_gaq.push(['_setAccount', 'UA-7633498-1']);
|
32
|
+
_gaq.push(['_trackPageview']);
|
33
|
+
|
34
|
+
(function() {
|
35
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
36
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
37
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
38
|
+
})();
|
39
|
+
</script>
|
9
40
|
</head>
|
10
41
|
<body>
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
42
|
+
<div id="main">
|
43
|
+
<h1>ULLA</h1>
|
44
|
+
<hr />
|
45
|
+
<div class="sidebar">
|
46
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubygems.org/gems/ulla"; return false'>
|
47
|
+
<p>Get Version</p>
|
48
|
+
<a href="http://rubygems.org/gems/ulla" class="numbers">0.9.9.1</a>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
<h2>* Description</h2>
|
52
|
+
<p>‘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.</p>
|
53
|
+
<h2>* Features</h2>
|
54
|
+
<ul>
|
55
|
+
<li>Environment-specific substitution table generation based on user providing environmental class definition</li>
|
56
|
+
<li>Entropy-based smoothing procedures to cope with sparse data problem</li>
|
57
|
+
<li><span class="caps">BLOSUM</span>-like weighting procedures using <span class="caps">PID</span> threshold</li>
|
58
|
+
<li>Heat Map generation for substitution tables</li>
|
59
|
+
</ul>
|
60
|
+
<h2>* Requirements</h2>
|
61
|
+
<ul>
|
62
|
+
<li>ruby 1.9.1 or above (<a href="http://www.ruby-lang.org">http://www.ruby-lang.org</a>)</li>
|
63
|
+
<li>rubygems 1.3.4 or above (<a href="http://rubygems.org/">http://rubygems.org/</a>)</li>
|
64
|
+
</ul>
|
65
|
+
<p>Following RubyGems will be automatically installed if you have rubygems installed on your machine</p>
|
66
|
+
<ul>
|
67
|
+
<li><a href="http://narray.rubyforge.org">narray</a></li>
|
68
|
+
<li><a href="http://bioruby.open-bio.org">bio</a></li>
|
69
|
+
<li><a href="http://rmagick.rubyforge.org">RMagick</a></li>
|
70
|
+
</ul>
|
71
|
+
<h2>* Installation</h2>
|
72
|
+
<pre>
|
73
|
+
~user $ sudo gem install ulla
|
74
|
+
</pre>
|
75
|
+
<h2>* Basic Usage</h2>
|
76
|
+
<p>It’s pretty much the same as Kenji’s <a href="http://mordred.bioc.cam.ac.uk/~kenji/subst/">subst</a>, so in most cases, you can swap ‘subst’ with ‘ulla’.</p>
|
77
|
+
<pre>
|
78
|
+
~user $ ulla -l TEMLIST-file -c classdef.dat
|
79
|
+
or
|
80
|
+
~user $ ulla -f TEM-file -c classdef.dat
|
81
|
+
</pre>
|
82
|
+
<h2>* Options</h2>
|
83
|
+
<pre>
|
84
|
+
--tem-file (-f) FILE: a tem file
|
85
|
+
--tem-list (-l) FILE: a list for tem files
|
86
|
+
--classdef (-c) FILE: a file for the defintion of environmental class
|
87
|
+
if no definition file provided, --cys (-y) 2 and --nosmooth options automatcially applied
|
88
|
+
--outfile (-o) FILE: output filename (default 'allmat.dat')
|
89
|
+
--weight (-w) INTEGER: clustering level (PID) for the BLOSUM-like weighting (default: 60)
|
90
|
+
--noweight: calculate substitution counts with no weights
|
91
|
+
--environment (-e) INTEGER:
|
92
|
+
0 for considering only substituted amino acids' environments (default)
|
93
|
+
1 for considering both substituted and substituting amino acids' environments
|
94
|
+
--smooth (-s) INTEGER:
|
95
|
+
0 for partial smoothing (default)
|
96
|
+
1 for full smoothing
|
97
|
+
--p1smooth: perform smoothing for p1 probability calculation when partial smoothing
|
98
|
+
--nosmooth: perform no smoothing operation
|
99
|
+
--cys (-y) INTEGER:
|
100
|
+
0 for using C and J only for structure (default)
|
101
|
+
1 for both structure and sequence
|
102
|
+
2 for using only C for both (must be set when you have no 'disulphide' or 'disulfide' annotation in templates)
|
103
|
+
--output INTEGER:
|
104
|
+
0 for raw counts (no smoothing performed)
|
105
|
+
1 for probabilities
|
106
|
+
2 for log-odds (default)
|
107
|
+
--noroundoff: do not round off log odds ratio
|
108
|
+
--scale INTEGER: log-odds matrices in 1/n bit units (default 3)
|
109
|
+
--sigma DOUBLE: change the sigma value for smoothing (default 5.0)
|
110
|
+
--autosigma: automatically adjust the sigma value for smoothing
|
111
|
+
--add DOUBLE: add this value to raw counts when deriving log-odds without smoothing (default 0)
|
112
|
+
--pidmin DOUBLE: count substitutions only for pairs with PID equal to or greater than this value (default none)
|
113
|
+
--pidmax DOUBLE: count substitutions only for pairs with PID smaller than this value (default none)
|
114
|
+
--heatmap INTEGER:
|
115
|
+
0 create a heat map file for each substitution table
|
116
|
+
1 create one big file containing all heat maps from substitution tables
|
117
|
+
2 do both 0 and 1
|
118
|
+
--heatmap-format INTEGER:
|
119
|
+
0 for Portable Network Graphics (PNG) Format (default)
|
120
|
+
1 for Graphics Interchange Format (GIF)
|
121
|
+
2 for Joint Photographic Experts Group (JPEG) Format
|
122
|
+
3 for Microsoft Windows bitmap (BMP) Format
|
123
|
+
4 for Portable Document Format (PDF)
|
124
|
+
--heatmap-columns INTEGER: number of tables to print in a row when --heatmap 1 or 2 set (default: sqrt(no. of tables))
|
125
|
+
--heatmap-stem STRING: stem for a file name when --heatmap 1 or 2 set (default: 'heatmap')
|
126
|
+
--heatmap-values: print values in the cells when generating heat maps
|
127
|
+
--verbose (-v) INTEGER
|
128
|
+
0 for ERROR level
|
129
|
+
1 for WARN or above level (default)
|
130
|
+
2 for INFO or above level
|
131
|
+
3 for DEBUG or above level
|
132
|
+
--version: print version
|
133
|
+
--help (-h): show help
|
134
|
+
</pre>
|
135
|
+
<h2>* Usage</h2>
|
136
|
+
<p>1. Prepare an environmental class definition file. For more details, please check this <a href="http://mordred.bioc.cam.ac.uk/~kenji/subst/NOTES">notes</a>. You can download a sample environmental class definition file from <a href="http://mordred.bioc.cam.ac.uk/~kenji/subst/classdef.dat">here</a>.</p>
|
137
|
+
<pre>
|
138
|
+
~user $ cat classdef.dat
|
139
|
+
#
|
140
|
+
# name of feature (string); values adopted in .tem file (string); class labels assigned for each value (string);
|
141
|
+
# constrained or not (T or F); silent (used as masks)? (T or F)
|
142
|
+
#
|
143
|
+
secondary structure and phi angle;HEPC;HEPC;T;F
|
144
|
+
solvent accessibility;TF;Aa;F;F
|
145
|
+
</pre>
|
146
|
+
<p>2. Prepare structural alignments and their annotations of above environmental classes in <span class="caps">PIR</span> format. You can download sample alignments from <a href="http://mordred.bioc.cam.ac.uk/~kenji/subst/alltem-allmask.tar.gz">http://mordred.bioc.cam.ac.uk/~kenji/subst/alltem-allmask.tar.gz</a> or <a href="http://www-cryst.bioc.cam.ac.uk/ESST">http://www-cryst.bioc.cam.ac.uk/ESST</a></p>
|
147
|
+
<pre>
|
148
|
+
~user $ cat sample1.tem
|
149
|
+
>P1;1mnma
|
150
|
+
sequence
|
151
|
+
QKERRKIEIKFIENKTRRHVTFSKRKHGIMKKAFELSVLTGTQVLLLVVSETGLVYTFSTPKFEPIVTQQEGRNL
|
152
|
+
IQACLNAPDD*
|
153
|
+
>P1;1egwa
|
154
|
+
sequence
|
155
|
+
--GRKKIQITRIMDERNRQVTFTKRKFGLMKKAYELSVLCDCEIALIIFNSSNKLFQYASTDMDKVLLKYTEY--
|
156
|
+
----------*
|
157
|
+
>P1;1mnma
|
158
|
+
secondary structure and phi angle
|
159
|
+
CPCCCCCCCCCCCCHHHHHHHHHHHHHHHHHHHHHHHHHHPCCCEEEEECCCPCEEEEECCCCCHHHHCHHHHHH
|
160
|
+
HHHHHCCCCP*
|
161
|
+
>P1;1egwa
|
162
|
+
secondary structure and phi angle
|
163
|
+
--CCCCCCCCCCCCHHHHHHHHHHHHHHHHHHHHHHHHHCPCCCEEEEECCCPCEEEEECCCHHHHHHHHHHC--
|
164
|
+
----------*
|
165
|
+
>P1;1mnma
|
166
|
+
solvent accessibility
|
167
|
+
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTFTTTTTTTTTTTTTTTT
|
168
|
+
TTTTTTTTTT*
|
169
|
+
>P1;1egwa
|
170
|
+
solvent accessibility
|
171
|
+
--TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTFTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT--
|
172
|
+
----------*
|
173
|
+
...
|
174
|
+
</pre>
|
175
|
+
<p>3. When you have two or more alignment files, you should make a separate file containing all the paths for the alignment files.</p>
|
176
|
+
<pre>
|
177
|
+
~user $ ls -1 *.tem > TEMLIST
|
178
|
+
~user $ cat TEMLIST
|
179
|
+
sample1.tem
|
180
|
+
sample2.tem
|
181
|
+
...
|
182
|
+
</pre>
|
183
|
+
<p>4. To produce substitution count matrices,</p>
|
184
|
+
<pre>
|
185
|
+
~user $ ulla -l TEMLIST --output 0 -o substcount.mat
|
186
|
+
</pre>
|
187
|
+
<p>5. To produce substitution probability matrices,</p>
|
188
|
+
<pre>
|
189
|
+
~user $ ulla -l TEMLIST --output 1 -o substprob.mat
|
190
|
+
</pre>
|
191
|
+
<p>6. To produce log odds ratio matrices,</p>
|
192
|
+
<pre>
|
193
|
+
~user $ ulla -l TEMLIST --output 2 -o substlogo.mat
|
194
|
+
</pre>
|
195
|
+
<p>7. To produce substitution probability matrices from the sequence pairs within a certain <span class="caps">PID</span> range (if you don’t provide any name for output, ‘allmat.dat’ will be used.),</p>
|
196
|
+
<pre>
|
197
|
+
~user $ ulla -l TEMLIST --pidmin 60 --pidmax 80 --output 1
|
198
|
+
</pre>
|
199
|
+
<p>8. To change the clustering level (default 60) to <span class="caps">PID</span> 80,</p>
|
200
|
+
<pre>
|
201
|
+
~user $ ulla -l TEMLIST --weight 80 --output 1
|
202
|
+
</pre>
|
203
|
+
<p>9. In case positions are masked with the character ‘X’ in any environmental features, all mutations from/to the position will be excluded from substitution counts.</p>
|
204
|
+
<p>10. Then, it will produce a file containing all the matrices, which will look like the one below. For more details, please check this <a href="http://mordred.bioc.cam.ac.uk/~kenji/subst/NOTES">notes</a>.</p>
|
205
|
+
<pre>
|
206
|
+
# Environment-specific amino acid substitution matrices
|
207
|
+
# Creator: ulla version 0.0.5
|
208
|
+
# Creation Date: 05/02/2009 17:29
|
209
|
+
#
|
210
|
+
# Definitions for structural environments:
|
211
|
+
# 2 features used
|
212
|
+
#
|
213
|
+
# secondary structure and phi angle;HEPC;HEPC;F;F
|
214
|
+
# solvent accessibility;TF;Aa;F;F
|
215
|
+
# (read in from classdef.dat)
|
216
|
+
#
|
217
|
+
# Number of alignments: 1187
|
218
|
+
# (list of .tem files read in from TEMLIST)
|
219
|
+
#
|
220
|
+
# Total number of environments: 8
|
221
|
+
#
|
222
|
+
# There are 21 amino acids considered.
|
223
|
+
# ACDEFGHIKLMNPQRSTVWYJ
|
224
|
+
#
|
225
|
+
# C: Cystine (the disulfide-bonded form)
|
226
|
+
# J: Cysteine (the free thiol form)
|
227
|
+
#
|
228
|
+
# Weighting scheme: clustering at PID 60 level
|
229
|
+
# ...
|
230
|
+
#
|
231
|
+
>HA 0
|
232
|
+
# A C D E F G H I K L M N P Q R S T V W Y J
|
233
|
+
A 3 -5 0 0 -1 2 0 0 1 0 0 0 1 1 0 1 1 1 -1 0 2
|
234
|
+
C -16 19 -16 -18 -11 -14 -13 -13 -14 -14 -14 -11 -17 -16 -13 -16 -14 -12 -12 -10 -4
|
235
|
+
D 1 -7 6 3 -3 1 0 -3 1 -3 -2 2 1 2 0 1 0 -2 -3 -2 -2
|
236
|
+
E 3 -7 5 7 -1 2 2 0 3 0 0 3 2 4 3 3 2 1 -1 0 -1
|
237
|
+
F -4 -4 -6 -6 7 -5 -1 0 -4 1 0 -5 -5 -4 -4 -4 -3 -1 3 3 0
|
238
|
+
G -2 -6 -3 -4 -5 5 -4 -5 -4 -5 -4 -2 -3 -4 -4 -2 -3 -5 -6 -4 -3
|
239
|
+
H 0 -6 0 0 1 0 8 -1 0 0 0 1 -2 1 1 0 0 0 1 3 0
|
240
|
+
I -3 -7 -6 -5 0 -5 -3 4 -4 1 1 -5 -4 -4 -3 -5 -2 2 -2 -1 0
|
241
|
+
K 2 -6 2 2 -1 1 2 0 5 1 1 2 0 3 4 2 2 0 -2 0 -1
|
242
|
+
L -2 -6 -5 -4 1 -4 -2 2 -3 4 2 -3 -4 -3 -2 -4 -2 1 0 0 1
|
243
|
+
M -2 -7 -4 -3 1 -2 -1 2 -2 2 6 -3 -4 -2 -1 -2 -1 1 0 0 1
|
244
|
+
N 0 -5 1 0 -3 1 1 -3 0 -2 -2 6 -2 0 0 1 1 -2 -3 -1 -1
|
245
|
+
P -1 -7 -1 -2 -4 -1 -3 -3 -2 -3 -4 -2 9 -2 -3 0 -1 -2 -4 -4 -4
|
246
|
+
Q 2 -7 2 2 -1 1 2 -1 2 0 0 2 0 5 2 1 1 0 -2 -1 0
|
247
|
+
R 1 -6 1 1 -1 0 2 0 3 0 1 1 -1 2 6 1 1 0 -1 0 0
|
248
|
+
S 0 -6 -1 -1 -3 0 -2 -3 -1 -3 -3 0 0 -1 -1 3 1 -2 -4 -3 0
|
249
|
+
T -1 -7 -2 -2 -3 -2 -2 -2 -2 -2 -2 -1 -2 -2 -2 0 3 -1 -3 -3 0
|
250
|
+
V -3 -6 -6 -5 -1 -4 -3 1 -4 0 0 -5 -3 -4 -4 -4 -2 2 -2 -2 0
|
251
|
+
W -4 -6 -6 -5 2 -6 -2 -2 -5 -1 -2 -5 -5 -4 -4 -5 -4 -2 12 2 -3
|
252
|
+
Y -3 -5 -5 -5 3 -4 1 -1 -3 -1 -1 -3 -5 -3 -3 -4 -3 -2 3 7 -1
|
253
|
+
J -2 0 -4 -5 0 -2 -1 0 -3 0 0 -3 -6 -2 -2 -1 -1 0 -1 0 9
|
254
|
+
U -5 16 -7 -8 -3 -5 -4 -3 -6 -3 -3 -5 -9 -6 -5 -4 -4 -3 -4 -3 6
|
255
|
+
...
|
256
|
+
</pre>
|
257
|
+
<p>11. To generate a heat map for each table with values in it,</p>
|
258
|
+
<pre>
|
259
|
+
~user $ ulla -l TEMLIST --heatmap 0 --heatmap-values
|
260
|
+
</pre>
|
261
|
+
which will look like this,<br/>
|
262
|
+
<img src="http://mordred.bioc.cam.ac.uk/~semin/images/0.HA.png" alt="" />
|
263
|
+
<p>12. To generate one big figure, ‘myheatmaps.gif’ containing all the heat maps (4 maps in a row),</p>
|
264
|
+
<pre>
|
265
|
+
~user $ ulla -l TEMLIST --heatmap 1 --heatmap-stem myheatmaps --heatmap-format 1 --heatmap-columns 4
|
266
|
+
</pre>
|
267
|
+
which will look like this,<br/>
|
268
|
+
<img src="http://mordred.bioc.cam.ac.uk/~semin/images/myheatmaps.gif" alt="" />
|
269
|
+
<h2>* Repository</h2>
|
270
|
+
<p>You can download a pre-built RubyGems package from</p>
|
271
|
+
<ul>
|
272
|
+
<li>rubygems: <a href="http://rubygems.org/gems/ulla">http://rubygems.org/gems/ulla</a></li>
|
273
|
+
</ul>
|
274
|
+
<h2>* Reference</h2>
|
275
|
+
<ul>
|
276
|
+
<li><a href="http://bioinformatics.oxfordjournals.org/cgi/content/full/25/15/1976">Lee S., Blundell T.L. (2009) Ulla: a program for calculating environment-specific amino acid substitution tables. Bioinformatics. 25(15):1976-1977; doi:10.1093/bioinformatics/btp300</a></li>
|
277
|
+
</ul>
|
278
|
+
<h2>* Contact</h2>
|
279
|
+
<p>Comments are welcome, please send an email to me (seminlee at gmail dot com).</p>
|
280
|
+
<h2>* License</h2>
|
281
|
+
<p><img src="http://i.creativecommons.org/l/by-nc/2.0/uk/88x31.png" alt="" /><br />
|
282
|
+
This work is licensed under a <a href="http://creativecommons.org/licenses/by-nc/2.0/uk/">Creative Commons Attribution-Noncommercial 2.0 UK: England & Wales License</a>.</p>
|
283
|
+
<hr>
|
284
|
+
<p class="coda">
|
285
|
+
Semin Lee, 8th October 2010<br/>
|
286
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
287
|
+
</p>
|
288
|
+
</div>
|
289
|
+
|
290
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
291
|
+
|
25
292
|
</body>
|
26
293
|
</html>
|