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 options
Object optional Name Type Default Description organism
Boolean true optional Enrich with organism name.
context
Boolean true optional Enrich with JSON-LD @context.
dataset
Boolean true optional Enrich from data-sources.txt (metadata about biological datasets).
xref
Boolean 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 input
Object | 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 }
options
Object optional Name Type Default Description organism
Boolean true optional Enrich with organism name.
context
Boolean true optional Enrich with JSON-LD @context.
dataset
Boolean true optional Enrich from data-sources.txt (metadata about biological datasets).
xref
Boolean true optional Enrich with IRI (URL) for BridgeDb webservices to enable getting xrefs for this entity reference.
Returns:
EntityReference
with 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 systemCode
String identifier
String organism
String | Organism Organism
or 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 args
Object Name Type Description attribute
String Attribute value to be used as search term
organism
String | Organism Organism
or name in English or Latin or taxonomy IRI like http://identifiers.org/taxonomy/9606.args.type
JsonldType 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.db
String 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 args
Object Name Type Description targetPreferredPrefix
String The Miriam namespace / identifiers.org preferredPrefix.
sourceEntityReference
String | Object @see bridgeDb.entityReference.enrich() method for what constitutes a usable entityReference
Returns:
One or moreentity references
with the target preferredPrefix.
-
innernormalize(entityReference){Stream.<EntityReference>}
-
Normalize object properties
Name Type Description entityReference
String | Object Returns:
EntityReference