sequenceserver 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sequenceserver might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df39d51ed4e4f8e552a1ea11da47e6e25eb8a212
4
- data.tar.gz: 2f03f99e59871472ca053b5eb146af275736efb7
3
+ metadata.gz: 377a59dc018c8f3b29b5fdf13053596cf64e3692
4
+ data.tar.gz: dac95b98ef707bd1f31f720da2d7c8bdc917bd2e
5
5
  SHA512:
6
- metadata.gz: 89b7d44e5ff6574b58d993079e98499f438690b45c0c6eff6db39c515d565cf9a11953a09ad72cfedd62eb5a395b2a92a4970f83233b8667724421818cc62f4b
7
- data.tar.gz: 6dba5e3a22b1dba4f7366695896084b620bcec57f2baa3270d9367c0aab4a55f8625ef885143d1c78643ce2ed3c232d6887805455c306548d703b63a2b8e8c74
6
+ metadata.gz: 68c2d0fe6755ed18258a8c80018158589f0b9564b7d5479778a1d23db1020aad033fee9660440113e180fd5608eae73feba84efcf472f45b91f850e416ce4192
7
+ data.tar.gz: 9b4206c5f045621ebfd42d99e4a5209c7cd48bd89297c684b95f897a6b12232ffc79ea3d8c6c9570da6ac9efdf6ecfdad975cadeef502c827bdb75a198e1c7f3
@@ -171,8 +171,9 @@ module SequenceServer
171
171
  # Formats the given number as "1e-3" if the number is less than 1 or
172
172
  # greater than 10.
173
173
  def in_scientific_or_twodecimal(num)
174
- return in_twodecimal(num) if num >= 1 && num < 10
175
- format '%.2e', num.to_f
174
+ return format('%.2f', num) if num >= 1 && num < 10
175
+ return num if num == 0
176
+ format '%.2e', num
176
177
  end
177
178
  end
178
179
 
@@ -82,6 +82,16 @@ target="#{target}">)
82
82
  data
83
83
  end
84
84
 
85
+ # Formats the given number as "1e-3" if the number is less than 1 or
86
+ # greater than 10.
87
+ #
88
+ # NOTE: Copied over from hsp.rb to provide a quick fix on this branch.
89
+ def in_scientific_or_twodecimal(num)
90
+ return format('%.2f', num) if num >= 1 && num < 10
91
+ return num if num == 0
92
+ format '%.2e', num
93
+ end
94
+
85
95
  # Formats float as "a.bc" or "a x b^c". The latter if float is in
86
96
  # scientific notation. Former otherwise.
87
97
  def prettify_float(data)
@@ -1,4 +1,4 @@
1
1
  # Define version number.
2
2
  module SequenceServer
3
- VERSION = '1.0.8'
3
+ VERSION = '1.0.9'
4
4
  end
data/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "SequenceServer",
3
3
  "description": "BLAST search made easy!",
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "homepage": "http://www.sequenceserver.com",
6
6
  "repository": "https://github.com/yannickwurm/sequenceserver",
7
7
  "author": {
data/views/result.erb CHANGED
@@ -50,7 +50,7 @@
50
50
  <td class="text-left"><%= h + 1 %>.</td>
51
51
  <td> <a href="<%="#Query_#{query.number}_hit_#{hit.number}"%>"><%= "#{hit.id}" %></a> </td>
52
52
  <td class="text-right"><%= prettify hit.score %></td>
53
- <td class="text-right"><%= prettify hit.evalue %></td>
53
+ <td class="text-right"><%= prettify in_scientific_or_twodecimal hit.evalue %></td>
54
54
  <td class="text-right"><%= prettify hit.length %></td>
55
55
  </tr>
56
56
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequenceserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anurag Priyam
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-03-18 00:00:00.000000000 Z
14
+ date: 2016-11-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sinatra
@@ -688,4 +688,3 @@ signing_key:
688
688
  specification_version: 4
689
689
  summary: BLAST search made easy!
690
690
  test_files: []
691
- has_rdoc: