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 +4 -4
- data/lib/sequenceserver/blast/hsp.rb +3 -2
- data/lib/sequenceserver/routes.rb +10 -0
- data/lib/sequenceserver/version.rb +1 -1
- data/package.json +1 -1
- data/views/result.erb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 377a59dc018c8f3b29b5fdf13053596cf64e3692
|
4
|
+
data.tar.gz: dac95b98ef707bd1f31f720da2d7c8bdc917bd2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
175
|
-
|
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)
|
data/package.json
CHANGED
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.
|
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-
|
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:
|