Module: Sylfy::Service::ChEBI

Defined in:
lib/sylfy/service/ebisoap.rb

Defined Under Namespace

Classes: SOAP

Class Method Summary collapse

Class Method Details

.idbyinchi(inchi) ⇒ Object

Search ChEBI database using InChI

Parameters:

inchi

inchi string to search



32
33
34
35
# File 'lib/sylfy/service/ebisoap.rb', line 32

def idbyinchi(inchi)
             output = Sylfy::Service::ChEBI::SOAP.new.get_structure_search(structure: Rubabel[inchi, :inchi].to_s(:can), type: 'SMILES', structureSearchCategory: 'IDENTITY')
             return output != nil ? ["urn:miriam:chebi:#{output[:list_element][:chebi_id]}"] : []
end