https://github.com/higlass/higlass-register
Helper tool to register pluggable tracks
https://github.com/higlass/higlass-register
Last synced: about 1 year ago
JSON representation
Helper tool to register pluggable tracks
- Host: GitHub
- URL: https://github.com/higlass/higlass-register
- Owner: higlass
- License: mit
- Created: 2018-04-13T22:04:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-24T00:43:05.000Z (about 3 years ago)
- Last Synced: 2025-03-25T19:39:21.579Z (about 1 year ago)
- Language: JavaScript
- Size: 683 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# HiGlass Register
> Pluggable Track Register Tool for HiGlass
[](http://higlass.io)
[](https://travis-ci.org/higlass/higlass-register)
If you develop pluggable tracks for HiGlass please use this simple tool to _register_ your tracks.
_Note, `higlass-register` is nothing more than an agreed way of exposing plugins to HiGlass. You could circumvent `higlass-register` but then you'll have to take of staying up to date with the plugin registration process yourself._
## Installation
```
npm install --save-dev higlass-register
```
## Usage: plugin tracks
To register your track as a plugin
```javascript
import register from 'higlass-register';
import MyFancyNewHiGlassTrack from './MyFancyNewHiGlassTrack';
register(
{
track: MyFancyNewHiGlassTrack,
config: MyFancyNewHiGlassTrack.config,
},
{
// Set to `true` if you want to override previously registered track that
// define the same track type.
force: false
}
);
```
Take a look at [HiGlass GeoJSON Track](https://github.com/flekschas/higlass-geojson) for how to write a pluggable track.
## Usage: plugin data fetchers
To register your data fetcher as a plugin
```javascript
import register from 'higlass-register';
import MyFancyNewHiGlassDataFetcher from './MyFancyNewHiGlassDataFetcher';
register(
{
dataFetcher: MyFancyNewHiGlassDataFetcher,
config: MyFancyNewHiGlassDataFetcher.config,
},
{
// The default pluginType is 'track', so specify 'dataFetcher' here.
pluginType: 'dataFetcher',
// Set to `true` if you want to override previously registered data fetcher that
// define the same data fetcher type.
force: false
}
);
```