Method: Exodb::Mapping.convert

Defined in:
lib/exodb/datamodel/reference.rb

.convert(locstr, target = Exodb::LATESTASSEMBLY) ⇒ Object



67
68
69
70
71
72
73
74
# File 'lib/exodb/datamodel/reference.rb', line 67

def self.convert(locstr, target = Exodb::LATESTASSEMBLY)
  begin
    query = parse_locstr(locstr)
    return self.where({from: query['assembly'], to: target, :start.lte => query[:pos], :stop.gte => query[:pos]}).first.convert(query[:pos])
  rescue
    
  end
end