Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

HiGlass track for displaying arcs between disconnected regions

License

NotificationsYou must be signed in to change notification settings

higlass/higlass-arcs

Repository files navigation

Display connections between non-adjacent regions as arcs

HiGlassnpm versionbuild statusgzipped sizecode style prettierhiglass-arcs demo

Screenshot of the arcs track

The WebGL implementation is inspired byMatt Deslauriers' wonderful blog post on drawing lines.

Live demo:https://higlass.github.io/higlass-arcs/

Note: This is the source code for the arcs track only! You might want to check out the following repositories as well:

Installation

npm install higlass-arcs

Usage

The live script can be found at:

  1. Make sure you load this track prior tohglib.min.js. For example:
<scriptsrc="higlass-arcs.min.js"></script><scriptsrc="hglib.min.js"></script><script>  ...</script>

If you build a custom React application, importhiglass-arcs in yourindex.js as follows:

import'higlass-arcs';// This import is all you have to doimportReactfrom'react';importReactDOMfrom'react-dom';importAppfrom'./App';ReactDOM.render(<App/>,document.getElementById('root'));
  1. Now, configure the track in your view config and be happy! Cheers 🎉
{  ...{server:'http://localhost:8001/api/v1',tilesetUid:'my-aggregated-bedfile.beddb',uid:'some-uid',type:'1d-arcs',options:{labelColor:'red',labelPosition:'hidden',trackBorderWidth:0,trackBorderColor:'black',name:'Arcs for me and you!',},},  ...}

Take a look atsrc/index.html for an example. You can find the corresponding live demo athttps://higlass.github.io/higlass-arcs/.

Custom Options

startField

By default, a segments x1 start value is used as the start position. You can customize this behavior by specifying another column. Useful when drawing arcs from bedpe data.

endField

By default, a segments x1 end value is used as the end position. You can customize this behavior by specifying another column. Useful when drawing arcs from bedpe data.

filter

An object with the following properties to filter segments.

Properties:

  • set: a list of values that will allow segments to be included, i.e., rendered
  • field: an integer defining the segment field column number that should be used to check against theset

In other words, this is how the filtering is basically implemented:

segments.filter((segment)=>options.filter.set.includes(segment.fields[options.filter.field]));

Development

Installation

$ git clone https://github.com/higlass/higlass-arcs&& higlass-arcs$ npm install

Commands

Developmental server:npm startProduction build:npm run buildDeploy demo:npm run deploy


[8]ページ先頭

©2009-2025 Movatter.jp