Lue dans les fichiers PHP du paquet au commit 4f6c9c06bc72 : 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é.
UniProtSourceclassUniProtKB, the protein knowledgebase of the UniProt consortium (EMBL-EBI, SIB, PIR), through its REST API (rest.uniprot.org): a protein by its accession (P68871) or its entry name (HBB_HUMAN); 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 NCBI Gene and Ensembl genes as cross-references, its organism, structures and ligands as related things; and UniProt's search, page after page.
5 methods · 4 constants
UniProtSourceFactoryclassUniProtKB: proteins, their function, gene, organism, sequence, cofactors and ligands, their genes in NCBI Gene and Ensembl - no key needed.
4 options
Omnilab\UniProt
UniProtSource class
final class UniProtSource extends HttpSource UniProtSource.php:32
UniProtKB, the protein knowledgebase of the UniProt consortium (EMBL-EBI, SIB, PIR), through its REST API (rest.uniprot.org): a protein by its accession (P68871) or its entry name (HBB_HUMAN); 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 NCBI Gene and Ensembl genes as cross-references, its organism, structures and ligands as related things; and UniProt's search, page after page.
No key. An entry costs one call, asked for the fields read here only (an entry whole runs to hundreds of kilobytes); an accession merged into another gives that other.
const BASE_URI = 'https://rest.uniprot.org/uniprotkb/'const MAX_PER_PAGE = 500The most entries one search page is asked for (UniProt stops at 500).
const ENTRY_FIELDS = 'accession,id,reviewed,protein_name,gene_names,organism_name,organism_id,protein_existence,annotation_score,cc_function,cc_cofactor,cc_subcellular_location,e…The fields entity() asks for.
const SEARCH_FIELDS = 'accession,id,reviewed,protein_name,gene_names,organism_name,organism_id,protein_existence,annotation_score,cc_function,length,mass,xref_geneid,xref_ensembl'The fields of a search result: no sequence, no structures.
UniProtSource::__construct()
public function __construct(HttpClientInterface $http, readonly int $sequence = 2000, readonly int $structures = 20, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)$sequencethe longest sequence given as a property, in residues (0: none)
$structureshow many PDB structures to keep among the related things (0: none)
UniProtSource::getName()
public function getName(): stringUniProtSource::capabilities()
public function capabilities(): arrayUniProtSource::entity()
public function entity(Identifier|string $id): ?EntityUniProtSource::search()
public function search(Query $query): PageUniProt's search: the text in UniProt's query syntax ("hemoglobin beta", "gene:HBB AND organism_id:9606", "reviewed:true AND ec:4.2.1.1"), the best first; the cursor of the next page comes in the answer's Link header, the total in X-Total-Results.
UniProtSourceFactory class
final class UniProtSourceFactory extends SourceFactory UniProtSourceFactory.php:21
UniProtKB: proteins, their function, gene, organism, sequence, cofactors and ligands, their genes in NCBI Gene and Ensembl - no key needed.
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) throttle: 0 # seconds between two calls: UniProt publishes no figure base_uri: 'https://rest.uniprot.org/uniprotkb/'
Options
| Option | Default | |
|---|---|---|
sequence | 2000 | |
structures | 20 | |
throttle | 0.0 | |
base_uri | UniProtSource::BASE_URI |