Sha256: f984124c3b8e007e737d1278e2169b2c93fa4bd6859dfd27aa8f7e141b9843d8
Contents?: true
Size: 1.67 KB
Versions: 3
Compression:
Stored size: 1.67 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 def get_gene_link(gene_code) link = '-' if gene_code != '-' link = "<a href=\"https://www.genenames.org/tools/search/#!/genes?query=#{gene_code}\">#{gene_code}</a>" end return link end %> <div style="width: 90%; background-color:#ecf0f1; margin: 0 auto;"> <h1 style="text-align: center; background-color:#d6eaf8">List of HPOs found</h1> <%= table(id: :table_uniq_hpos, header: true, styled: 'dt', attrib: {'class' => 'table table-striped'}) do |data_array| header = data_array.shift data_array.each do |row| hpo_name = hpo.translate_id(row.first.to_sym) row << get_hpo_link(row.last) row[0] = hpo_name end header.unshift('HPO Name') data_array.unshift(header) end %> </div> <div style="width: 90%; background-color:#ecf0f1; margin: 0 auto;"> <h1 style="text-align: center; background-color:#d6eaf8">Input HPO quality control</h1> <%= table(id: :table1, header: true, styled: 'dt', attrib: {'class' => 'table table-striped'}) do |data_array| header = data_array.shift data_array.each do |row| row.each_with_index do |cell, i| if i == 5 hpo_name, rejected = hpo.translate_ids([cell]) row[i] = "#{hpo_name.first}, #{get_hpo_link(cell)}" elsif i == 6 row[i] = cell.round(6) elsif i == 10 genes = cell.split(',') row[i] = genes.map{|gene| get_gene_link(gene)}.join(',') end end end data_array.unshift(header) end %> </div>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pets-0.2.5 | templates/reg2phen_report.erb |
pets-0.2.4 | templates/reg2phen_report.erb |
pets-0.2.3 | templates/reg2phen_report.erb |