npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ga4gh-rxjs

v1.0.2

Published

Client lib for ga4gh APIs, with rxjs

Downloads

4

Readme

Client for Ga4gh APIs in javascript, with Rx

ga4gh-rxjs is a client library for the Ga4gh APIs in javascript, using rxjs.

Ga4gh APIs are methods for exchanging genomic and clinical data. Rx is a library for taming asynchronous code.

Methods

Ga4gh method references are here.

ga4gh-rxjs exports each ga4gh method as a property. Each exported method takes two parameters: the url of the ga4gh server, and a javascript object with the properties of the query. For example,

// url: string
// params: GASearchVariantSetsRequest || undefined
// returns: Observable<GASearchVariantSetsResponse>

ga4gh.variantSets(url, params)

If no parameters are required, params can be omitted.

Example usage

ga4gh.variantSets(url).subscribe(d => console.log('One page of variantSets', d));

Paging

The Ga4gh APIs are paged. To control the page size, include pageSize in the param object, as per the ga4gh docs.

Available ga4gh methods are

ga4gh.variantSets
ga4gh.variants
ga4gh.referenceSets
ga4gh.references
ga4gh.reads
ga4gh.readGroupSets
ga4gh.callSets

Walking all pages

Additionally, utility methods are provided to accumulate all pages of the query results. These methods are under the property all, and return the concatenated data properties from the results (i.e. the page tokens are dropped).

ga4gh.all.variantSets(url).subscribe(d => console.log('All rows of variantSets', d));

Demo

A few queries demonstrated here.

Source here.

Installation

The library is built as a UMD module, and so should work as a CommonJS module, AMD module, or with a <script> tag. If you have a choice, we recommend a build with npm and webpack.

webpack (and browserify?)

> npm install ga4gh-rxjs
var ga4gh = require('ga4gh-rxjs');
ga4gh.variantSets("http://foo.bar").subscribe(console.log.bind(console));

script tag

If including ga4gh-rxjs with a script tag, the methods will be exposed on the ga4gh global. You must include rx.js, rx.experimental.js, rxjs-dom.js, and underscore.js.

<script src="https://rawgit.com/reactive-extensions/rxjs/v2.5.2/dist/rx.js"></script>
<script src="https://rawgit.com/reactive-extensions/rxjs/v2.5.2/dist/rx.experimental.js"></script>
<script src="https://rawgit.com/reactive-extensions/rxjs-dom/v4.0.4/dist/rx.dom.js"></script>
<script src="https://rawgit.com/jashkenas/underscore/1.8.3/underscore.js"></script>
<script src="https://rawgit.com/acthp/ga4gh-rxjs/master/dist/ga4gh-rx.js"></script>

Lint

Use npm run lint to run the lint rules. We lint with eslint and babel-eslint.