omnilab / uniprot
Omnilab UniProt: a protein of UniProtKB by accession or entry name - its names, gene, organism, function, length, mass and sequence, cofactors, ligands, location and keywords, its NCBI Gene and Ensembl genes as cross-references, its organism, PDB structures and ligands as related things - and UniPro
Requires
- php: >=8.2
- omnisense/omnilab: ^1.0@dev
- symfony/http-client: ^6.4|^7.0|^8.0
Requires (Dev)
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-26 10:05:45 UTC
README
UniProtKB for omnisense/omnilab: a protein by its accession or its entry name; its names, gene, organism, function, length, mass and sequence, where it sits in the cell, its cofactors and the ligands of its binding sites, its keywords; its genes in NCBI Gene and Ensembl as cross-references for the Collector to follow, and its organism, its PDB structures and its ligands as related things; UniProt's search, page after page. Through the UniProt REST API, no key.
$uniprot = (new UniProtSourceFactory($http))->create(['mailto' => 'support@glitchr.io']); $hbb = $uniprot->entity('P68871'); $hbb->label; // Hemoglobin subunit beta $hbb->value('gene'); // HBB $hbb->property('mass'); // 15998 Da $hbb->property('sequence_length'); // 147 aa $hbb->identifier(Scheme::NCBI_GENE); // 3043 $hbb->related('organism')->value(Scheme::NCBI_TAXON); // 9606 $hbb->related('ligand')->keys(); // chebi:58248, chebi:60344 (2,3-bisphosphoglycerate, heme b) $uniprot->entity('HBB_HUMAN'); // the same, by its entry name; 'A4GX73', merged into it, too $uniprot->search(new Query('gene:HBB AND organism_id:9606', limit: 10));
omnilab: sources: uniprot: factory: uniprot options: mailto: 'support@glitchr.io' # in the User-Agent: whom UniProt writes to before it blocks a caller sequence: 2000 # the longest sequence given as a property, in residues; 0: none structures: 20 # how many PDB structures to keep among the related things; 0: none
With NCBI and Wikidata configured too, the Collector follows a protein to its gene and its
item: $collector->collect('uniprot', 'P68871') reaches NCBI Gene by GeneID 3043 and Wikidata by
the UniProt accession its item carries (P352).
Terms of use
UniProt's data is under CC BY 4.0: cite UniProt
where you show it. No key, no account; no rate is published for the REST API (only the stream
endpoint, not used here, answers 429 when too many run at once). The source asks each entry for
the fields it reads - one call, a few dozen kilobytes instead of hundreds - and makes its calls in
series: cache what it answers.
See docs/ for what is read, how it maps, and what UniProt does not give here.
Responsibility
This package is an independent, unofficial client: it is not affiliated with, endorsed by or sponsored by the UniProt Consortium. It reaches their service on behalf of whoever runs it, and it does not redistribute their data beyond the short excerpts recorded as test fixtures. Its MIT licence covers this package's code only and grants no right to the service or to its data.
Whoever installs and runs this package is responsible for complying with the terms above, for obtaining whatever they require (an account, a key, a licence or subscription, an attribution or a citation, a rate limit to respect), and for any use made of what it returns. The authors publish it free of charge, make no commercial use of it, and accept no liability for how it is used (see LICENSE).
License: MIT.