crb-blast 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +13 -0
- data/Gemfile +3 -0
- data/README.md +95 -0
- data/Rakefile +8 -0
- data/bin/crb-blast +3 -3
- data/build +1 -0
- data/crb-blast.gemspec +26 -0
- data/deps/deps.yaml +27 -0
- data/lib/crb-blast.rb +3 -447
- data/lib/crb-blast/cmd.rb +19 -0
- data/lib/crb-blast/crb-blast.rb +515 -0
- data/lib/crb-blast/hit.rb +34 -0
- data/test/helper.rb +16 -0
- data/test/query.fasta +22 -0
- data/test/query2.fasta +30 -0
- data/test/target.fasta +62 -0
- data/test/target2.fasta +76 -0
- data/test/test_bin.rb +17 -0
- data/test/test_test.rb +99 -0
- data/test/test_test2.rb +78 -0
- metadata +20 -3
- data/lib/hit.rb +0 -30
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Boursnell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: trollop
|
@@ -200,9 +200,26 @@ executables:
|
|
200
200
|
extensions: []
|
201
201
|
extra_rdoc_files: []
|
202
202
|
files:
|
203
|
+
- ".gitignore"
|
204
|
+
- Gemfile
|
205
|
+
- README.md
|
206
|
+
- Rakefile
|
203
207
|
- bin/crb-blast
|
208
|
+
- build
|
209
|
+
- crb-blast.gemspec
|
210
|
+
- deps/deps.yaml
|
204
211
|
- lib/crb-blast.rb
|
205
|
-
- lib/
|
212
|
+
- lib/crb-blast/cmd.rb
|
213
|
+
- lib/crb-blast/crb-blast.rb
|
214
|
+
- lib/crb-blast/hit.rb
|
215
|
+
- test/helper.rb
|
216
|
+
- test/query.fasta
|
217
|
+
- test/query2.fasta
|
218
|
+
- test/target.fasta
|
219
|
+
- test/target2.fasta
|
220
|
+
- test/test_bin.rb
|
221
|
+
- test/test_test.rb
|
222
|
+
- test/test_test2.rb
|
206
223
|
homepage: http://rubygems.org/gems/crb-blast
|
207
224
|
licenses:
|
208
225
|
- MIT
|
data/lib/hit.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
class Hit
|
2
|
-
# Fields: query id, subject id, % identity, alignment length, mismatches,
|
3
|
-
# gap opens, q. start, q. end, s. start, s. end, evalue, bit score
|
4
|
-
attr_accessor :query, :target, :id, :alnlen, :mismatches, :gaps, :qstart,
|
5
|
-
:qend, :tstart, :tend, :evalue, :bitscore, :qlen, :tlen
|
6
|
-
|
7
|
-
def initialize(list)
|
8
|
-
raise(RuntimeError, "unexpected number of columns") unless list.length==14
|
9
|
-
@query = list[0].split(/[\|\ ]/).first
|
10
|
-
@target = list[1].split(/[\|\ ]/).first
|
11
|
-
@id = list[2]
|
12
|
-
@alnlen = list[3].to_i
|
13
|
-
@mismatches = list[4].to_i
|
14
|
-
@gaps = list[5].to_i
|
15
|
-
@qstart = list[6].to_i
|
16
|
-
@qend = list[7].to_i
|
17
|
-
@tstart = list[8].to_i
|
18
|
-
@tend = list[9].to_i
|
19
|
-
@evalue = list[10].to_f
|
20
|
-
@bitscore = list[11].to_f
|
21
|
-
@qlen = list[12].to_f
|
22
|
-
@tlen = list[13].to_f
|
23
|
-
end
|
24
|
-
|
25
|
-
def to_s
|
26
|
-
s = "#{@query}\t#{@target}\t#{@id}\t#{@alnlen}\t#{@evalue}\t#{@bitscore}\t"
|
27
|
-
s << "#{@qstart}..#{@qend}\t#{@tstart}..#{@tend}"
|
28
|
-
return s
|
29
|
-
end
|
30
|
-
end
|