diff --git a/Gemfile.lock b/Gemfile.lock index 22c95b35..69596ee9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: daea7822af9e5ca1961d6873a758735133a1b2db + revision: 657149d6b33813253fa7440252f69c04e0631190 branch: master specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: a7ad210e846a390f203457be2459719214d142fe + revision: 7783784f9d2ceada9be706cf6c084d272ae653e8 branch: master specs: ontologies_linked_data (0.0.1) @@ -52,18 +52,18 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) - bcrypt (3.1.19) + bcrypt (3.1.20) + bigdecimal (3.1.5) builder (3.2.4) coderay (1.1.3) concurrent-ruby (1.2.2) connection_pool (2.4.1) cube-ruby (0.0.3) - date (3.3.3) + date (3.3.4) docile (1.4.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20231109) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -93,10 +93,10 @@ GEM domain_name (~> 0.5) i18n (0.9.5) concurrent-ruby (~> 1.0) - json (2.6.3) - json_pure (2.6.3) - libxml-ruby (4.1.1) - logger (1.5.3) + json (2.7.1) + json_pure (2.7.1) + libxml-ruby (4.1.2) + logger (1.6.0) macaddr (1.7.2) systemu (~> 2.6.5) mail (2.8.1) @@ -107,23 +107,24 @@ GEM method_source (1.0.0) mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.1003) + mime-types-data (3.2023.1205) mini_mime (1.1.5) minitest (4.7.5) multi_json (1.15.0) multipart-post (2.3.0) net-http-persistent (2.9.4) - net-imap (0.3.7) + net-imap (0.4.8) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout net-smtp (0.4.0) net-protocol netrc (0.11.0) - oj (3.16.1) + oj (3.16.3) + bigdecimal (>= 3.0) omni_logger (0.1.4) logger pony (1.13.1) @@ -131,7 +132,7 @@ GEM pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.3) + public_suffix (5.0.4) rack (3.0.8) rack-test (2.1.0) rack (>= 1.3) @@ -140,7 +141,7 @@ GEM addressable (>= 2.2) redis (5.0.8) redis-client (>= 0.17.0) - redis-client (0.18.0) + redis-client (0.19.0) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -165,11 +166,8 @@ GEM simplecov_json_formatter (0.1.4) systemu (2.6.5) thread_safe (0.3.6) - timeout (0.4.0) + timeout (0.4.1) tzinfo (0.3.62) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) uuid (2.3.9) macaddr (~> 1.0) diff --git a/lib/ncbo_annotator.rb b/lib/ncbo_annotator.rb index 85948a55..caf2198a 100644 --- a/lib/ncbo_annotator.rb +++ b/lib/ncbo_annotator.rb @@ -3,7 +3,7 @@ # require 'sparql_http' # require 'ontologies_linked_data' # require_relative 'dictionary/generator' - +require 'uri' require 'zlib' require 'redis' require 'ontologies_linked_data' @@ -723,6 +723,9 @@ def mappings_for_class_ids(class_ids) end def hierarchy_query(class_ids) + # mdorf, 12/14/2023: AllegroGraph throws a MalformedQuery exception + # if an ID is not of the proper URI format + class_ids.select! { |id| id =~ URI::regexp } filter_ids = class_ids.map { |id| "?id = <#{id}>" } .join " || " query = < ?parent . }