class EuPathDBGeneInformation
Each gene in the gene information table is represented by 2 types of information - info and tables. info are 1 line data, whereas tables are tables of data with possibly multiple rows
Public Instance Methods
add_information(key, value)
click to toggle source
# File lib/eupathdb_gene_information_table.rb, line 141 def add_information(key, value) @info ||= {} @info[key] = value "Added info #{key}, now is #{@info[key]}" end
add_table(name, headers, data)
click to toggle source
# File lib/eupathdb_gene_information_table.rb, line 147 def add_table(name, headers, data) @tables ||= {} @tables[name] = [] data.each do |row| final = {} row.each_with_index do |cell, i| final[headers[i]] = cell end @tables[name].push final end end
get_info(key)
click to toggle source
# File lib/eupathdb_gene_information_table.rb, line 132 def get_info(key) @info[key] end
Also aliased as: []
get_table(table_name)
click to toggle source
# File lib/eupathdb_gene_information_table.rb, line 137 def get_table(table_name) @tables[table_name] end
info()
click to toggle source
# File lib/eupathdb_gene_information_table.rb, line 128 def info @info end