Profile <%= @hash_vars[:profile_id] %>
Evidence similar to profile
<% @hash_vars[:similarity_matrixs].each do |pair, similarity_matrix| %>
<%
matrix_name = pair + '_sim_matrix'
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
end
@hash_vars[:candidates].map! do |id, score|
label = dict[id]
[label.nil? ? id : label, score]
end
@hash_vars[:genomic_coordinates].transform_keys! do |k, v|
label = dict[k]
label.nil? ? k : label
end
end
@hash_vars[matrix_name] = similarity_matrix
%>
<%=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?
if @hash_vars[:var_ids].length > 200 %>
Too much variant records
<% else %>
<%=circular_genome(id: :var_ids, header: false,
row_names: true, transpose: false,
genomic_coordinates: @hash_vars[:var_coordinates] )%>
<% end %>
<% end %>
Candidate regions
<%= 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
%>