higlass 1.12.1 → 1.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/scripts/BedLikeTrack.js +1 -1
- package/app/scripts/CenterTrack.jsx +1 -4
- package/app/scripts/ConfigViewMenu.jsx +2 -1
- package/app/scripts/GenomePositionSearchBox.jsx +6 -6
- package/app/scripts/HeatmapTiledPixiTrack.js +5 -3
- package/app/scripts/HorizontalGeneAnnotationsTrack.js +2 -1
- package/app/scripts/HorizontalTiledPlot.jsx +1 -4
- package/app/scripts/SearchField.js +1 -1
- package/app/scripts/SeriesListMenu.jsx +2 -1
- package/app/scripts/TiledPixiTrack.js +1 -1
- package/app/scripts/TrackRenderer.jsx +6 -7
- package/app/scripts/VerticalTiledPlot.jsx +1 -4
- package/app/scripts/configs/README.md +3 -0
- package/app/scripts/configs/available-track-types.js +1 -1
- package/app/scripts/configs/datatype-to-track-type.js +1 -1
- package/app/scripts/configs/index.js +4 -3
- package/app/scripts/configs/positions-by-datatype.js +1 -1
- package/app/scripts/configs/tracks-info-by-type.js +1 -1
- package/app/scripts/{DataFetcher.js → data-fetchers/DataFetcher.js} +4 -5
- package/app/scripts/data-fetchers/README.md +3 -0
- package/app/scripts/data-fetchers/index.js +3 -0
- package/app/scripts/data-fetchers/local-tile-fetcher.js +1 -1
- package/app/scripts/hglib.jsx +3 -2
- package/app/scripts/hocs/with-modal.jsx +1 -1
- package/app/scripts/hocs/with-pub-sub.jsx +1 -1
- package/app/scripts/hocs/with-theme.jsx +1 -1
- package/app/scripts/{configs/options-info.js → options-info.js} +6 -2
- package/app/scripts/plugins/README.md +3 -0
- package/app/scripts/{configs → plugins}/available-for-plugins.js +8 -6
- package/app/scripts/{data-fetchers → plugins}/get-data-fetcher.js +7 -4
- package/app/scripts/plugins/index.js +2 -0
- package/app/scripts/services/README.md +1 -0
- package/app/scripts/services/element-resize-listener.js +1 -1
- package/app/scripts/services/index.js +1 -0
- package/app/scripts/services/tile-proxy.js +1 -1
- package/app/scripts/{worker.js → services/worker.js} +6 -4
- package/app/scripts/test-helpers/README.md +3 -0
- package/app/scripts/test-helpers/index.js +9 -0
- package/app/scripts/{utils → test-helpers}/test-helpers.jsx +1 -7
- package/app/scripts/{utils/track-utils.js → track-utils.js} +1 -1
- package/app/scripts/utils/DenseDataExtrema1D.js +1 -1
- package/app/scripts/utils/DenseDataExtrema2D.js +1 -1
- package/app/scripts/utils/README.md +3 -0
- package/app/scripts/utils/color-to-hex.js +1 -1
- package/app/scripts/utils/data-to-genomic-loci.js +1 -1
- package/app/scripts/utils/genome-loci-to-pixels.js +1 -1
- package/app/scripts/utils/get-element-dim.js +1 -1
- package/app/scripts/utils/index.js +3 -10
- package/app/scripts/{configs → utils}/is-track-range-selectable.js +1 -1
- package/app/scripts/utils/load-chrom-infos.js +1 -1
- package/app/scripts/utils/obj-vals.js +1 -1
- package/app/scripts/utils/show-mouse-position.js +1 -1
- package/dist/hglib.css +411 -411
- package/dist/hglib.js +64020 -64107
- package/dist/hglib.min.js +161 -161
- package/package.json +3 -3
- /package/app/scripts/{factories → utils}/LruCache.js +0 -0
|
@@ -5,6 +5,7 @@ import classifyPoint from 'robust-point-in-polygon';
|
|
|
5
5
|
import { zoomIdentity } from 'd3-zoom';
|
|
6
6
|
|
|
7
7
|
import HorizontalTiled1DPixiTrack from './HorizontalTiled1DPixiTrack';
|
|
8
|
+
import trackUtils from './track-utils';
|
|
8
9
|
|
|
9
10
|
// Services
|
|
10
11
|
import { tileProxy } from './services';
|
|
@@ -13,7 +14,6 @@ import {
|
|
|
13
14
|
colorDomainToRgbaArray,
|
|
14
15
|
colorToHex,
|
|
15
16
|
segmentsToRows,
|
|
16
|
-
trackUtils,
|
|
17
17
|
valueToColor,
|
|
18
18
|
} from './utils';
|
|
19
19
|
|
|
@@ -8,10 +8,7 @@ import clsx from 'clsx';
|
|
|
8
8
|
import TrackControl from './TrackControl';
|
|
9
9
|
|
|
10
10
|
// Utils
|
|
11
|
-
import { or, resetD3BrushStyle } from './utils';
|
|
12
|
-
|
|
13
|
-
// Configs
|
|
14
|
-
import { IS_TRACK_RANGE_SELECTABLE } from './configs';
|
|
11
|
+
import { or, resetD3BrushStyle, IS_TRACK_RANGE_SELECTABLE } from './utils';
|
|
15
12
|
|
|
16
13
|
// Styles
|
|
17
14
|
import styles from '../styles/CenterTrack.module.scss'; // eslint-disable-line no-unused-vars
|
|
@@ -9,7 +9,8 @@ import NestedContextMenu from './NestedContextMenu';
|
|
|
9
9
|
// Styles
|
|
10
10
|
import classes from '../styles/ContextMenu.module.scss';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { THEME_DARK } from './configs';
|
|
13
|
+
import OPTIONS_INFO from './options-info';
|
|
13
14
|
|
|
14
15
|
class ConfigViewMenu extends ContextMenuContainer {
|
|
15
16
|
constructor(props) {
|
|
@@ -795,11 +795,7 @@ class GenomePositionSearchBox extends React.Component {
|
|
|
795
795
|
className={styles['genome-position-search-bar-button']}
|
|
796
796
|
id={this.uid}
|
|
797
797
|
onChange={this.handleAssemblySelectEvt.bind(this)}
|
|
798
|
-
|
|
799
|
-
this.state.selectedAssembly
|
|
800
|
-
? this.state.selectedAssembly
|
|
801
|
-
: '(none)'
|
|
802
|
-
}
|
|
798
|
+
value={this.state.selectedAssembly || undefined}
|
|
803
799
|
>
|
|
804
800
|
{assemblyMenuItems}
|
|
805
801
|
</select>
|
|
@@ -839,7 +835,11 @@ class GenomePositionSearchBox extends React.Component {
|
|
|
839
835
|
</div>
|
|
840
836
|
)}
|
|
841
837
|
renderMenu={this.handleRenderMenu.bind(this)}
|
|
842
|
-
value={
|
|
838
|
+
value={
|
|
839
|
+
this.state.selectedAssembly
|
|
840
|
+
? this.positionText
|
|
841
|
+
: 'No valid assembly selected'
|
|
842
|
+
}
|
|
843
843
|
wrapperStyle={{ width: '100%' }}
|
|
844
844
|
/>
|
|
845
845
|
|
|
@@ -23,9 +23,11 @@ import AxisPixi from './AxisPixi';
|
|
|
23
23
|
// Services
|
|
24
24
|
import { tileProxy } from './services';
|
|
25
25
|
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
import {
|
|
27
|
+
GLOBALS,
|
|
28
|
+
HEATED_OBJECT_MAP,
|
|
29
|
+
NUM_PRECOMP_SUBSETS_PER_2D_TTILE,
|
|
30
|
+
} from './configs';
|
|
29
31
|
|
|
30
32
|
const COLORBAR_MAX_HEIGHT = 200;
|
|
31
33
|
const COLORBAR_WIDTH = 10;
|
|
@@ -11,7 +11,8 @@ import HorizontalTiled1DPixiTrack from './HorizontalTiled1DPixiTrack';
|
|
|
11
11
|
import { tileProxy } from './services';
|
|
12
12
|
|
|
13
13
|
// Utils
|
|
14
|
-
import { colorToHex
|
|
14
|
+
import { colorToHex } from './utils';
|
|
15
|
+
import trackUtils from './track-utils';
|
|
15
16
|
|
|
16
17
|
// these are default values that are overwritten by the track's options
|
|
17
18
|
const FONT_SIZE = 11;
|
|
@@ -10,10 +10,7 @@ import HorizontalItem from './HorizontalItem';
|
|
|
10
10
|
import SortableList from './SortableList';
|
|
11
11
|
|
|
12
12
|
// Utils
|
|
13
|
-
import { or, resetD3BrushStyle, sum } from './utils';
|
|
14
|
-
|
|
15
|
-
// Configs
|
|
16
|
-
import { IS_TRACK_RANGE_SELECTABLE } from './configs';
|
|
13
|
+
import { or, resetD3BrushStyle, sum, IS_TRACK_RANGE_SELECTABLE } from './utils';
|
|
17
14
|
|
|
18
15
|
// Styles
|
|
19
16
|
import styles from '../styles/HorizontalTiledPlot.module.scss'; // eslint-disable-line no-unused-vars
|
|
@@ -6,7 +6,8 @@ import ContextMenuItem from './ContextMenuItem';
|
|
|
6
6
|
import NestedContextMenu from './NestedContextMenu';
|
|
7
7
|
|
|
8
8
|
// Configs
|
|
9
|
-
import {
|
|
9
|
+
import { THEME_DARK, TRACKS_INFO_BY_TYPE } from './configs';
|
|
10
|
+
import OPTIONS_INFO from './options-info';
|
|
10
11
|
|
|
11
12
|
// Styles
|
|
12
13
|
import classes from '../styles/ContextMenu.module.scss';
|
|
@@ -2,7 +2,7 @@ import { scaleLinear, scaleLog, scaleQuantile } from 'd3-scale';
|
|
|
2
2
|
import { median, range, ticks } from 'd3-array';
|
|
3
3
|
import slugid from 'slugid';
|
|
4
4
|
|
|
5
|
-
import DataFetcher from './
|
|
5
|
+
import { DataFetcher } from './data-fetchers';
|
|
6
6
|
import PixiTrack from './PixiTrack';
|
|
7
7
|
|
|
8
8
|
// Utils
|
|
@@ -61,7 +61,6 @@ import SVGTrack from './SVGTrack';
|
|
|
61
61
|
|
|
62
62
|
// Higher-order components
|
|
63
63
|
import withPubSub from './hocs/with-pub-sub';
|
|
64
|
-
import getDataFetcher from './data-fetchers/get-data-fetcher';
|
|
65
64
|
import withTheme from './hocs/with-theme';
|
|
66
65
|
|
|
67
66
|
// Utils
|
|
@@ -74,16 +73,16 @@ import {
|
|
|
74
73
|
} from './utils';
|
|
75
74
|
|
|
76
75
|
// Configs
|
|
77
|
-
import {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
TRACKS_INFO_BY_TYPE,
|
|
82
|
-
} from './configs';
|
|
76
|
+
import { GLOBALS, THEME_DARK, TRACKS_INFO_BY_TYPE } from './configs';
|
|
77
|
+
|
|
78
|
+
// Plugins
|
|
79
|
+
import { AVAILABLE_FOR_PLUGINS } from './plugins';
|
|
83
80
|
|
|
84
81
|
// Styles
|
|
85
82
|
import classes from '../styles/TrackRenderer.module.scss';
|
|
86
83
|
|
|
84
|
+
const { getDataFetcher } = AVAILABLE_FOR_PLUGINS.dataFetchers;
|
|
85
|
+
|
|
87
86
|
const SCROLL_TIMEOUT = 100;
|
|
88
87
|
|
|
89
88
|
class TrackRenderer extends React.Component {
|
|
@@ -12,10 +12,7 @@ import VerticalItem from './VerticalItem';
|
|
|
12
12
|
import SortableList from './SortableList';
|
|
13
13
|
|
|
14
14
|
// Utils
|
|
15
|
-
import { or, resetD3BrushStyle, sum } from './utils';
|
|
16
|
-
|
|
17
|
-
// Configs
|
|
18
|
-
import { IS_TRACK_RANGE_SELECTABLE } from './configs';
|
|
15
|
+
import { or, resetD3BrushStyle, sum, IS_TRACK_RANGE_SELECTABLE } from './utils';
|
|
19
16
|
|
|
20
17
|
// Styles
|
|
21
18
|
import styles from '../styles/VerticalTiledPlot.module.scss'; // eslint-disable-line no-unused-vars
|
|
@@ -11,11 +11,12 @@ export { THEME_LIGHT, THEME_DARK, THEME_DEFAULT } from './themes';
|
|
|
11
11
|
export { default as GLOBALS } from './globals';
|
|
12
12
|
export { default as DATATYPE_TO_TRACK_TYPE } from './datatype-to-track-type';
|
|
13
13
|
export { default as HEATED_OBJECT_MAP } from './colormaps';
|
|
14
|
-
export { default as IS_TRACK_RANGE_SELECTABLE } from './is-track-range-selectable';
|
|
15
|
-
export { default as OPTIONS_INFO } from './options-info';
|
|
16
14
|
export { default as TRACKS_INFO } from './tracks-info';
|
|
17
15
|
export { default as TRACKS_INFO_BY_TYPE } from './tracks-info-by-type';
|
|
18
16
|
export { default as POSITIONS_BY_DATATYPE } from './positions-by-datatype';
|
|
19
17
|
export { default as DEFAULT_TRACKS_FOR_DATATYPE } from './default-tracks-for-datatype';
|
|
20
|
-
export { default as AVAILABLE_FOR_PLUGINS } from './available-for-plugins';
|
|
21
18
|
export { default as AVAILABLE_TRACK_TYPES } from './available-track-types';
|
|
19
|
+
export {
|
|
20
|
+
NUM_PRECOMP_SUBSETS_PER_1D_TTILE,
|
|
21
|
+
NUM_PRECOMP_SUBSETS_PER_2D_TTILE,
|
|
22
|
+
} from './dense-data-extrema-config';
|
|
@@ -5,13 +5,12 @@ import {
|
|
|
5
5
|
dictValues,
|
|
6
6
|
minNonZero,
|
|
7
7
|
maxNonZero,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import DenseDataExtrema2D from './utils/DenseDataExtrema2D';
|
|
8
|
+
DenseDataExtrema1D,
|
|
9
|
+
DenseDataExtrema2D,
|
|
10
|
+
} from '../utils';
|
|
12
11
|
|
|
13
12
|
// Services
|
|
14
|
-
import { tileProxy } from '
|
|
13
|
+
import { tileProxy } from '../services';
|
|
15
14
|
|
|
16
15
|
export default class DataFetcher {
|
|
17
16
|
constructor(dataConfig, pubSub) {
|
package/app/scripts/hglib.jsx
CHANGED
|
@@ -29,8 +29,9 @@ export {
|
|
|
29
29
|
waitForTilesLoaded,
|
|
30
30
|
waitForTransitionsFinished,
|
|
31
31
|
mountHGComponent,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
} from './test-helpers';
|
|
33
|
+
|
|
34
|
+
export { getTrackObjectFromHGC } from './utils';
|
|
34
35
|
|
|
35
36
|
export { version } from '../../package.json';
|
|
36
37
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
// A better position of this file would be under \configs,
|
|
2
|
+
// but this file imports HeatmapOptions that contains React
|
|
3
|
+
// components, so having this file near track implementations
|
|
4
|
+
|
|
1
5
|
import { formatPrefix, precisionPrefix } from 'd3-format';
|
|
2
6
|
|
|
3
|
-
import HeatmapOptions from '
|
|
7
|
+
import HeatmapOptions from './HeatmapOptions';
|
|
4
8
|
|
|
5
9
|
const valueColumnOptions = (track) => {
|
|
6
10
|
if (!track.header) return [];
|
|
@@ -59,7 +63,7 @@ const OPACITY_OPTIONS_NO_ZERO = sizesInPx([0.2, 0.4, 0.6, 0.8, 1.0], '%', 100);
|
|
|
59
63
|
|
|
60
64
|
// these values define the options that are visible in the track config
|
|
61
65
|
// menu
|
|
62
|
-
|
|
66
|
+
const OPTIONS_INFO = {
|
|
63
67
|
axisLabelFormatting: {
|
|
64
68
|
name: 'Axis Label Formatting',
|
|
65
69
|
inlineOptions: {
|
|
@@ -22,7 +22,7 @@ import slugid from 'slugid';
|
|
|
22
22
|
import { mix } from '../mixwith';
|
|
23
23
|
|
|
24
24
|
// Configs
|
|
25
|
-
import * as configs from '
|
|
25
|
+
import * as configs from '../configs';
|
|
26
26
|
|
|
27
27
|
// Utils
|
|
28
28
|
import * as utils from '../utils';
|
|
@@ -81,8 +81,7 @@ import ViewportTrackerVertical from '../ViewportTrackerVertical';
|
|
|
81
81
|
|
|
82
82
|
// Factories
|
|
83
83
|
import ContextMenuItem from '../ContextMenuItem';
|
|
84
|
-
import
|
|
85
|
-
import LruCache from '../factories/LruCache';
|
|
84
|
+
import LruCache from '../utils/LruCache';
|
|
86
85
|
|
|
87
86
|
// Services
|
|
88
87
|
import * as services from '../services';
|
|
@@ -92,9 +91,12 @@ import ChromosomeInfo from '../ChromosomeInfo';
|
|
|
92
91
|
import SearchField from '../SearchField';
|
|
93
92
|
|
|
94
93
|
// Data Fetchers
|
|
95
|
-
import
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
import {
|
|
95
|
+
DataFetcher,
|
|
96
|
+
GBKDataFetcher,
|
|
97
|
+
LocalDataFetcher,
|
|
98
|
+
} from '../data-fetchers';
|
|
99
|
+
import getDataFetcher from './get-data-fetcher';
|
|
98
100
|
|
|
99
101
|
import { version } from '../../../package.json';
|
|
100
102
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import {
|
|
2
|
+
DataFetcher,
|
|
3
|
+
GBKDataFetcher,
|
|
4
|
+
LocalDataFetcher,
|
|
5
|
+
} from '../data-fetchers';
|
|
6
|
+
// TODO: we need to address this cyclic dependency
|
|
7
|
+
import { AVAILABLE_FOR_PLUGINS } from '.';
|
|
5
8
|
|
|
6
9
|
const getDataFetcher = (
|
|
7
10
|
dataConfig,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# services
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { scaleLog, scaleLinear } from 'd3-scale';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import {
|
|
3
|
+
DenseDataExtrema1D,
|
|
4
|
+
DenseDataExtrema2D,
|
|
5
|
+
getAggregationFunction,
|
|
6
|
+
selectedItemsToSize,
|
|
7
|
+
} from '../utils';
|
|
6
8
|
|
|
7
9
|
/*
|
|
8
10
|
function countTransform(count) {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// In this project, these methods are only used in tests,
|
|
2
|
-
// but plugin tracks also make use of them... so not really extraneous.
|
|
3
|
-
|
|
4
1
|
import React from 'react';
|
|
5
2
|
import ReactDOM from 'react-dom';
|
|
6
3
|
|
|
@@ -9,10 +6,7 @@ import { mount } from 'enzyme';
|
|
|
9
6
|
|
|
10
7
|
import { requestsInFlight } from '../services';
|
|
11
8
|
|
|
12
|
-
import {
|
|
13
|
-
getTrackObjectFromHGC,
|
|
14
|
-
getTrackRenderer,
|
|
15
|
-
} from './get-higlass-components';
|
|
9
|
+
import { getTrackObjectFromHGC, getTrackRenderer } from '../utils';
|
|
16
10
|
|
|
17
11
|
import HiGlassComponent from '../HiGlassComponent';
|
|
18
12
|
|
|
@@ -78,21 +78,14 @@ export { default as expandCombinedTracks } from './expand-combined-tracks';
|
|
|
78
78
|
export { default as segmentsToRows } from './segments-to-rows';
|
|
79
79
|
export { default as visitPositionedTracks } from './visit-positioned-tracks';
|
|
80
80
|
export { default as visitTracks } from './visit-tracks';
|
|
81
|
-
export { default as trackUtils } from './track-utils';
|
|
82
81
|
export { default as DenseDataExtrema1D } from './DenseDataExtrema1D';
|
|
83
82
|
export { default as DenseDataExtrema2D } from './DenseDataExtrema2D';
|
|
83
|
+
export { default as getAggregationFunction } from './get-aggregation-function';
|
|
84
|
+
export { default as selectedItemsToSize } from './selected-items-to-size';
|
|
85
|
+
export { default as IS_TRACK_RANGE_SELECTABLE } from './is-track-range-selectable';
|
|
84
86
|
|
|
85
87
|
export {
|
|
86
88
|
getTrackObjectFromHGC,
|
|
87
89
|
getTrackRenderer,
|
|
88
90
|
getTiledPlot,
|
|
89
91
|
} from './get-higlass-components';
|
|
90
|
-
export {
|
|
91
|
-
changeOptions,
|
|
92
|
-
waitForJsonComplete,
|
|
93
|
-
waitForTilesLoaded,
|
|
94
|
-
waitForTransitionsFinished,
|
|
95
|
-
mountHGComponent,
|
|
96
|
-
mountHGComponentAsync,
|
|
97
|
-
removeHGComponent,
|
|
98
|
-
} from './test-helpers';
|