crb-blast 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/crb-blast +2 -2
- data/lib/crb-blast.rb +9 -8
- metadata +23 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4271f12aa93ccaa344fe8dbc1bcdecd1281ef7a1
|
4
|
+
data.tar.gz: 7222b48806f393e89c096ad50aaa92997dccbe9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41b2d87c4113fbb3022bfd80329c7a1224ed166c0bd3402dd15d244e1b7f69cbd6f386c6839f294a0f76e0d2adc4d7630ea59bf2dc860c06f07fedf8d4e6544
|
7
|
+
data.tar.gz: 2907e7327968d1edab89a3b6849e811d40e29bc8011671894708ebd656ebce1acb05e970aad0f9bfcfaddbbd2834deee9b1bb589a5e0028435c6023d1b89703d
|
data/bin/crb-blast
CHANGED
@@ -21,12 +21,12 @@ OPTIONS:
|
|
21
21
|
|
22
22
|
EOS
|
23
23
|
opt :query,
|
24
|
-
"query fasta file
|
24
|
+
"query fasta file",
|
25
25
|
:required => true,
|
26
26
|
:type => String
|
27
27
|
|
28
28
|
opt :target,
|
29
|
-
"target fasta file
|
29
|
+
"target fasta file",
|
30
30
|
:required => true,
|
31
31
|
:type => String
|
32
32
|
|
data/lib/crb-blast.rb
CHANGED
@@ -24,11 +24,12 @@ class CRB_Blast
|
|
24
24
|
attr_accessor :target_is_prot, :query_is_prot
|
25
25
|
attr_accessor :query_results, :target_results, :working_dir
|
26
26
|
|
27
|
-
def initialize query, target, output
|
27
|
+
def initialize query, target, output=nil
|
28
28
|
@query = query
|
29
29
|
@target = target
|
30
30
|
if output.nil?
|
31
|
-
|
31
|
+
#@working_dir = File.expand_path(File.dirname(query)) # no trailing /
|
32
|
+
@working_dir = "."
|
32
33
|
else
|
33
34
|
@working_dir = File.expand_path(output)
|
34
35
|
mkcmd = "mkdir #{@working_dir}"
|
@@ -73,7 +74,7 @@ class CRB_Blast
|
|
73
74
|
else
|
74
75
|
@query_is_prot = false
|
75
76
|
end
|
76
|
-
|
77
|
+
|
77
78
|
# check if the target is a nucl or prot seq
|
78
79
|
target_file = Bio::FastaFormat.open(@target)
|
79
80
|
count_p=0
|
@@ -129,7 +130,7 @@ class CRB_Blast
|
|
129
130
|
cmd1 << "#{@blastp_path} "
|
130
131
|
cmd2 << "#{@blastp_path} "
|
131
132
|
else
|
132
|
-
cmd1 << "#{@tblastn_path} "
|
133
|
+
cmd1 << "#{@tblastn_path} "
|
133
134
|
cmd2 << "#{@blastx_path} "
|
134
135
|
end
|
135
136
|
else
|
@@ -174,10 +175,10 @@ class CRB_Blast
|
|
174
175
|
q_count=0
|
175
176
|
t_count=0
|
176
177
|
if !File.exists?("#{@output1}")
|
177
|
-
|
178
|
+
raise RuntimeError.new("can't find #{@output1}")
|
178
179
|
end
|
179
180
|
if !File.exists?("#{@output2}")
|
180
|
-
|
181
|
+
raise RuntimeError.new("can't find #{@output2}")
|
181
182
|
end
|
182
183
|
if File.exists?("#{@output1}") and File.exists?("#{@output2}")
|
183
184
|
File.open("#{@output1}").each_line do |line|
|
@@ -209,7 +210,7 @@ class CRB_Blast
|
|
209
210
|
@reciprocals = Hash.new
|
210
211
|
@missed = Hash.new
|
211
212
|
@evalues = []
|
212
|
-
@longest=0
|
213
|
+
@longest = 0
|
213
214
|
hits = 0
|
214
215
|
@query_results.each_pair do |query_id, list_of_hits|
|
215
216
|
list_of_hits.each_with_index do |target_hit, query_index|
|
@@ -321,7 +322,7 @@ class CRB_Blast
|
|
321
322
|
|
322
323
|
def size
|
323
324
|
hits=0
|
324
|
-
@reciprocals.
|
325
|
+
@reciprocals.each_pair do |key, list|
|
325
326
|
list.each do |hit|
|
326
327
|
hits += 1
|
327
328
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crb-blast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Boursnell
|
@@ -15,48 +15,48 @@ dependencies:
|
|
15
15
|
name: trollop
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - '>='
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - '>='
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bio
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ~>
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '1.4'
|
49
|
-
- -
|
49
|
+
- - '>='
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: 1.4.3
|
52
52
|
type: :runtime
|
53
53
|
prerelease: false
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- -
|
56
|
+
- - ~>
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '1.4'
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.4.3
|
62
62
|
- !ruby/object:Gem::Dependency
|
@@ -77,69 +77,68 @@ dependencies:
|
|
77
77
|
name: turn
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
- !ruby/object:Gem::Dependency
|
91
91
|
name: simplecov
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: shoulda-context
|
106
106
|
requirement: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: coveralls
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.6.7
|
125
125
|
type: :development
|
126
126
|
prerelease: false
|
127
127
|
version_requirements: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - '>='
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 0.6.7
|
132
|
-
description:
|
133
|
-
based on species divergence
|
132
|
+
description: See summary
|
134
133
|
email: cmb211@cam.ac.uk
|
135
134
|
executables:
|
136
135
|
- crb-blast
|
137
136
|
extensions: []
|
138
137
|
extra_rdoc_files: []
|
139
138
|
files:
|
140
|
-
- bin/crb-blast
|
141
139
|
- lib/crb-blast.rb
|
142
140
|
- lib/hit.rb
|
141
|
+
- bin/crb-blast
|
143
142
|
homepage: http://rubygems.org/gems/crb-blast
|
144
143
|
licenses:
|
145
144
|
- MIT
|
@@ -150,19 +149,19 @@ require_paths:
|
|
150
149
|
- lib
|
151
150
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
151
|
requirements:
|
153
|
-
- -
|
152
|
+
- - '>='
|
154
153
|
- !ruby/object:Gem::Version
|
155
154
|
version: '0'
|
156
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
156
|
requirements:
|
158
|
-
- -
|
157
|
+
- - '>='
|
159
158
|
- !ruby/object:Gem::Version
|
160
159
|
version: '0'
|
161
160
|
requirements: []
|
162
161
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.0.6
|
164
163
|
signing_key:
|
165
164
|
specification_version: 4
|
166
|
-
summary:
|
165
|
+
summary: Run conditional reciprocal best blast
|
167
166
|
test_files: []
|
168
167
|
has_rdoc:
|