TypeScript icon, indicating that this package has built-in type declarations

6.2.7 • Public • Published


JS client for the BridgeDb ID mapping framework webservice. If you want to use the version, see the 5x branch.

##API Documentation



<script src=""></script>


npm install --save bridgedb

Simple Example

var BridgeDb = require('bridgedb').default; // Omit this line unless you're using Node.js

var bridgeDbInstance = new BridgeDb();'Mouse', 'Nfkb1')
  .subscribe(function(searchResult) {
    console.log('Result for Nfkb1');

More Complex Example

Use ES2015, options and error catching.

import BridgeDb from 'bridgedb';

const bridgeDbInstance = new BridgeDb({
  baseIri: '',
  dataSourcesHeadersIri: ''
  dataSourcesMetadataIri '',
});'Mouse', 'Nfkb1')
  .subscribe(function(searchResult) {
    console.log('Result for Nfkb1');
  }, function(err) {
    throw err;
  }, function() {

The methods return RxJS Observables, meaning can use subscribe as shown above to get the next values, catch errors and be notified when the observable is complete.

For more examples, see the test directory.

For Developers

  1. Install Node.js
  2. Fork this repo (if you don't have commit rights to it)
  3. git clone (or use your fork's URL)
  4. cd bridgedbjs
  5. npm install
  6. Make sure the tests pass: test documentation.
  7. Refactor the code. Add new tests for your changes if not already covered by the existing tests.
  8. Make sure the tests all pass.
  9. Send a pull request from your local repo to the master branch of this repo.


Each time this library is instantiated, it downloads the following files:

These files are accessed via the RawGit CDN. The desired version of the files to download is specified in src/main.ts as the commit hash of the latest release of bridgedbjs, e.g/, 24186142d05b5f811893970b9a5d61a06f241f68 to produce a URL like


  • [ ] Set up mockserver so it "caches" the API response from an endpoint the first time it's called. Right now, we need to create new mocks for API endpoints manually. (I have the code for doing this already working somewhere.)
  • [ ] UI components
    • [ ] Use React without Redux.
    • [ ] Make it possible to use the UI components individually and in any combination.
    • [ ] Build tests. Current tests are not working.
  • [ ] Check handling of no results returned for attributeSearch for both the API client and the UI component.
  • [ ] Possibly require that inputs to attributeSearch be at least three characters in length.


npm install throws an error like library not found for -lgcc_s.10.5

  • This appears to be particular to certain Node and OS X versions and can be fixed with a symlink: >cd /usr/local/lib >sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib


DownloadsWeekly Downloads






Unpacked Size

8.51 MB

Total Files


Last publish


  • jacobwindsor
  • ariutta
  • alexanderpico
  • larsgw