Yesterday, Deepak wrote about BridgeDB, a software package to deal with the “identifier mapping problem”. Put simply, biologists can name a biological entity in any way that they like, leading to multiple names for the same object. Easily solved, you might think, by choosing one identifier and sticking to it, but that’s apparently way too much of a challenge.
However, there are times when this situation is forced upon us. Consider this code snippet, which uses the Bioconductor package GEOquery via the RSRuby library to retrieve a sample from the GEO database:
require "rubygems"
require "rsruby"
if ENV['R_HOME'].nil?
ENV['R_HOME'] = "/usr/lib/R"
end
r = RSRuby.instance
r.library("GEOquery")
sample = r.getGEO("GSM434143")
table = r.Table(sample)
keys = table.keys
puts keys
# ["DETECTION.P.VALUE", "ABS_CALL", "ID_REF", "VALUE"]
All good so far. What if I try to save the data table, which contains entries such as { “DETECTION.P.VALUE” => “0.000146581″ }, to my new favourite database, MongoDB?
key must not contain '.'
So what am I to do, other than modify the key using something like:
newkey = key.gsub(/\./, "_")
Voilà, my own personal contribution to the identifier mapping problem.
What’s the solution? Here are some options – rank them in order of silliness if you like:
- Biological databases should avoid potentially “troublesome” keys
- Database designers should allow any symbols in keys
- Database driver writers should include methods to check keys and alter them if necessary
- End users should create their own maps by storing the original key with the modified version


