Aller au contenu

omnilab/hgnc 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/hgnc:1.x-dev

Lue dans les fichiers PHP du paquet au commit 3cfaca8bf05f : 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\Hgnc

  • HgncSource class

    The HUGO Gene Nomenclature Committee, the authority that names human genes, through its REST service: a human gene by its HGNC id ("HGNC:4827"), its approved symbol ("HBB"), a previous symbol or an alias when one gene alone bears it ("FAM46C" is TENT5C), or another base's id HGNC records (NCBI Gene, Ensembl, UniProt, OMIM) - its approved name, locus type and group, chromosomal location, previous symbols and names, aliases, gene groups, status and dates, MANE Select transcripts, RefSeq and CCDS ids -, its NCBI Gene, Ensembl, UniProt and OMIM ids as cross-references; a search over every field.

    5 methods · 2 constants

  • HgncSourceFactory class

    HGNC: a human gene by its HGNC id, symbol or another base's id, its cross-references, a search - no key needed.

    2 options

Omnilab\Hgnc

HgncSource class

final class HgncSource extends HttpSource HgncSource.php:33

The HUGO Gene Nomenclature Committee, the authority that names human genes, through its REST service: a human gene by its HGNC id ("HGNC:4827"), its approved symbol ("HBB"), a previous symbol or an alias when one gene alone bears it ("FAM46C" is TENT5C), or another base's id HGNC records (NCBI Gene, Ensembl, UniProt, OMIM) - its approved name, locus type and group, chromosomal location, previous symbols and names, aliases, gene groups, status and dates, MANE Select transcripts, RefSeq and CCDS ids -, its NCBI Gene, Ensembl, UniProt and OMIM ids as cross-references; a search over every field.

No key, no account. HGNC asks for 10 calls a second at most: a 0.1 s throttle by default. One call a gene by id or symbol (up to three for a former symbol or an alias), one a search.

const BASE_URI = 'https://rest.genenames.org/'
const MAX_LIMIT = 500

The most genes a search page holds (HGNC answers them all at once).

HgncSource::__construct()

public function __construct(HttpClientInterface $http, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.1)

HgncSource::getName()

public function getName(): string

HgncSource::capabilities()

public function capabilities(): array

HgncSource::entity()

public function entity(Identifier|string $id): ?Entity

A human gene by its HGNC id ("HGNC:4827", "4827", its page), an id HGNC records for it (ncbi.gene, omim: with their scheme; an Ensembl gene, a UniProt accession), or a symbol: the approved one, else a previous symbol, else an alias, when one gene alone bears it; another base's identifier is refused before any call; null when HGNC knows none (or several: an id or a symbol two genes share names neither).

public function search(Query $query): Page

The genes whose fields hold the text (symbols, names, aliases, ids: HGNC's search over every field; "*" a wildcard), the best scored first; a domain other than biology answers nothing. An entity of a page holds the gene's id and symbol: entity() reads it whole.

HgncSourceFactory class

final class HgncSourceFactory extends SourceFactory HgncSourceFactory.php:19

HGNC: a human gene by its HGNC id, symbol or another base's id, its cross-references, a search - no key needed.

options: mailto: 'support@glitchr.io' # in the User-Agent throttle: 0.1 # seconds between two calls: HGNC asks for 10 a second at most base_uri: 'https://rest.genenames.org/'

Options

OptionDefault
throttle0.1
base_uriHgncSource::BASE_URI