npm install --save bridgedb
var BridgeDb = default; // Omit this line unless you're using Node.jsvar bridgeDbInstance = ;bridgeDbInstance;
More Complex Example
Use ES2015, options and error catching.
;const bridgeDbInstance =baseIri: ''dataSourcesHeadersIri: ''dataSourcesMetadataIri '';bridgeDbInstance;
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.
- Install Node.js
- Fork this repo (if you don't have commit rights to it)
git clone https://github.com/bridgedb/bridgedbjs.git(or use your fork's URL)
- Make sure the tests pass: test documentation.
- Refactor the code. Add new tests for your changes if not already covered by the existing tests.
- Make sure the tests all pass.
- 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
24186142d05b5f811893970b9a5d61a06f241f68 to produce a URL like https://cdn.rawgit.com/bridgedb/BridgeDb/24186142d05b5f811893970b9a5d61a06f241f68/org.bridgedb.bio/resources/org/bridgedb/bio/datasources.txt
- 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
attributeSearchfor both the API client and the UI component.
- Possibly require that inputs to
attributeSearchbe 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: >
sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib