Sha256: ffb6bf9ef118956fd500d2833d9aa5512b5e326636a718216162b0b91a7a6c11
Contents?: true
Size: 687 Bytes
Versions: 15
Compression:
Stored size: 687 Bytes
Contents
module SequenceServer # Sample hit link customization file. module Links SI_UNIPROT_IDPAT = /SI2.2.0.(\d*)/ SI_UNIPROT_IDMAP = YAML.load_file(File.expand_path('si_uniprot_idmap.yml', File.dirname(__FILE__))) def uniprot return unless accession.match(SI_UNIPROT_IDPAT) uniprot_id = SI_UNIPROT_IDMAP["SINV_#{Regexp.last_match[1]}"] return unless uniprot_id uniprot_id = encode uniprot_id url = "http://www.uniprot.org/uniprot/#{uniprot_id}" { :order => 2, :title => 'UniProt', :url => url, :icon => 'fa-external-link' } end end end
Version data entries
15 entries across 15 versions & 1 rubygems