Giter VIP home page Giter VIP logo

higlass's Introduction

Build Status Live Docs DOI Twitter Slack

Introduction

HiGlass is a web-based viewer for datasets too large to view at once. It features synchronized navigation of multiple views as well as continuous zooming and panning for navigation across genomic loci and resolutions. It supports visual comparison of genomic (e.g., Hi-C, ChIP-seq, or bed annotations) and other data (e.g., geographic maps, gigapixel images, or abstract 1D and 2D sequential data) from different experimental conditions and can be used to efficiently identify salient outcomes of experimental perturbations, generate new hypotheses, and share the results with the community.

A live instance can be found at https://higlass.io. A Docker container is available for running an instance locally, although we recommend using the higlass-manage package to start, stop and configure local instances.

For documentation about how to use and install HiGlass, please visit https://docs.higlass.io.

Citation

Kerpedjiev, P., Abdennur, N., Lekschas, F., McCallum, C., Dinkla, K., Strobelt, H., ... & Gehlenborg, N. HiGlass: Web-based Visual Exploration and Analysis of Genome Interaction Maps. Genome Biology (2018): 19:125. https://doi.org/10.1186/s13059-018-1486-1

Example

Development

To run higlass from its source code simply run the following:

npm clean-install // use --legacy-peer-deps if you get peer dependency errors
npm run start

This starts a server in development mode at http://localhost:5173/.

Warning The following examples need to be migrated to the latest build. Once started, a list of the examples can be found at http://localhost:8080/examples.html. Template viewconfs located at /docs/examples/viewconfs can viewed directly at urls such as http://localhost:8080/apis/svg.html?/viewconfs/overlay-tracks.json.

Tests

The tests for the React components and API functions are located in the test directory. Tests are run with web-test-runner, which you can learn more about the CLI in the documentation.

Useful commands:

  • Run all tests: npm test
  • Run all tests in interactive "watch" mode: npm test -- --watch
  • Run a specific test or "glob" of tests: npm test -- test/APITests.js [--watch]
  • Manually run individual tests in an open browser window: npm test -- --manual

Troubleshooting:

  • If the installation fails due to sharp > node-gyp try installing the node packages using python2:

    npm ci --python=/usr/bin/python2 && rm -rf node_modules/node-sass && npm ci
    

API

HiGlass provides an API for controlling the component from with JavaScript. Below is a minimal working example to get started and the complete documentation is availabe at docs.higlass.io.

<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <title>Minimal Working Example &middot; HiGlass</title>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/hglib.css">

  <style type="text/css">
    html, body {
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }
  </style>

  <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
  <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
  <script crossorigin src="https://unpkg.com/pixi.js@5/dist/pixi.min.js"></script>
  <script crossorigin src="https://unpkg.com/[email protected]/dist/react-bootstrap.min.js"></script>
  <script crossorigin src="https://unpkg.com/[email protected]/dist/hglib.min.js"></script>
</head>
<body></body>
<script>
const hgApi = window.hglib.viewer(
  document.body,
  'https://higlass.io/api/v1/viewconfs/?d=default',
  { bounded: true },
);
</script>
</html>

Related

diagram of related tools

  • HiGlass Clodius - Package that provides implementations for aggregation and tile generation for many common 1D and 2D data types
  • HiGlass Python - Python bindings to the HiGlass for tile serving, view config generation, and Jupyter Notebook + Lab integration.
  • HiGlass Manage - Easy to use interface for deploying a local HiGlass instance
  • HiGlass Docker - Build an image containing all the components necessary to deploy HiGlass
  • HiGlass Server - Server component for serving multi-resolution data
  • HiGlass App - The code for the web application hosted at https://higlass.io
  • Cooler - Package for efficient storage of and access to sparse 2D data

License

HiGlass is provided under the MIT License.

higlass's People

Contributors

101arrowz avatar alexander-veit avatar alexkb0009 avatar alexpreynolds avatar astrovsky01 avatar chadius avatar chen650 avatar clementsan avatar daniellenguyen avatar dependabot[bot] avatar etowahadams avatar flekschas avatar keller-mark avatar lmercadom avatar manzt avatar mccalluc avatar mildewey avatar nadabrovitxka avatar ngehlenborg avatar nikhil avatar nvictus avatar phlya avatar pkerpedjiev avatar pkerpedjiev-zymergen avatar sehilyi avatar sergpolly avatar wangqianwen0418 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

higlass's Issues

Odd blue bar in the 1D track

Commit: cafdba5

Steps to reproduce

  1. Zoom in enough

Observed behavior

  • All of a sudden a blue bar appears

jan -31-2017 16-17-05

Expected behavior

  • The blue bar should not appear all of a sudden

Outliers cause drastic track changes, use percentile

Commit: 5e7c3e3

Steps to reproduce

  1. Zoom in somewhere

Observed behavior

nov -18-2016 20-08-53

  • Jumpy tracks where the resolution changes dramatically between two minor zoom levels

Expected behavior

  • Smoother behavior.

Maybe use 98-percentiles an draw outliers in a different color

Window vertical resize, but HiGlass keeps original height

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. Resize the browser window horizontally --> HiGlass redraws to use the appropriate width
  2. Resize the browser window vertically --> HiGlass does not redraw with the appropriate height: It retains the original.

Expected behavior

This isn't totally unreasonable, but I wanted to point it out.

UI won't work if data referenced by config is missing

Commit:
SERVER_VERSION: 0.2.4
WEBSITE_VERSION: 0.5.0

Steps to reproduce

  1. Bring up a docker container
  2. Go to the app
  3. Click in the upper right to try to add a track

Observed behavior

Javascript is erroring out because it can't load the data referenced in the default config.

Expected behavior

  • Perhaps make it more robust in the face of missing data?
  • Or, if we keep this constraint, make it clear in the readme how to zero out the default config, or consider shipping with an empty config.

Color picker occludes preview matrix

Commit: dd797ea

Steps to reproduce

  1. Change the color map and open the color picker

Observed behavior

bildschirmfoto 2017-03-04 um 15 34 17

Expected behavior

  • Color picker should not occlude preview or should be draggable

create demo with maximum size in browser window

We need a demo that has a larger view (also for testing performance when more pixels have to be rendered). I would recommend that we create a second demo in addition to the existing one that just has a view (or two!) that use the maximum available space within the current browser window (resize views upon resize of the browser window).

@pkerpedjiev - any other features we might want to add here? I think the debug mode should be accessible as well.

Vertical scroll bar

Commit: 2274226

Steps to reproduce

  1. Open HiGlass

Observed behavior

  • There is a vertical scroll bar of ~10px

bildschirmfoto 2017-02-05 um 15 31 31

Expected behavior

  • This scroll bar should not be there, i.e., the main container shouldn't overflow.

track menu icons are swapped

Commit:

Steps to reproduce

  1. Hover over track to get track menu

Observed behavior

  • "settings" icon is used instead of "close" icon and vice versa

image

Expected behavior

  • Correct icons.

Popups only close on cancel

Commit: fb2d74a

Steps to reproduce

  1. Click on the plus icon
  2. Try to close it with the x button or an outside click

Observed behavior

  • Does not close on either a click on the x button or outside of the popup

jan -22-2017 17-13-37

Expected behavior

  • Should close when clicking the x button or outside of the popup

Streamline "Close Track" menu

Commit: Release v0.4.33

image

The "X" menu for tracks seems so have duplicated functionality:

  1. Clicking on the track name closes the track.
  2. Clicking on "Close Track" closes the "top" track as well (works when there is more than one)

This is quite confusing because for 1. it is not clear what clicking on the menu item does and for 2. it is not clear which track will be closed.

I propose to remove the "Close Track" menu item (2.) and rename the "track name" menu item into "Close ".

Track drag UI should correspond to what is actually supported

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. Click and drag a track anywhere on the window

Observed behavior

  • The ghost frame is most obvious UI element, and it will go anywhere in the window.
  • The little track resizer gives the only feedback about whether a given position is a valid place to drop.

Expected behavior

  • The ghost frame should be constrained to valid drop locations. It should only move in one dimension, and it should be limited to the sub-pane it started in. (But maybe the user should have more flexibility about where to drop: #54.)

Retrieve gene location of mouse click

It would be great if there was a way to register a callback for mouse clicks within higlass and retrieve the genomic location of that click.

This would be super useful for quickly investigating point-based (1bin) features.

The next step would be to have some sort of lasso with which the user can select a region of interest.

API should have a refresh re-rendering method

Currently there is no programmatic way to fully re-render HiGlass other than a manual resize of the browser window (even manually dispatching the resize event doesn't do the trick)

This API endpoint is important as host application may do stuff that requires a re-rendering (e.g., flexboxxy layout stuff)

Flatten context menu

Commit: dd797ea

Steps to reproduce

  1. Open context menu

Observed behavior

bildschirmfoto 2017-03-04 um 15 27 57

Expected behavior

  • The main menu only contains 3 options but the complete menu is 4 levels deep. Less level would be more convenient, e.g., most Mac OS apps only have max. 2 levels.

Inconsistent color scale in duplicated-then-expanded pane

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. Pick a 2D dataset
  2. Duplicate the pane

Note that the new pane is lighter than the original

  1. Close the original

Note that the center portion is not redrawn and is lighter than the rest

Expected behavior

Not sure: Should both panes have gotten lighter when they were duplicated?

(Underlying issue same as #73?)

screen shot 2017-03-07 at 2 59 13 pm

screen shot 2017-03-07 at 2 59 41 pm

Render 1D Tracks with SVG

It would be awesome if it's possible to render 1D Tracks with SVG. This would enable crisp printing for publications.

decouple sharing from individual views

Since sharing is cross-view, i.e. includes all views in the visualization, the functionality to obtain a JSON object or sharing link should be decoupled from the view-level controls.

Cannot add more than 4 colors to colormap

Commit: 8059fda

Steps to reproduce

  1. Go to higlass.io
  2. Open color editor

Observed behavior

  • The user can add, edit, and delete upt to four colors only

bildschirmfoto 2017-03-01 um 17 14 46

Expected behavior

  • Would be cool if more than 4 colors could be added (because higlass supports it anyway)

FF: Track resize controls mispositioned

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. On Firefox, load an edge track

Observed behavior

  • The double-line resize control is missing on all tracks except the bottom, where it is mispositioned.
    screen shot 2017-03-08 at 11 23 37 am

Expected behavior

  • Controls should be positioned the same on Chrome and FF.

Toggle positional box in does not properly update layout

Commit: fb2d74a

Steps to reproduce

  1. Click on the heatmnap's cog wheel and then on settings

Observed behavior

hglib.js:9 Uncaught TypeError: e.props.onClick is not a function
    at onClick (http://localhost:3000/assets/scripts-third-party/hglib.js:9:6802)
    at Object.o.invokeGuardedCallback (http://localhost:3000/assets/scripts-third-party/hglib.js:33:3294)
    at a (http://localhost:3000/assets/scripts-third-party/hglib.js:32:27815)
    at Object.s [as executeDispatchesInOrder] (http://localhost:3000/assets/scripts-third-party/hglib.js:32:28066)
    at h (http://localhost:3000/assets/scripts-third-party/hglib.js:10:16691)
    at d (http://localhost:3000/assets/scripts-third-party/hglib.js:10:16817)
    at Array.forEach (native)
    at n (http://localhost:3000/assets/scripts-third-party/hglib.js:60:14217)
    at Object.processEventQueue (http://localhost:3000/assets/scripts-third-party/hglib.js:10:17932)
    at r (http://localhost:3000/assets/scripts-third-party/hglib.js:91:31862)
    at Object.handleTopLevel [as _handleTopLevel] (http://localhost:3000/assets/scripts-third-party/hglib.js:91:31964)

Expected behavior

  • No error

Infinite zooming and panning should not be allowed

Commit: d87f9bf

Steps to reproduce

  1. zoom out

Observed behavior

  • User can zoom out / pan until the matrix is gone

Expected behavior

  • Zooming / panning back can be cumbersome and sometimes one just gets lost

In terms of usability infinite zooming and panning should simple be forbidden. It doesn't add any value but can cause trouble.

Use a logging library

Commit: cafdba5

Steps to reproduce

  1. Open the console

Observed behavior

Lot's of logging is going on.

Expected behavior

HGLib shouldn't log anything unless it is launched in some sort of debug mode. Logging is usually not a problem but in case somebody integrates HiGlass in a different app (like I do) than having tons of extra logs is a little but inconvenient.

Add an easy way to display the whole matrix

Right now the user has to manually figure out what the start and end loci are. It would be great if simple omission of the start and end loci is interpreted as: display the matrix from the beginning to the end

Unify server address property names

Commit: Check the date of this issue

Currently there are many different property names for remote data endpoints:

  • exportViewUrl
  • autocompleteSource
  • chromInfoPath
  • server

Since every thing can potentially come from a different source, testing whether that source is actually available is cumbersome. It would be great if the naming could be unified, maybe by appending source or src at the end of each relevant property. This would make automated extracted of remote endpoints easier.

Import view config option is missing

Commit: dd797ea

Steps to reproduce

  1. Open context menu and export view config
  2. What now?!

Observed behavior

  • One can export the view config but there is no option to import the view config

import

Expected behavior

  • There should be an option to import the view config

PS: drag and drop works but it's not obvious :) I think an extra option would help.

Higlass does not notify the user of unavailable endpoints

Let the higlass config point to a local server but do not start that server.

Higlass will render without any content and without any warnings or infos. It would be good if highlass could have a public callback api to notify host applications (maybe onerror or on('error')) and display a warning when remote endpoints are not accessible.

The latter is rather important given maintenance work on the higlass server. Currently when the server is down, higlass.io looks pretty broken.

Target area for drag should extend to edge of round rect

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. Position the mouse just within the left edge of the controls round rect and drag

Observed behavior

Depending on where you pointed, you might be repositioning the track, or you might be scrolling the track.

Expected behavior

The roundrect is reminiscent of a button, with the suggestion that you just need to click anywhere inside, instead of aiming directly for the text. With the other buttons this is less of an issue: You click, nothing happens, readjust slightly and click again.

FF: Controls roundrect is empty for vertical panes

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. In Firefox, load a vertically oriented pane
  2. Hover over it.

Observed behavior

The roundrect appears with hover, but it is empty:

screen shot 2017-03-08 at 9 54 29 am

Expected behavior

It should work the same as it does on Chrome.

Open popup for config export in addition to the download

Commit:

Steps to reproduce

  1. Click on export view config

Observed behavior

  • Downloads a JSON file

Expected behavior

  • It would be great if one first gets a popup that shows the config with an additional option to download. When you're playing around with higlass configs often you just want to know how somebody else has configures something without having to download and open the downloaded file all the time.
  • Basically something similar to what the edit button provided before

Convert thumbnails into SVG icons

Commit: 6e56208

Observed behavior

  • Currently, thumbnails are pixel-based images and are loaded from a fixed path, which makes it a little but cumbersome to integrate higlass easily on another website

Potential behavior

  • Convert the thumbnails into SVG icons and inline them as it's done with the other SVG icons. This avoids the problem

chromosome coordinates appear to start at 0

Commit: ?

Steps to reproduce

  1. zoom into chromosome axis/grid until individual positions are shown

Observed behavior

  • the first position of chromosome n appears to be 0 rather than 1.

image

Expected behavior

  • the positions should be shifted 1 unit to the left and the first position of a new chromosome should be mapped to the grid axis

FF: Track reposition icon not showing

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. On Firefox, hover over a track

Observed behavior

  • The crossed arrows icon is missing

screen shot 2017-03-08 at 11 04 30 am

Expected behavior

  • Icon should be rendered the same as on Chrome.

all interactions broken on Safari

Commit: ?

Steps to reproduce

  1. Load in Safari Version 10.0.2 (12602.3.12.0.1)
  2. Click on default map.

Observed behavior

  • Unable to move map or zoom.
  • Console error:
    image

Expected behavior

  • No error when trying to move the map or zoom in.

Remove bootstrap CSS dependence

I notice that in order to include hglib a user also needs to load bootstrap, which can be a pain because it's setting all sorts of opinionated defaults that can cause visual glitches. For example it's setting a base font on the HTML element that can cause trouble etc.

I'd suggest copying over the styles that are needed and prefixing all class names with hg. This way style clashes are avoided.

Initial x and y domains are not the same

Commit: 7b31241

When initializing higlass with the same x and y domains, different regions are displayed:

e.g.:

        "initialXDomain": [
          2829728720,
          2881033286
        ],
        "initialYDomain": [
          2829728720,
          2881033286
        ],

produces

bildschirmfoto 2017-02-06 um 10 39 52

Use SVG symbols instead of individual files

Commit: 0586cfd

Observed behavior

  • HiGlass loads a SVG file for every icon

Expected behavior

  • Load only one SVG file with all icons specified as <symbol> to reduce network requests

This also simplifies the work for others when they want to include higlass on their website. It would even be great to have higlass programmatically insert the SVG code during initialization.

Allow dragging to swap top/bottom and left/right

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. Click on a track at the top and drag it to the bottom, or click on a track on the left and drag it all the way to the right.

Expected behavior

It might be nice if tracks could be moved between sides. (Perhaps also from the sides to the top and bottom, though that is a less obvious accordance.)

Search button does nothing on FF

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. Bring up a local docker instance
  2. Pick a dataset and turn on the search box
  3. Type something in the search box and click on the magnifying glass

Observed behavior

  • Nothing happens. (And nothing happens when you hit return either, but that is already filed under #24.)

Expected behavior

  • Either hitting return or clicking the button should do a search on FF.

Differences between stack and row repositioning are intentional?

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

Just wanted to check that the asymetry between repositioning in columns and rows is intentional.

  • Even if a column is full, a new pane can be inserted into it at the bottom. Panes do not resize horizontally.
  • Unless a row already as a gap large enough for the new pane, it can not be inserted... but once inserted all panes are stretched vertically to use the remaining space.

Expected behavior

  • This might be the intended behavior?

Colorscale features

Desired functionality:

Leonid:

  • automatic linear scale;
  • automatic log scale;
  • a manually adjustable colorscale, where a user can specify a range (min,max) of values that are mapped onto a colormap; pixels with values above the max are shown by the top color in the colormap, while pixels below min are shown with the lowest color in the colormap. i.e. a use determines the trimming values.
  • and, most importantly, an option of having a colorscale change automatically upon zooming!

an automatic scale can take 95% range of values, trimming top 2.5% and 2.5% bottom (or 90% and trip 5% on each side).

Job:

Have an option to specify the colors in the colorscale. Specifically ""white,orange,red,darkRed".

Bryan:

From the cworld-dekker perl gd library (dekker.pm)

default color pos/neg color maps:
$availableColorScales{ dekkerPositive } = "white,orange,red,darkRed";
$availableColorScales{ dekkerNegative } = "white,cyan,blue,darkBlue";

Then the above colors are defined as RGBa tuples:
(null is for missing NaN/None values)

@{$availableColors{ null }} = (150,150,150,0);

@{$availableColors{ white }} = (255,255,255,$transparency); 
@{$availableColors{ black }} = (0,0,0,$transparency);

@{$availableColors{ red }} = (255,0,0,$transparency);
@{$availableColors{ orange }} = (255,165,0,$transparency);
@{$availableColors{ darkRed }} = (90,0,0,$transparency);

@{$availableColors{ blue }} = (0,0,255,$transparency);
@{$availableColors{ cyan }} = (0,255,255,$transparency);
@{$availableColors{ darkBlue }} = (0,0,90,$transparency);

The default is to set the color range to be 2.5% - 97.5% of the score dist.
(we exclude the x=y and abs(x-y)==1 diagonals in this dist.)

Then color is set as a simple linear scale between the defined colors in the colorMap.
128 total colors are used by default.
Default is no transparency.

Resizing pane does not change coordinates used as basis for duplicate

Commit:
SERVER_VERSION: 0.3.4
WEBSITE_VERSION: 0.5.10

Steps to reproduce

  1. Load a center pane
  2. Shrink the width by half
  3. Hit duplicate

Observed behavior

  • The new pane will not be identical to the old: instead it will cover the same address range as the old one did before shrinking, but since it has less space, the zoom levels on the two panes will not match. (And the dynamic color rescaling may make it harder to realize they are both looking at the same data.)

Expected behavior

  • Duplicated panes should be identical to the original.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.