Aller au contenu

omnilab/chebi Référence de l’API

Étage
Fournisseur · Omnilab
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Son README ne le dit pas
Licence
MIT
composer require omnilab/chebi:1.x-dev

Lue dans les fichiers PHP du paquet au commit b318dbabe7a0 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Omnilab\Chebi

  • ChebiSource class

    ChEBI, the EMBL-EBI's dictionary of chemical entities of biological interest, through the REST API of ChEBI 2.0 (www.ebi.ac.uk/chebi/backend/api): an entity by its ChEBI id (a secondary id gives its primary entry), an InChIKey, a CAS number, a KEGG id or a name; its definition, formula, masses, charge, structure (SMILES, InChI, InChIKey, an SVG depiction), its ontology - what it is a kind of, its roles, its functional parents, its conjugates - and its identifiers in other bases; a search by text.

    5 methods · 2 constants

  • ChebiSourceFactory class

    ChEBI: chemical entities of biological interest, their structure, their ontology (classes, roles) and cross-references - no key needed.

    3 options

Omnilab\Chebi

ChebiSource class

final class ChebiSource extends HttpSource ChebiSource.php:32

ChEBI, the EMBL-EBI's dictionary of chemical entities of biological interest, through the REST API of ChEBI 2.0 (www.ebi.ac.uk/chebi/backend/api): an entity by its ChEBI id (a secondary id gives its primary entry), an InChIKey, a CAS number, a KEGG id or a name; its definition, formula, masses, charge, structure (SMILES, InChI, InChIKey, an SVG depiction), its ontology - what it is a kind of, its roles, its functional parents, its conjugates - and its identifiers in other bases; a search by text.

No key, no account. An entity by its ChEBI id costs one call; by anything else, a search first (two). The SOAP web service of ChEBI 1 is gone (its WSDL answers 500).

const BASE_URI = 'https://www.ebi.ac.uk/chebi/backend/api/public/'
const MAX_PER_PAGE = 100

The most entities one search page is asked for.

ChebiSource::__construct()

public function __construct(HttpClientInterface $http, readonly int $synonyms = 20, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)
$synonyms

how many synonyms to keep (0: none)

ChebiSource::getName()

public function getName(): string

ChebiSource::capabilities()

public function capabilities(): array

ChebiSource::entity()

public function entity(Identifier|string $id): ?Entity
public function search(Query $query): Page

ChEBI's own search (es_search): an exact match first when there is one, then the entries whose names, definition or identifiers hold the text; read from the search's documents - entity() reads the rest.

ChebiSourceFactory class

final class ChebiSourceFactory extends SourceFactory ChebiSourceFactory.php:20

ChEBI: chemical entities of biological interest, their structure, their ontology (classes, roles) and cross-references - no key needed.

options: mailto: 'support@glitchr.io' # in the User-Agent: whom the EBI writes to before it blocks a caller synonyms: 20 # how many synonyms to keep (0: none) throttle: 0 # seconds between two calls: the EBI publishes no figure for ChEBI base_uri: 'https://www.ebi.ac.uk/chebi/backend/api/public/'

Options

OptionDefault
synonyms20
throttle0.0
base_uriChebiSource::BASE_URI