A NodeJS client for MyVariant.info web services
![]() |
![]() |
You can view a basic web app demo which uses the myvariantjs lib.
You can also clone and start the demo app locally. Repo is here.
Developed enterly in Chrome. Mileage may vary in other untested browsers right now (sorry 'bout that, not enough hours in my day).
MyVariant.Info provides simple-to-use REST web services to query/retrieve genetic variant annotation data. It is designed for simplicity and performance.
myvariantjs is an easy-to-use node.js client that accesses the MyVariant.Info web services.
There is also a similarly designed python client called myvariant.py, if python is your thing.
npm install myvariantjs --save
Also see the API section below.
$ node
> let mv = require('myvariantjs').default
> mv
{ url: 'http://myvariant.info/v1/',
validFormats: [ 'json', 'csv', 'tsv', 'table', 'flat' ],
passthru: [Function: passthru],
getfields: [Function: getfields],
getvariant: [Function: getvariant],
getvariants: [Function: getvariants],
query: [Function: query],
querymany: [Function: querymany] }
> let got = mv.getvariant('chr9:g.107620835G>A', {fields:'dbnsfp.genename'}); //Promised
> got.then(function(res) { console.log(res) })
> { _id: 'chr9:g.107620835G>A',
_version: 1,
dbnsfp: { genename: 'ABCA1' } }
npm test
not browserified.
npm run doc
optional. you can view the docs in the docs folder or on github.
- add tests for querymany
- add fetchall
- add facets ?
- add sorting
- add 'Feelin Lucky' search => full text search, needs backend support or full query parsing
- 1.0.0 - Initial release
- 1.0.1 - Add tests for query()
- 1.0.2 - api doc touchups