Sha256: 78b13a6484e5ea57781e661a435774ba326df27cbc7cfd2a7e2ba3dd9b81bdf7
Contents?: true
Size: 1.46 KB
Versions: 2
Compression:
Stored size: 1.46 KB
Contents
<% hpo = @hash_vars[:hpo] def get_hpo_link(hpo_code) link = '-' if hpo_code != '-' link = "<a href=\"https://hpo.jax.org/app/browse/term/#{hpo_code}\">#{hpo_code}</a>" end return link end %> <div style="width: 90%; background-color:#ecf0f1; margin: 0 auto;"> <h1 style="text-align: center; background-color:#d6eaf8">Average of patients by HPO profile average in clusters</h1> <p> Distribution of patients in clusters based on the average of phenotypes by profile. </p> <%= 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 "<p> File not specified. </p>" end %> </div> <div style="width: 90%; background-color:#ecf0f1; margin: 0 auto;"> <h1 style="text-align: center; background-color:#d6eaf8">Patient HPO profiles by cluster.</h1> <%= 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| "<p>#{patID}</p>" }.join("\n") element[3] = element[3].map{|profile| "<p>#{profile.map{|hpo_code| get_hpo_link(hpo_code)}.join(', ')}</p>" }.join("\n") element[4] = element[4].map{|transl_profile| "<p>#{transl_profile.join(', ')}</p>"}.join("\n") end data.unshift(["Cluster ID","Patients in Cluster","Patient IDs", "HPO codes", "Phenotypes"]) end %> </div>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pets-0.2.4 | templates/cluster_report.erb |
pets-0.2.3 | templates/cluster_report.erb |