protectednew BridgeDb.EntityReference(instance)
Used internally to create a new EntityReference instance
| Name | Type | Description |
|---|---|---|
instance |
Object |
Methods
-
innercreateEnrichmentStream(options){Stream}
-
Create a Node.js/Highland stream through which entity references can be piped to enrich each one with data from BridgeDb.
Name Type Description optionsObject optional Name Type Default Description organismBoolean true optional Enrich with organism name.
contextBoolean true optional Enrich with JSON-LD @context.
datasetBoolean true optional Enrich from data-sources.txt (metadata about biological datasets).
xrefBoolean true optional Enrich with IRI (URL) for BridgeDb webservices to enable getting xrefs for this entity reference.
-
innerenrich(input, options){Stream.<EntityReference>}
-
Enrich entity reference. Default is to enrich as much as possible with data from BridgeDb, with the exception of not dereferencing any xref IRIs, but this enrichment can be controlled by setting the relevant option(s) to false.
Name Type Description inputObject | String | Stream Entity reference(s). Each one must have an identifier (e.g. ENSG00000160791) and means for identifying the dataset.
Acceptable entityReference input arguments:
1. BridgeDb xref IRI (URL) or identifiers.org IRI as string BridgeDb xref IRI @example: 'http://webservice.bridgedb.org/Human/xrefs/L/1234' identifiers.org IRI @example: 'http://identifiers.org/ncbigene/1234' 2. Object with at least one of these properties: a. { 'id': identifiers.org IRI } b. { bridgeDbXrefsIri: BridgeDb xref IRI } c. { xref: [ BridgeDb xref IRI ... ] } 3. Object with both of these properties: { db: official, standardized database name identifier: entity reference identifier, such as ChEBI:1234 } 4. Object with both of these properties: { bridgeDbDataSourceName: database name as used in BridgeDb identifier: entity reference identifier, such as ChEBI:1234 }optionsObject optional Name Type Default Description organismBoolean true optional Enrich with organism name.
contextBoolean true optional Enrich with JSON-LD @context.
datasetBoolean true optional Enrich from data-sources.txt (metadata about biological datasets).
xrefBoolean true optional Enrich with IRI (URL) for BridgeDb webservices to enable getting xrefs for this entity reference.
Returns:
EntityReferencewith as many properties as possible added, unless otherwise specified by options.
-
innerexists(systemCode, identifier, organism){Stream.<Boolean>}
-
Check whether an entity reference with the specified identifier is known by the specified dataset.
Name Type Description systemCodeString identifierString organismString | Organism Organismor name in English or Latin or taxonomy IRI like http://identifiers.org/taxonomy/9606.Returns:
Whether specified entity reference exists.
-
innerfreeSearch(args, organism){Stream.<EntityReference>}
-
Get potential matches for a desired entity reference by free text search for matching symbols or identifiers. See also Java documentation.
Name Type Description argsObject Name Type Description attributeString Attribute value to be used as search term
organismString | Organism Organismor name in English or Latin or taxonomy IRI like http://identifiers.org/taxonomy/9606.args.typeJsonldType optional Entity reference type, such as ProteinReference, DnaReference, SmallMoleculeReference, etc. Not currently being used, but we might use it in the future to help narrow down the search results.
args.dbString optional Desired dataset name, such as Ensembl or Uniprot
Returns:
EntityReference, enriched from data-sources.txt and BridgeDb organism data.
Example
myBridgeDbInstance.entityReference.freeSearch({ attribute: 'Nfkb1', organism: 'Mouse' }).each(function(searchResult) { console.log('Result for Nfkb1'); console.log(searchResult); });
-
innermap(args){Stream.<EntityReference>}
-
Name Type Description argsObject Name Type Description targetPreferredPrefixString The Miriam namespace / identifiers.org preferredPrefix.
sourceEntityReferenceString | Object @see bridgeDb.entityReference.enrich() method for what constitutes a usable entityReference
Returns:
One or moreentity referenceswith the target preferredPrefix.
-
innernormalize(entityReference){Stream.<EntityReference>}
-
Normalize object properties
Name Type Description entityReferenceString | Object Returns:
EntityReference