lederhosen 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lederhosen.gemspec +1 -1
- data/lib/lederhosen/tasks/count_taxonomies.rb +2 -1
- data/lib/lederhosen/uc_parser.rb +23 -11
- data/lib/lederhosen/version.rb +1 -1
- metadata +2 -2
data/lederhosen.gemspec
CHANGED
@@ -21,6 +21,7 @@ module Lederhosen
|
|
21
21
|
taxonomy_count =
|
22
22
|
if not strict
|
23
23
|
get_taxonomy_count(uc)
|
24
|
+
|
24
25
|
elsif strict
|
25
26
|
get_strict_taxonomy_count(uc, strict)
|
26
27
|
end
|
@@ -77,7 +78,7 @@ module Lederhosen
|
|
77
78
|
end # results.each_slice
|
78
79
|
taxonomy_count
|
79
80
|
end
|
80
|
-
|
81
|
+
|
81
82
|
end
|
82
83
|
end
|
83
84
|
end
|
data/lib/lederhosen/uc_parser.rb
CHANGED
@@ -1,24 +1,36 @@
|
|
1
|
-
require 'ostruct'
|
2
|
-
|
3
1
|
module Lederhosen
|
4
2
|
|
5
3
|
# represents a usearch result
|
6
4
|
class UResult
|
7
5
|
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
attr_accessor :hit_type,
|
7
|
+
:cluster_no,
|
8
|
+
:alignment,
|
9
|
+
:query,
|
10
|
+
:target,
|
11
|
+
:length,
|
12
|
+
:identity,
|
13
|
+
:strand,
|
14
|
+
:cluster_size
|
11
15
|
|
12
|
-
def
|
13
|
-
|
16
|
+
def initialize(hash)
|
17
|
+
self.hit_type = hash[:hit_type]
|
18
|
+
self.cluster_no = hash[:cluster_no]
|
19
|
+
self.alignment = hash[:alignment]
|
20
|
+
self.target = hash[:target]
|
21
|
+
self.query = hash[:query]
|
22
|
+
self.length = hash[:length]
|
23
|
+
self.identity = hash[:identity]
|
24
|
+
self.strand = hash[:strand]
|
25
|
+
self.cluster_size = hash[:cluster_size]
|
14
26
|
end
|
15
27
|
|
16
28
|
def hit?
|
17
|
-
|
29
|
+
self.hit_type == 'H'
|
18
30
|
end
|
19
31
|
|
20
32
|
def miss?
|
21
|
-
|
33
|
+
self.hit_type == 'N'
|
22
34
|
end
|
23
35
|
end
|
24
36
|
|
@@ -40,7 +52,7 @@ module Lederhosen
|
|
40
52
|
end
|
41
53
|
|
42
54
|
private
|
43
|
-
|
55
|
+
|
44
56
|
# parse a line of usearch prefix
|
45
57
|
# return a hash in the form:
|
46
58
|
# { :taxonomy => '', :identity => '0.00', ... }
|
@@ -85,4 +97,4 @@ module Lederhosen
|
|
85
97
|
dat.merge(r)
|
86
98
|
end
|
87
99
|
end
|
88
|
-
end
|
100
|
+
end
|
data/lib/lederhosen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lederhosen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
segments:
|
150
150
|
- 0
|
151
|
-
hash:
|
151
|
+
hash: 3754039261049912436
|
152
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|