bio-tm_hmm 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -5
- data/LICENSE.txt +1 -1
- data/README.rdoc +11 -46
- data/Rakefile +12 -4
- data/VERSION +1 -1
- data/bin/biotm_hmm +72 -0
- data/bio-tm_hmm.gemspec +28 -26
- data/lib/bio/transmembrane.rb +1 -51
- data/test/test_transmembrane.rb +0 -26
- metadata +94 -96
- data/.travis.yml +0 -12
- data/bin/bio-tm_hmm +0 -69
data/Gemfile
CHANGED
@@ -2,13 +2,12 @@ source "http://rubygems.org"
|
|
2
2
|
# Add dependencies required to use your gem here.
|
3
3
|
# Example:
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
|
+
gem "bio", ">= 1.4.1"
|
5
6
|
|
6
7
|
# Add dependencies to develop your gem here.
|
7
8
|
# Include everything needed to run rake, tests, features, etc.
|
8
9
|
group :development do
|
9
|
-
gem "
|
10
|
-
gem "
|
11
|
-
gem "
|
12
|
-
gem "bundler", ">= 1.0.21"
|
13
|
-
gem "bio", ">= 1.4.2"
|
10
|
+
gem "bundler", "~> 1.0.0"
|
11
|
+
gem "jeweler", "~> 1.5.2"
|
12
|
+
gem "rcov", ">= 0"
|
14
13
|
end
|
data/LICENSE.txt
CHANGED
data/README.rdoc
CHANGED
@@ -1,56 +1,21 @@
|
|
1
1
|
= bio-tm_hmm
|
2
2
|
|
3
|
-
{<img
|
4
|
-
src="https://secure.travis-ci.org/wwood/bioruby-tm_hmm.png"
|
5
|
-
/>}[http://travis-ci.org/#!/wwood/bioruby-tm_hmm]
|
6
|
-
|
7
3
|
A bioruby plugin for running TMHMM automatically on multiple sequences in a FASTA file and manipulation of the results
|
8
4
|
|
9
|
-
|
10
|
-
|
11
|
-
== Installation
|
12
|
-
|
13
|
-
gem install bio-tm_hmm
|
14
|
-
|
15
|
-
== Usage
|
16
|
-
|
17
|
-
bio-tm_hmm my.fasta
|
18
|
-
|
19
|
-
Where my.fasta is a FASTA file with one or more protein sequences in it. Output will be a description of the transmembrane domains predicted by TMHMM.
|
20
|
-
|
21
|
-
Other options include -f for printing out the fasta sequences that have some number of transmembrane domains in them, and ignoring those that done (converse is -g)
|
22
|
-
|
23
|
-
bio-tm_hmm -f 2 <my.fasta
|
24
|
-
|
25
|
-
== Developers
|
5
|
+
biotm_hmm -f proteome.fasta
|
26
6
|
|
27
|
-
|
28
|
-
|
29
|
-
require 'bio-tm_hmm'
|
30
|
-
|
31
|
-
The API doc is online. For more code examples see also the test files in
|
32
|
-
the source tree.
|
33
|
-
|
34
|
-
== Project home page
|
35
|
-
|
36
|
-
Information on the source tree, documentation, issues and how to contribute, see
|
37
|
-
|
38
|
-
http://github.com/wwood/bioruby-tm_hmm
|
39
|
-
|
40
|
-
The BioRuby community is on IRC server: irc.freenode.org, channel: #bioruby.
|
41
|
-
|
42
|
-
== Cite
|
43
|
-
|
44
|
-
If you use this software, please cite one of
|
7
|
+
== Contributing to bio-tm_hmm
|
45
8
|
|
46
|
-
*
|
47
|
-
*
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
This
|
9
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
10
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
11
|
+
* Fork the project
|
12
|
+
* Start a feature/bugfix branch
|
13
|
+
* Commit and push until you are happy with your contribution
|
14
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
15
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
52
16
|
|
53
17
|
== Copyright
|
54
18
|
|
55
|
-
Copyright (c)
|
19
|
+
Copyright (c) 2011 Ben J. Woodcroft. See LICENSE.txt for
|
20
|
+
further details.
|
56
21
|
|
data/Rakefile
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
1
|
require 'rubygems'
|
4
2
|
require 'bundler'
|
5
3
|
begin
|
@@ -21,7 +19,10 @@ Jeweler::Tasks.new do |gem|
|
|
21
19
|
gem.description = %Q{A bioruby plugin for interaction with the transmembrane predictor TMHMM}
|
22
20
|
gem.email = "donttrustben@gmail.com"
|
23
21
|
gem.authors = ["Ben J. Woodcroft"]
|
24
|
-
# dependencies
|
22
|
+
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
+
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
+
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
25
|
+
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
25
26
|
end
|
26
27
|
Jeweler::RubygemsDotOrgTasks.new
|
27
28
|
|
@@ -32,9 +33,16 @@ Rake::TestTask.new(:test) do |test|
|
|
32
33
|
test.verbose = true
|
33
34
|
end
|
34
35
|
|
36
|
+
require 'rcov/rcovtask'
|
37
|
+
Rcov::RcovTask.new do |test|
|
38
|
+
test.libs << 'test'
|
39
|
+
test.pattern = 'test/**/test_*.rb'
|
40
|
+
test.verbose = true
|
41
|
+
end
|
42
|
+
|
35
43
|
task :default => :test
|
36
44
|
|
37
|
-
require '
|
45
|
+
require 'rake/rdoctask'
|
38
46
|
Rake::RDocTask.new do |rdoc|
|
39
47
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
40
48
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/bin/biotm_hmm
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Author:: Ben J. Woodcroft
|
4
|
+
# Copyright:: 2011
|
5
|
+
# License:: The Ruby License
|
6
|
+
|
7
|
+
require 'rubygems'
|
8
|
+
require 'bio'
|
9
|
+
require 'bio-tm_hmm'
|
10
|
+
require 'optparse'
|
11
|
+
|
12
|
+
# If being run directly instead of being require'd,
|
13
|
+
# output one transmembrane per line, and
|
14
|
+
# indicate that a particular protein has no transmembrane domain
|
15
|
+
if $0 == __FILE__
|
16
|
+
options = {
|
17
|
+
:filter_in => false,
|
18
|
+
:filter_out => false,
|
19
|
+
}
|
20
|
+
o = OptionParser.new do |opts|
|
21
|
+
opts.banner = [
|
22
|
+
'Usage: tm_hmm_wrapper.rb [-fg] [fasta_filename]',
|
23
|
+
"\tfasta file can also be piped in on STDIN.",
|
24
|
+
"\twithout arguments, a description of the transmembranes is printed out for each input sequence"
|
25
|
+
]
|
26
|
+
opts.on('-f','--filter-in','Print those sequences that have a transmembrane domain') do
|
27
|
+
options[:filter_in] = true
|
28
|
+
end
|
29
|
+
opts.on('-g','--filter-out','Print those sequences that do NOT have a transmembrane domain') do
|
30
|
+
options[:filter_out] = true
|
31
|
+
end
|
32
|
+
end
|
33
|
+
o.parse!
|
34
|
+
|
35
|
+
runner = Bio::TMHMM::TmHmmWrapper.new
|
36
|
+
|
37
|
+
Bio::FlatFile.auto(ARGF).each do |seq|
|
38
|
+
result = runner.calculate(seq.seq)
|
39
|
+
name = seq.definition
|
40
|
+
|
41
|
+
# Default output - a description of the TMDs for each input aaseq
|
42
|
+
if options[:filter_in] == false and options[:filter_out] == false
|
43
|
+
if result.has_domain?
|
44
|
+
# At least one TMD found. Output each on a separate line
|
45
|
+
result.transmembrane_domains.each do |tmd|
|
46
|
+
puts [
|
47
|
+
name,
|
48
|
+
result.transmembrane_type,
|
49
|
+
tmd.start,
|
50
|
+
tmd.stop,
|
51
|
+
tmd.orientation
|
52
|
+
].join("\t")
|
53
|
+
end
|
54
|
+
else
|
55
|
+
puts [
|
56
|
+
name,
|
57
|
+
'No Transmembrane Domain Found'
|
58
|
+
].join("\t")
|
59
|
+
end
|
60
|
+
|
61
|
+
elsif options[:filter_in]
|
62
|
+
if result.has_domain?
|
63
|
+
puts seq
|
64
|
+
end
|
65
|
+
elsif options[:filter_out]
|
66
|
+
unless result.has_domain?
|
67
|
+
puts seq
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
data/bio-tm_hmm.gemspec
CHANGED
@@ -4,28 +4,28 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.0
|
7
|
+
s.name = %q{bio-tm_hmm}
|
8
|
+
s.version = "0.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ben J. Woodcroft"]
|
12
|
-
s.date =
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
12
|
+
s.date = %q{2011-04-03}
|
13
|
+
s.default_executable = %q{biotm_hmm}
|
14
|
+
s.description = %q{A bioruby plugin for interaction with the transmembrane predictor TMHMM}
|
15
|
+
s.email = %q{donttrustben@gmail.com}
|
16
|
+
s.executables = ["biotm_hmm"]
|
16
17
|
s.extra_rdoc_files = [
|
17
18
|
"LICENSE.txt",
|
18
19
|
"README.rdoc"
|
19
20
|
]
|
20
21
|
s.files = [
|
21
22
|
".document",
|
22
|
-
".travis.yml",
|
23
23
|
"Gemfile",
|
24
24
|
"LICENSE.txt",
|
25
25
|
"README.rdoc",
|
26
26
|
"Rakefile",
|
27
27
|
"VERSION",
|
28
|
-
"bin/
|
28
|
+
"bin/biotm_hmm",
|
29
29
|
"bio-tm_hmm.gemspec",
|
30
30
|
"lib/bio-tm_hmm.rb",
|
31
31
|
"lib/bio/appl/tmhmm/tmhmm_runner.rb",
|
@@ -35,34 +35,36 @@ Gem::Specification.new do |s|
|
|
35
35
|
"test/test_tm_hmm_wrapper.rb",
|
36
36
|
"test/test_transmembrane.rb"
|
37
37
|
]
|
38
|
-
s.homepage =
|
38
|
+
s.homepage = %q{http://github.com/wwood/bioruby-tm_hmm}
|
39
39
|
s.licenses = ["MIT"]
|
40
40
|
s.require_paths = ["lib"]
|
41
|
-
s.rubygems_version =
|
42
|
-
s.summary =
|
41
|
+
s.rubygems_version = %q{1.6.2}
|
42
|
+
s.summary = %q{A bioruby plugin for interaction with the transmembrane predictor TMHMM}
|
43
|
+
s.test_files = [
|
44
|
+
"test/helper.rb",
|
45
|
+
"test/test_tm_hmm_wrapper.rb",
|
46
|
+
"test/test_transmembrane.rb"
|
47
|
+
]
|
43
48
|
|
44
49
|
if s.respond_to? :specification_version then
|
45
50
|
s.specification_version = 3
|
46
51
|
|
47
52
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
48
|
-
s.
|
49
|
-
s.add_development_dependency(%q<
|
50
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.
|
51
|
-
s.add_development_dependency(%q<
|
52
|
-
s.add_development_dependency(%q<bio>, [">= 1.4.2"])
|
53
|
+
s.add_runtime_dependency(%q<bio>, [">= 1.4.1"])
|
54
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
55
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
56
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
53
57
|
else
|
54
|
-
s.add_dependency(%q<
|
55
|
-
s.add_dependency(%q<
|
56
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
57
|
-
s.add_dependency(%q<
|
58
|
-
s.add_dependency(%q<bio>, [">= 1.4.2"])
|
58
|
+
s.add_dependency(%q<bio>, [">= 1.4.1"])
|
59
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
60
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
61
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
59
62
|
end
|
60
63
|
else
|
61
|
-
s.add_dependency(%q<
|
62
|
-
s.add_dependency(%q<
|
63
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
64
|
-
s.add_dependency(%q<
|
65
|
-
s.add_dependency(%q<bio>, [">= 1.4.2"])
|
64
|
+
s.add_dependency(%q<bio>, [">= 1.4.1"])
|
65
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
67
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
66
68
|
end
|
67
69
|
end
|
68
70
|
|
data/lib/bio/transmembrane.rb
CHANGED
@@ -1,35 +1,3 @@
|
|
1
|
-
|
2
|
-
# Monkey-patch Array#pair in
|
3
|
-
class Array
|
4
|
-
# Return an array of all pairs of elements from this array (each is an array).
|
5
|
-
# If another_array is not nil, then do pairwise between this array and that (but not within each)
|
6
|
-
#
|
7
|
-
# NOT thread safe.
|
8
|
-
def pairs(another_array = nil)
|
9
|
-
pairs = []
|
10
|
-
|
11
|
-
if another_array #between this array and the next
|
12
|
-
(0..length-1).each do |index1|
|
13
|
-
(0..another_array.length-1).each do |index2|
|
14
|
-
pairs.push [self[index1], another_array[index2]]
|
15
|
-
end
|
16
|
-
end
|
17
|
-
else # within this array only
|
18
|
-
(0..length-1).each do |index1|
|
19
|
-
index2 = index1+1
|
20
|
-
while index2 < length
|
21
|
-
pairs.push [self[index1], self[index2]]
|
22
|
-
index2 += 1
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
return pairs
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
|
32
|
-
|
33
1
|
# a simple class to represent a transmembrane domain, and a transmembrane domain containing protein
|
34
2
|
module Bio
|
35
3
|
module Transmembrane
|
@@ -83,16 +51,6 @@ module Bio
|
|
83
51
|
def each
|
84
52
|
@transmembrane_domains.each{|t| yield t}
|
85
53
|
end
|
86
|
-
|
87
|
-
def residue_number_contained?(residue_number)
|
88
|
-
contained = false
|
89
|
-
@transmembrane_domains.each do |tmd|
|
90
|
-
if tmd.start <= residue_number and tmd.stop >= residue_number
|
91
|
-
contained = true
|
92
|
-
end
|
93
|
-
end
|
94
|
-
contained
|
95
|
-
end
|
96
54
|
end
|
97
55
|
|
98
56
|
class OrientedTransmembraneDomainProtein<TransmembraneProtein
|
@@ -180,16 +138,8 @@ module Bio
|
|
180
138
|
end
|
181
139
|
end
|
182
140
|
|
183
|
-
# From Predicting transmembrane protein topology with a hidden markov model: application to complete g
|
184
|
-
#
|
185
|
-
# Another signal shown to be associated with transmembrane helices is
|
186
|
-
# the abundance of positively charged residues in the part of the
|
187
|
-
# sequence on the cytoplasmic side of the membrane, “the positive inside
|
188
|
-
# rule” (von Heijne 1986) and (von Heijne 1994).
|
189
|
-
#
|
190
|
-
# So, inside means cytosolic. So outside_in means type I transmembrane domain protein
|
191
141
|
class OrientedTransmembraneDomain<TransmembraneDomainDefinition
|
192
|
-
|
142
|
+
# The orientation can either be inside out (like a type II transmembrane domain protein)
|
193
143
|
INSIDE_OUT = 'inside_out'
|
194
144
|
# Or outside in, like a type I transmembrane domain protein)
|
195
145
|
OUTSIDE_IN = 'outside_in'
|
data/test/test_transmembrane.rb
CHANGED
@@ -116,31 +116,5 @@ module Transmembrane
|
|
116
116
|
assert_equal 1, tmd1.overlap_length(tmd2)
|
117
117
|
assert_equal((3..3), tmd1.intersection(tmd2))
|
118
118
|
end
|
119
|
-
|
120
|
-
def test_residue_contained?
|
121
|
-
p = TransmembraneProtein.new
|
122
|
-
|
123
|
-
# test none
|
124
|
-
p.transmembrane_domains = []
|
125
|
-
assert_equal false, p.residue_number_contained?(5)
|
126
|
-
|
127
|
-
# test one
|
128
|
-
p.transmembrane_domains = [TransmembraneDomainDefinition.new(5,8)]
|
129
|
-
assert p.residue_number_contained?(5)
|
130
|
-
assert p.residue_number_contained?(6)
|
131
|
-
assert p.residue_number_contained?(8)
|
132
|
-
assert_equal false, p.residue_number_contained?(4)
|
133
|
-
assert_equal false, p.residue_number_contained?(9)
|
134
|
-
|
135
|
-
# test 3
|
136
|
-
p.transmembrane_domains = [
|
137
|
-
TransmembraneDomainDefinition.new(1,10),
|
138
|
-
TransmembraneDomainDefinition.new(90,100),
|
139
|
-
TransmembraneDomainDefinition.new(16,24),
|
140
|
-
]
|
141
|
-
assert p.residue_number_contained?(5)
|
142
|
-
assert p.residue_number_contained?(95)
|
143
|
-
assert_equal false, p.residue_number_contained?(150)
|
144
|
-
end
|
145
119
|
end
|
146
120
|
end
|
metadata
CHANGED
@@ -1,113 +1,102 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: bio-tm_hmm
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Ben J. Woodcroft
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
|
18
|
+
date: 2011-04-03 00:00:00 +11:00
|
19
|
+
default_executable: biotm_hmm
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
type: :runtime
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
22
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 5
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 4
|
32
|
+
- 1
|
33
|
+
version: 1.4.1
|
34
|
+
name: bio
|
35
|
+
version_requirements: *id001
|
23
36
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rdoc
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
type: :development
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
33
40
|
none: false
|
34
|
-
requirements:
|
41
|
+
requirements:
|
35
42
|
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
|
38
|
-
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 23
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 0
|
48
|
+
- 0
|
49
|
+
version: 1.0.0
|
50
|
+
name: bundler
|
51
|
+
version_requirements: *id002
|
39
52
|
prerelease: false
|
40
|
-
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
type: :development
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
56
|
none: false
|
42
|
-
requirements:
|
57
|
+
requirements:
|
43
58
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 7
|
61
|
+
segments:
|
62
|
+
- 1
|
63
|
+
- 5
|
64
|
+
- 2
|
65
|
+
version: 1.5.2
|
47
66
|
name: jeweler
|
48
|
-
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 1.8.3
|
54
|
-
type: :development
|
67
|
+
version_requirements: *id003
|
55
68
|
prerelease: false
|
56
|
-
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 1.8.3
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: bundler
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 1.0.21
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
70
|
type: :development
|
71
|
-
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: 1.4.2
|
86
|
-
type: :development
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 3
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
name: rcov
|
81
|
+
version_requirements: *id004
|
87
82
|
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: 1.4.2
|
94
83
|
description: A bioruby plugin for interaction with the transmembrane predictor TMHMM
|
95
84
|
email: donttrustben@gmail.com
|
96
|
-
executables:
|
97
|
-
-
|
85
|
+
executables:
|
86
|
+
- biotm_hmm
|
98
87
|
extensions: []
|
99
|
-
|
88
|
+
|
89
|
+
extra_rdoc_files:
|
100
90
|
- LICENSE.txt
|
101
91
|
- README.rdoc
|
102
|
-
files:
|
92
|
+
files:
|
103
93
|
- .document
|
104
|
-
- .travis.yml
|
105
94
|
- Gemfile
|
106
95
|
- LICENSE.txt
|
107
96
|
- README.rdoc
|
108
97
|
- Rakefile
|
109
98
|
- VERSION
|
110
|
-
- bin/
|
99
|
+
- bin/biotm_hmm
|
111
100
|
- bio-tm_hmm.gemspec
|
112
101
|
- lib/bio-tm_hmm.rb
|
113
102
|
- lib/bio/appl/tmhmm/tmhmm_runner.rb
|
@@ -116,32 +105,41 @@ files:
|
|
116
105
|
- test/helper.rb
|
117
106
|
- test/test_tm_hmm_wrapper.rb
|
118
107
|
- test/test_transmembrane.rb
|
108
|
+
has_rdoc: true
|
119
109
|
homepage: http://github.com/wwood/bioruby-tm_hmm
|
120
|
-
licenses:
|
110
|
+
licenses:
|
121
111
|
- MIT
|
122
112
|
post_install_message:
|
123
113
|
rdoc_options: []
|
124
|
-
|
114
|
+
|
115
|
+
require_paths:
|
125
116
|
- lib
|
126
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
127
118
|
none: false
|
128
|
-
requirements:
|
129
|
-
- -
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
|
132
|
-
segments:
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
hash: 3
|
123
|
+
segments:
|
133
124
|
- 0
|
134
|
-
|
135
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
version: "0"
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
127
|
none: false
|
137
|
-
requirements:
|
138
|
-
- -
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
hash: 3
|
132
|
+
segments:
|
133
|
+
- 0
|
134
|
+
version: "0"
|
141
135
|
requirements: []
|
136
|
+
|
142
137
|
rubyforge_project:
|
143
|
-
rubygems_version: 1.
|
138
|
+
rubygems_version: 1.6.2
|
144
139
|
signing_key:
|
145
140
|
specification_version: 3
|
146
141
|
summary: A bioruby plugin for interaction with the transmembrane predictor TMHMM
|
147
|
-
test_files:
|
142
|
+
test_files:
|
143
|
+
- test/helper.rb
|
144
|
+
- test/test_tm_hmm_wrapper.rb
|
145
|
+
- test/test_transmembrane.rb
|
data/.travis.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 1.9.2
|
4
|
-
- 1.9.3
|
5
|
-
- jruby-19mode # JRuby in 1.9 mode
|
6
|
-
- rbx-19mode
|
7
|
-
# - 1.8.7
|
8
|
-
# - jruby-18mode # JRuby in 1.8 mode
|
9
|
-
# - rbx-18mode
|
10
|
-
|
11
|
-
# uncomment this line if your project needs to run something other than `rake`:
|
12
|
-
# script: bundle exec rspec spec
|
data/bin/bio-tm_hmm
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# Author:: Ben J. Woodcroft
|
4
|
-
# Copyright:: 2011
|
5
|
-
# License:: The Ruby License
|
6
|
-
|
7
|
-
require 'rubygems'
|
8
|
-
require 'bio'
|
9
|
-
require 'bio-tm_hmm'
|
10
|
-
require 'optparse'
|
11
|
-
|
12
|
-
# If being run directly instead of being require'd,
|
13
|
-
# output one transmembrane per line, and
|
14
|
-
# indicate that a particular protein has no transmembrane domain
|
15
|
-
options = {
|
16
|
-
:filter_in => false,
|
17
|
-
:filter_out => false,
|
18
|
-
}
|
19
|
-
o = OptionParser.new do |opts|
|
20
|
-
opts.banner = ['',
|
21
|
-
'Usage: tm_hmm_wrapper.rb [-fg] [fasta_filename]','',
|
22
|
-
"\tfasta file can also be piped in on STDIN.",
|
23
|
-
"\twithout arguments, a description of the transmembranes is printed out for each input sequence",''
|
24
|
-
].join("\n")
|
25
|
-
opts.on('-f','--filter-in [MIN_TRANSMEMBRANE_DOMAINS]','Print those sequences that have a transmembrane domain. If MIN_TRANSMEMBRANE_DOMAINS is defined, only those proteins with that many TMDs or more are printed out') do |m|
|
26
|
-
options[:filter_in] = m.to_i #gets set to 0 when optional MIN_TRANSMEMBRANE_DOMAINS is omitted
|
27
|
-
end
|
28
|
-
opts.on('-g','--filter-out [MIN_TRANSMEMBRANE_DOMAINS]','Print those sequences that do NOT have a transmembrane domain. If MIN_TRANSMEMBRANE_DOMAINS is defined, only those proteins with that many TMDs or more are filtered out') do |m|
|
29
|
-
options[:filter_out] = m.to_i #gets set to 0 when optional MIN_TRANSMEMBRANE_DOMAINS is omitted
|
30
|
-
end
|
31
|
-
end
|
32
|
-
o.parse!
|
33
|
-
|
34
|
-
runner = Bio::TMHMM::TmHmmWrapper.new
|
35
|
-
|
36
|
-
Bio::FlatFile.auto(ARGF).each do |seq|
|
37
|
-
result = runner.calculate(seq.seq)
|
38
|
-
name = seq.definition
|
39
|
-
|
40
|
-
# Default output - a description of the TMDs for each input aaseq
|
41
|
-
if options[:filter_in] == false and options[:filter_out] == false
|
42
|
-
if result.has_domain?
|
43
|
-
# At least one TMD found. Output each on a separate line
|
44
|
-
result.transmembrane_domains.each do |tmd|
|
45
|
-
puts [
|
46
|
-
name,
|
47
|
-
result.transmembrane_type,
|
48
|
-
tmd.start,
|
49
|
-
tmd.stop,
|
50
|
-
tmd.orientation
|
51
|
-
].join("\t")
|
52
|
-
end
|
53
|
-
else
|
54
|
-
puts [
|
55
|
-
name,
|
56
|
-
'No Transmembrane Domain Found'
|
57
|
-
].join("\t")
|
58
|
-
end
|
59
|
-
|
60
|
-
elsif options[:filter_in] != false
|
61
|
-
if result.transmembrane_domains.length >= options[:filter_in]
|
62
|
-
puts seq
|
63
|
-
end
|
64
|
-
elsif options[:filter_out] != false
|
65
|
-
unless result.transmembrane_domains.length >= options[:filter_out]
|
66
|
-
puts seq
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|