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

List of HPOs found

<%= 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 %>

Input HPO quality control

<%= 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 %>