templates/evidence_profile.erb in pets-0.2.4 vs templates/evidence_profile.erb in pets-0.2.5
- old
+ new
@@ -2,11 +2,11 @@
<h1 style="text-align: center; background-color:#d6eaf8">Profile <%= @hash_vars[:profile_id] %></h1>
<h1 style="text-align: center; background-color:#d6eaf8">Evidence similar to profile</h1>
<% @hash_vars[:similarity_matrixs].each do |pair, similarity_matrix| %>
<%
matrix_name = pair + '_sim_matrix'
- if pair == 'gene_HP'
+ if pair.include?('gene_HP')
dict = @hash_vars[:evidences][pair][:id2lab]
header = similarity_matrix.first
header.map! do |item|
label = dict[item.to_s]
label.nil? ? item : label
@@ -25,10 +25,26 @@
<%=heatmap(id: matrix_name, header: true, row_names: true, title: pair )%>
<% end %>
<%=circular_genome(id: :candidates, header: false, row_names: true, transpose: false,
genomic_coordinates: @hash_vars[:genomic_coordinates] )%>
- <% if !@hash_vars[:var_ids].nil? %>
- <%=circular_genome(id: :var_ids, header: false, row_names: true, transpose: false,
- genomic_coordinates: @hash_vars[:var_coordinates] )%>
+ <% if !@hash_vars[:var_ids].nil?
+ if @hash_vars[:var_ids].length > 200 %>
+ <p> Too much variant records</p>
+ <% else %>
+ <%=circular_genome(id: :var_ids, header: false,
+ row_names: true, transpose: false,
+ genomic_coordinates: @hash_vars[:var_coordinates] )%>
+ <% end %>
<% end %>
+
+ <h1 style="text-align: center; background-color:#d6eaf8">Candidate regions</h1>
+
+ <%= table(id: :hotspot_table) do |data|
+ data.each do |row|
+ row[1] = row[1].join(" ")
+ row[2] = row[2].join(",")
+ row[3] = row[3].join(",")
+ end
+ end
+ %>
</div>