Permalink
Browse files

Limit AAI/ANI tables to the top-50 hits

  • Loading branch information...
lmrodriguezr committed Dec 5, 2018
1 parent 9487247 commit 737e2e790048a611eccabde4d3f317d8dff0e906
Showing with 10 additions and 2 deletions.
  1. +4 −0 .gitignore
  2. +6 −2 app/views/shared/results/_distances.html.erb
@@ -10,11 +10,15 @@
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
/db/OLD_BU/*
/db/Backup.bash

# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp
/users.txt
/queries.txt

# Ignore uploads
/public/uploads
@@ -117,8 +117,11 @@
<h4>Genome relatedness
<%= info_msg "Genome relatedness to database references" do %>
<p>
Average sequence identities to reference datasets in the database.
Average sequence identities to reference datasets in the database. Displays
only the top-50 values.
</p>
<p><b>ANI:</b>Average Nucleotide Identity</p>
<p><b>AAI:</b>Average Amino Acid Identity</p>
<% end %></h4>
<% unless res.file_path(:ref_tree_pdf).nil? %>
<p>
@@ -139,7 +142,8 @@
db_qry = db[metric.to_sym].
execute("SELECT seq2, #{metric}, sd, 100.0*n/omega " +
"FROM #{metric} WHERE seq2 != ? " +
"GROUP BY seq2 ORDER BY #{metric} DESC", [dataset.name])
"GROUP BY seq2 ORDER BY #{metric} DESC " +
"LIMIT 50", [dataset.name])
next if db_qry.empty?
%>
<div class="panel panel-default">

0 comments on commit 737e2e7

Please sign in to comment.