myvariantjs: a Node.js client for MyVariant.info

myvariant.info sync_sulab client myvariant.js nodejs spotlight

Thanks to the excellent work done by Larry Hengl, we are happy to announce the release of myvariantjs, a Node.js client for MyVariant.info. We have previously released both Python and R clients for MyVariant.info, now Node.js developers have their own native client as well! (Node.js is popular among web developers to build their server-side code in Javascript).

To give it a try, simply install it via npm:

npm install myvariantjs --save

Similar to our Python and R clients, myvariantjs package exposes four methods:

var mv = require('myvariantjs');
mv.getvariant('chr9:g.107620835G>A');
mv.getvariant('chr9:g.107620835G>A', ['dbnsfp.genename', 'cadd.phred']);
  • getvariants to retrieve the annotations for a list of variants by their HGVS ids:
var mv = require('myvariantjs');
mv.getvariants("chr1:g.866422C>T,chr1:g.876664G>A,chr1:g.69635G>C");   // comma-separated
mv.getvariants(["chr1:g.866422C>T", "chr1:g.876664G>A","chr1:g.69635G>C"]);
var mv = require('myvariantjs');
mv.query("chr1:69000-70000", {fields:'dbnsfp.genename'});
mv.query("dbsnp.rsid:rs58991260", {fields:'dbnsfp'});
  • querymany to query matching variants for a list of alternative ids or query terms:
var mv = require('myvariantjs');
mv.querymany(['rs58991260', 'rs2500'], 'dbsnp.rsid');
mv.querymany(['RCV000083620', 'RCV000083611', 'RCV000083584'], 'clinvar.rcv_accession');

For more information, visit its API and usage docs, and its github code repository.

More than that, Larry also put up a very neat demo application to showcase MyVariant.info API and this myvariantjs package. Go check it out!

And the last, all of language-specific packages made available by us or our passioned users are always listed in our official documentation.