Skip to content

omnilab/hgnc API reference

Floor
Provider · Omnilab
Version
1.x
Conformance suite
not wired
Verified for real
Its README does not say
Licence
MIT
composer require omnilab/hgnc:1.x-dev

Read from the package's own PHP files at the commit 3cfaca8bf05f: 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.

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