% def get_hpo_link(hpo_code) # STDERR.puts hpo_code.inspect if hpo_code == '-' link = '-' else link = "#{hpo_code}" end return link end def red_text(text) return "#{text}" end def add_tip(text, help_text) return "
HPO terms with IC values less than 1 are marked in red, and they do not give much information to our system. Please, if possible, select more specific HPO terms suggested in Possible child HPO terms column.
<%= table(id: :characterised_hpos, header: true, border: 2, cell_align: %w(left center center center center left)) do |data| data.each do |row| row.each_with_index do |cell, i| if i == 1 # STDERR.puts cell.inspect row[i] = get_hpo_link(cell) elsif i == 4 row[i] = cell.map{|h,n| [get_hpo_link(h), n].compact}.join(', ') elsif i == 5 row[i] = cell.map{|r| "#{get_hpo_link(r.first)} (#{r.last})"}.join(', ') elsif i == 3 ci = cell.to_f if ci <= 1 text = red_text(ci.round(2)) else text = ci.round(2) end row[i] = text elsif i == 2 if cell == 'no' row[i] = red_text(cell) end end end end data.unshift([add_tip("HPO name", "Name of the HPO"), "HPO code", "Exists in database?", "Information Coefficient (IC)", "Is child of", "Possible child HPO terms"]) end %>The following table shows all the predicted genomic regions, the HPO terms found for it, their original association values and the calculated combined score. Results are ranked from the highest to the lowest combined score.
<%= if !@hash_vars[:merged_regions].nil? gene_var = @hash_vars[:genes_with_kegg_data] table(id: :merged_regions, header: true, border: 2, cell_align: %w(center center center left center center)) do |data| hpo_metadata = @hash_vars[:hpo_metadata] data.each_with_index do |row, row_number| row.each_with_index do |cell, i| if i == 3 row[i] = cell.map{|h| "#{get_hpo_link(h)}: #{hpo_metadata[h][1]}"}.join("\n#{["GeneID", "Gene Names", "Description", "KEGG pathways"].join(' | ')} | |||
---|---|---|---|---|
#{geneID} | " if !attributes.nil? table << "#{attributes[0][0..1].join(', ')} | " table << "#{attributes[1]} | " table << "#{attributes[2].map{|pws| "#{pws.last}"}.join(' ')} | "
else
table << '' * 3 end table << ' |