<% hpo = @hash_vars[:hpo] def get_hpo_link(hpo_code) link = '-' if hpo_code != '-' link = "#{hpo_code}" end return link end %>

Average of patients by HPO profile average in clusters

Distribution of patients in clusters based on the average of phenotypes by profile.

<%= plot = File.join(@hash_vars[:temp_folder], "clusters_distribution_#{@hash_vars[:cluster_name]}.pdf") if File.exists?(plot) embed_pdf(plot, 'width="800" height="800"') else "

File not specified.

" end %>

Patient HPO profiles by cluster.

<%= table(id: :clusters, header: true, border: 2, row_names: false, text: true, cell_align: %w( center )) do |data| data.each do |element| #STDERR.puts element.inspect element[2] = element[2].map{|patID| "

#{patID}

" }.join("\n") element[3] = element[3].map{|profile| "

#{profile.map{|hpo_code| get_hpo_link(hpo_code)}.join(', ')}

" }.join("\n") element[4] = element[4].map{|transl_profile| "

#{transl_profile.join(', ')}

"}.join("\n") end data.unshift(["Cluster ID","Patients in Cluster","Patient IDs", "HPO codes", "Phenotypes"]) end %>