higlass-bedlike-triangles-track
v0.1.2
Published
HiGlass Bedlike Triangles Track
Downloads
165
Readme
Linear Labels Track
Tile-based labels along a 1D axis (x- or y-)
Note: This is the source code for the linear labels track only! You might want to check out the following repositories as well:
- HiGlass linear labels track (this repository): https://github.com/higlass/higlass-linear-labels-tracks
- HiGlass viewer: https://github.com/higlass/higlass
- HiGlass server: https://github.com/higlass/higlass-server
- HiGlass docker: https://github.com/higlass/higlass-docker
Installation
npm install higlass-linear-labels-track
Usage
Server
First, make sure that you have a server capable of serving tiled labels. This notebook provides a functioning demo server that can be run locally. In the last cell, a viewconf is provided which can be used to instantiate HiGlass (see step 2 below).
Client
- Make sure you load this track prior to
hglib.js
. For example:
<script src="higlass-linear-labels-track.js"></script>
<script src="hglib.js"></script>
<script>
...
</script>
- Now, configure the track in your view config and be happy!
{
...
{
server: 'http://localhost:8001/api/v1',
tilesetUid: 'blah',
type: 'linear-labels-track',
options: {
labelField: 'label',
xPosField: 'x',
},
},
...
}
Take a look at src/index.html
for an example.
Development
Installation
$ git clone https://github.com/higlass/linear-labels-track && higlass-linear-labels-track
$ npm install
Commands
Developmental server: npm start
Production build: npm run build