pubannotation_evaluator 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f62efd0b64eada9525ead8ffaa19d9530335f845d83dbb9ebb1fcb400f47b4fb
4
- data.tar.gz: d4a6bf9d36aff4c78c25fab22449c9abad050153a7a7fbc4f100729987d189d7
3
+ metadata.gz: 6fa609f2eaa40072aaf68f19d943908cf959c68c951cfabe7c530fae96efdbe8
4
+ data.tar.gz: 66e92d37b5db14676152c17d777ff25071844e3e4297ec8bb5cd4633cc867470
5
5
  SHA512:
6
- metadata.gz: 39e123cc7aba4352e4104c62cd78eea63cb27628cb97cb8bd0626302325303193ecaaf39843c5f47efbc3c704c41496874f1ebbc2bcdb6530c40912523142cc3
7
- data.tar.gz: 9d62f8b3b79a5001bd2abca68ae78d84b1fc7ae3b66f5ca3673f2e65e419ea424299c4698fb741230f5f2b7578b8b272102bacc68e358a3787c07d2dd1a2ec86
6
+ metadata.gz: ca65f506b81afaa8eb2fc8af8acebda766db0a66ec8d317796df7934ed6f92227ba7364004f6c7bfe507c790c067bea67d4887c7137b2cf980f35fe6efcdca7d
7
+ data.tar.gz: '0607055296bb34c586a7d8c03e91a71d5781a76478ae1673501dc29fe85eeda0f55e6e10584b906d9b2b8268bbf08cefef7815328723dee20cce16c8b5cf912a'
@@ -315,6 +315,9 @@ class PubannotationEvaluator
315
315
  precision = counts[:study].keys.inject({}){|m, k| m.merge(k => counts[:matched_study][k].to_f / counts[:study][k]) if counts[:study][k] > 0}
316
316
  recall = counts[:reference].keys.inject({}){|m, k| m.merge(k => counts[:matched_reference][k].to_f / counts[:reference][k]) if counts[:reference][k] > 0}
317
317
 
318
+ precision ||= {}
319
+ recall ||= {}
320
+
318
321
  keys = (counts[:study].keys + counts[:reference].keys).uniq
319
322
  fscore = keys.inject({}) do |m, k|
320
323
  _p = precision[k]
@@ -324,7 +327,7 @@ class PubannotationEvaluator
324
327
  else
325
328
  _p ? _p : _r
326
329
  end
327
- m.merge(k => _f)
330
+ _f.nil? ? m : m.merge(k => _f)
328
331
  end
329
332
 
330
333
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubannotation_evaluator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jin-Dong Kim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-23 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A tool to evaluate the accuracy of a set of annotations.
14
14
  email: jdkim@dbcls.rois.ac.jp
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  requirements: []
42
42
  rubyforge_project:
43
- rubygems_version: 2.7.8
43
+ rubygems_version: 2.7.9
44
44
  signing_key:
45
45
  specification_version: 4
46
46
  summary: It compares a set of annotations (study annotations) against another set