Lue dans les fichiers PHP du paquet au commit 3b6770b81b11 : 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é.
EnrichmentclassOne term enriched in a set of proteins, as STRING's enrichment gives it: its category (Process, Function, Component for GO; KEGG, RCTM for Reactome, Pfam, InterPro, DISEASES, TISSUES, HPO, Keyword, PMID...), its term and description, how many of the proteins it holds against how many of the genome, the p-value and the false discovery rate, the proteins' names.
3 methods · 8 properties
InteractionclassOne interaction of STRING: two proteins, their combined score (0 to 1) and the score of each evidence channel that supports it (neighborhood, fusion, cooccurrence, coexpression, experiments, databases, textmining; StringSource::CHANNELS).
3 methods · 6 properties
StringSourceclassSTRING, the database of known and predicted protein-protein interactions (SIB, CPR, EMBL), through its API: a protein by its STRING id ("9606.ENSP00000269305", TP53), a UniProt accession, an Ensembl protein or a name in a species - its preferred name, annotation, species, its Ensembl protein as a cross-reference, and its interaction partners as related things, each partner's combined score a property; the network among several proteins and their functional enrichment (network(), enrichment(), outside the contract).
7 methods · 2 constants
StringSourceFactoryclassSTRING: a protein and its interaction partners, the network among proteins and their enrichment - no key needed.
6 options
Omnilab\StringDb
Enrichment class
final readonly class Enrichment Enrichment.php:15
One term enriched in a set of proteins, as STRING's enrichment gives it: its category (Process, Function, Component for GO; KEGG, RCTM for Reactome, Pfam, InterPro, DISEASES, TISSUES, HPO, Keyword, PMID...), its term and description, how many of the proteins it holds against how many of the genome, the p-value and the false discovery rate, the proteins' names.
public string $categorypublic string $termpublic ?string $descriptionpublic int $countpublic int $backgroundpublic float $pValuepublic float $fdrpublic array $proteinsthe preferred names of the proteins the term holds
Enrichment::__construct()
public function __construct(public string $category, public string $term, public ?string $description, public int $count, public int $background, public float $pValue, public float $fdr, public array $proteins = [])$proteinsthe preferred names of the proteins the term holds
Enrichment::fromRow()
public static function fromRow(array $row): ?self$rowa row of enrichment
Enrichment::identifier()
public function identifier(): ?IdentifierThe term as an identifier of a scheme Omnilab knows: a GO term (GO:0005344), an InterPro or Pfam entry, an HPO term, a GWAS trait (EFO:0005845), a Reactome pathway (STRING writes HSA-9927020, Reactome R-HSA-9927020); null for the others (KEGG's hsa05143, a PubMed id, a COMPARTMENTS, TISSUES or DISEASES term...).
Interaction class
final readonly class Interaction Interaction.php:14
One interaction of STRING: two proteins, their combined score (0 to 1) and the score of each evidence channel that supports it (neighborhood, fusion, cooccurrence, coexpression, experiments, databases, textmining; StringSource::CHANNELS).
public Identifier $apublic Identifier $bpublic float $scorepublic ?string $nameApublic ?string $nameBpublic array $channelsthe evidence channels' scores, by name
Interaction::__construct()
public function __construct(public Identifier $a, public Identifier $b, public float $score, public ?string $nameA = null, public ?string $nameB = null, public array $channels = [])$channelsthe evidence channels' scores, by name
Interaction::fromRow()
public static function fromRow(array $row): ?self$rowa row of interaction_partners or network
Interaction::evidence()
public function evidence(): arrayThe channels that support it, the strongest first: ['experiments' => 0.999, 'coexpression' => 0.978...]; a zero left out.
StringSource class
final class StringSource extends HttpSource StringSource.php:31
STRING, the database of known and predicted protein-protein interactions (SIB, CPR, EMBL), through its API: a protein by its STRING id ("9606.ENSP00000269305", TP53), a UniProt accession, an Ensembl protein or a name in a species - its preferred name, annotation, species, its Ensembl protein as a cross-reference, and its interaction partners as related things, each partner's combined score a property; the network among several proteins and their functional enrichment (network(), enrichment(), outside the contract).
No key, no account. STRING asks for one call a second at most and for the caller's identity in every call: a 1 s throttle by default and the caller_identity parameter. Two calls an entity (the mapping, the partners).
const BASE_URI = 'https://string-db.org/api/json/'const CHANNELS = ['nscore' => 'neighborhood', 'fscore' => 'fusion', 'pscore' => 'cooccurrence', 'ascore' => 'coexpression', 'escore' => 'experiments', 'dscore' => 'databases'…STRING's evidence channels, as its API names their scores.
StringSource::__construct()
public function __construct(HttpClientInterface $http, readonly ?string $species = '9606', readonly int $partners = 10, readonly int $requiredScore = 400, readonly string $callerIdentity = 'omnilab', string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 1.0)$speciesthe NCBI taxon a name or an accession is looked up in ("9606"); a STRING id says its own
$partnershow many partners entity() asks for, the best first (0: none, one call)
$requiredScorethe lowest combined score of an interaction, in thousandths (400: STRING's medium confidence)
StringSource::getName()
public function getName(): stringStringSource::capabilities()
public function capabilities(): arrayStringSource::entity()
public function entity(Identifier|string $id): ?EntityA protein by its STRING id ("9606.ENSP00000269305", "string:...", its page), by a UniProt accession or an Ensembl protein (in the configured species), or by a name STRING maps ("TP53", in the configured species); another base's identifier is refused before any call; null when STRING maps nothing.
StringSource::partners()
public function partners(Identifier|string $protein, int $limit = 10): arrayA protein's interaction partners, the best first, at the configured score or more: a STRING id, or what entity() reads. Outside the contract (an interaction is two things and a score, not an entity).
StringSource::network()
public function network(array $proteins): arrayThe interactions among proteins (two or more, of one species: STRING ids, or names in the configured species), at the configured score or more. Outside the contract.
StringSource::enrichment()
public function enrichment(array $proteins): arrayThe functional enrichment of a set of proteins against their genome (GO processes, functions and components, KEGG and Reactome pathways, Pfam and InterPro domains, diseases, tissues...): every term STRING finds at a false discovery rate under 5 %, the most significant first in each category. Outside the contract.
StringSourceFactory class
final class StringSourceFactory extends SourceFactory StringSourceFactory.php:23
STRING: a protein and its interaction partners, the network among proteins and their enrichment - no key needed.
options: mailto: 'support@glitchr.io' # in the User-Agent caller_identity: 'omnilab' # sent with every call, as STRING asks species: '9606' # the NCBI taxon a name or an accession is looked up in partners: 10 # how many partners entity() asks for (0: none, one call) required_score: 400 # the lowest combined score, in thousandths (400 medium, 700 high, 900 highest) throttle: 1 # seconds between two calls: STRING asks for one a second base_uri: 'https://string-db.org/api/json/'
Options
| Option | Default | |
|---|---|---|
caller_identity | 'omnilab' | |
species | '9606' | |
partners | 10 | |
required_score | 400 | |
throttle | 1.0 | |
base_uri | StringSource::BASE_URI |