Skip to content

Commit

Permalink
Merge branch 'hotfix/3.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmacias committed Mar 29, 2023
2 parents 5aa6b68 + 0305195 commit 421946d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions app/lib/mappings_manager/source_mappings/fetch_pdb_from_emdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module FetchPdbFromEmdb
def queryPDBfromEMDB(emdbId)
emdbToPDB = Hash.new
if emdbId =~ /^EMD-\d+$/
request = makeRequest(Server+EmdbFit,emdbId)
request = makeRequest("https://www.ebi.ac.uk/emdb/api/entry/fitted/",emdbId)
else
request = nil
end
Expand All @@ -20,16 +20,7 @@ def queryPDBfromEMDB(emdbId)
rescue
raise Server+EmdbFit+"/"+emdbId+" DID NOT RETURN A JSON OBJECT"
end
#json = JSON.parse(request)
json.each do |k,v|
tmpArray = []
v.each do |fit|
if fit != {}
tmpArray+=fit["fitted_emdb_id_list"]["pdb_id"]
end
end
emdbToPDB[k]=tmpArray
end
emdbToPDB[json['emdb_id']]=[json['crossreferences']['pdb_list']['pdb_reference'][0]["pdb_id"]]
myStatus = :ok
if emdbToPDB == {}
myStatus = :not_found
Expand Down

0 comments on commit 421946d

Please sign in to comment.