Read from the package's own PHP files at the commit be0022f15433: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
AssociationclassOne association of Open Targets: a target (an Ensembl gene) and a disease or phenotype (EFO, Mondo, HPO, Orphanet), the overall score (0 to 1, the harmonic sum of the evidence) and the score of each data type that supports it (genetic_association, somatic_mutation, known_drug, affected_pathway, literature, rna_expression, animal_model, genetic_literature, clinical...).
1 method · 7 properties
OpenTargetsSourceclassThe Open Targets Platform (EMBL-EBI, Wellcome Sanger, GSK and partners) through its GraphQL API: a target by its Ensembl gene ("ENSG00000244734", HBB) - its symbol, name, biotype, function, location, class, its UniProt and HGNC ids, its best associated diseases with their scores, its drugs and clinical candidates, its InterPro domains and Reactome pathways -; a disease or phenotype by its EFO, Mondo, HPO or Orphanet id ("MONDO_0011382", sickle cell disease) - its name, description, synonyms, therapeutic areas, parents, its ids in other ontologies, its best associated targets, its drugs -; a drug by its ChEMBL id - its type, stage, mechanisms of action and their targets, indications, trade names -; a search over the three; the associations themselves, paged (associations(), outside the contract).
6 methods · 2 constants
OpenTargetsSourceFactoryclassOpen Targets Platform: targets, diseases and drugs, their associations with scores, a search - no key needed.
3 options
Omnilab\OpenTargets
Association class
final readonly class Association Association.php:15
One association of Open Targets: a target (an Ensembl gene) and a disease or phenotype (EFO, Mondo, HPO, Orphanet), the overall score (0 to 1, the harmonic sum of the evidence) and the score of each data type that supports it (genetic_association, somatic_mutation, known_drug, affected_pathway, literature, rna_expression, animal_model, genetic_literature, clinical...).
public Identifier $targetpublic ?string $targetNamepublic ?Identifier $diseasenull when the disease's id is in no scheme of the core (OTAR_...)
public string $diseaseIdpublic ?string $diseaseNamepublic float $scorepublic array $datatypesthe data types' scores, the strongest first
Association::__construct()
public function __construct(public Identifier $target, public ?string $targetName, public ?Identifier $disease, public string $diseaseId, public ?string $diseaseName, public float $score, public array $datatypes = [])$diseasenull when the disease's id is in no scheme of the core (OTAR_...)
$datatypesthe data types' scores, the strongest first
OpenTargetsSource class
final class OpenTargetsSource extends HttpSource OpenTargetsSource.php:36
The Open Targets Platform (EMBL-EBI, Wellcome Sanger, GSK and partners) through its GraphQL API: a target by its Ensembl gene ("ENSG00000244734", HBB) - its symbol, name, biotype, function, location, class, its UniProt and HGNC ids, its best associated diseases with their scores, its drugs and clinical candidates, its InterPro domains and Reactome pathways -; a disease or phenotype by its EFO, Mondo, HPO or Orphanet id ("MONDO_0011382", sickle cell disease) - its name, description, synonyms, therapeutic areas, parents, its ids in other ontologies, its best associated targets, its drugs -; a drug by its ChEMBL id - its type, stage, mechanisms of action and their targets, indications, trade names -; a search over the three; the associations themselves, paged (associations(), outside the contract).
No key, no account, no published rate: no throttle by default. One call an entity, one a search page.
const BASE_URI = 'https://api.platform.opentargets.org/api/v4/'const MAX_LIMIT = 100The most hits a search page holds.
OpenTargetsSource::__construct()
public function __construct(HttpClientInterface $http, readonly int $associations = 10, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)$associationshow many associations (and drugs) an entity holds as properties, the best first
OpenTargetsSource::getName()
public function getName(): stringOpenTargetsSource::capabilities()
public function capabilities(): arrayOpenTargetsSource::entity()
public function entity(Identifier|string $id): ?EntityA target by its Ensembl gene ("ENSG00000244734"), a disease or a phenotype by its EFO, Mondo, HPO or Orphanet id ("MONDO_0011382", "MONDO:0011382", "EFO_0000305", "HP_0001878", "Orphanet_232"), a drug by its ChEMBL id ("CHEMBL4101807"); another base's identifier (an Ensembl transcript or protein among them) is refused before any call; null when Open Targets has no such thing.
OpenTargetsSource::search()
public function search(Query $query): PageTargets, diseases and drugs matching a text, Open Targets' ranking; a domain other than biology answers nothing. An entity of a page holds its name and description: entity() reads it whole. A hit in no scheme of the core (a therapeutic area, OTAR_...) is left out.
OpenTargetsSource::associations()
public function associations(Identifier|string $id, int $limit = 25, ?string $cursor = null): PageThe associations of a target with diseases, or of a disease with targets, the best scored first, one page at a time (the cursor is the page's index). Outside the contract: an association is two things and a score.
OpenTargetsSourceFactory class
final class OpenTargetsSourceFactory extends SourceFactory OpenTargetsSourceFactory.php:20
Open Targets Platform: targets, diseases and drugs, their associations with scores, a search - no key needed.
options: mailto: 'support@glitchr.io' # in the User-Agent associations: 10 # associations (and drugs) an entity holds as properties, the best first throttle: 0 # seconds between two calls: Open Targets publishes no rate base_uri: 'https://api.platform.opentargets.org/api/v4/'
Options
| Option | Default | |
|---|---|---|
associations | 10 | |
throttle | 0.0 | |
base_uri | OpenTargetsSource::BASE_URI |