gosling.js 2.0.0-alpha.2 → 2.0.0-alpha.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/dist/demo/linking/linkedEncoding.d.ts.map +1 -1
- package/dist/demo/track-def/axis.d.ts +1 -1
- package/dist/demo/track-def/axis.d.ts.map +1 -1
- package/dist/demo/track-def/dummy.d.ts +3 -1
- package/dist/demo/track-def/dummy.d.ts.map +1 -1
- package/dist/demo/track-def/main.d.ts.map +1 -1
- package/dist/demo/track-def/types.d.ts +2 -1
- package/dist/demo/track-def/types.d.ts.map +1 -1
- package/dist/{exported-utils-b3ea2b1e.js → exported-utils-bd94e9c8.js} +10 -2
- package/dist/exported-utils-bd94e9c8.js.map +1 -0
- package/dist/gosling.js +34 -11
- package/dist/gosling.js.map +1 -1
- package/dist/src/compiler/compile.d.ts.map +1 -1
- package/dist/src/compiler/spec-preprocess.d.ts.map +1 -1
- package/dist/src/gosling-schema/gosling.schema.d.ts +2 -0
- package/dist/src/gosling-schema/gosling.schema.d.ts.map +1 -1
- package/dist/src/gosling-schema/gosling.schema.guards.d.ts +1 -1
- package/dist/src/gosling-schema/gosling.schema.guards.d.ts.map +1 -1
- package/dist/src/higlass/higlass-vendored.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/exported-utils-b3ea2b1e.js.map +0 -1
package/dist/gosling.js
CHANGED
|
@@ -35,7 +35,7 @@ import { scaleLinear, scaleLog, scaleQuantile, scaleSequential, scaleOrdinal, sc
|
|
|
35
35
|
import { drag } from "d3-drag";
|
|
36
36
|
import { sampleSize, isEqual, uniqBy } from "lodash-es";
|
|
37
37
|
import { interpolateViridis } from "d3-scale-chromatic";
|
|
38
|
-
import { A as Ajv, r as resolveSuperposedTracks, I as IsChannelDeep, t as traverseTracks, a as IsTemplateTrack, D as DEWFAULT_TITLE_PADDING_ON_TOP_AND_BOTTOM, b as traverseTracksAndViews, c as traverseViewArrangements, d as DEFAULT_AXIS_SIZE, e as Is2DTrack, f as DEFAULT_VIEW_SPACING, g as DEFAULT_INNER_RADIUS_PROP, h as IsDummyTrack, i as IsOverlaidTrack, j as IsXAxis, k as IsYAxis, l as DEFAULT_CIRCULAR_VIEW_PADDING, u as uuid, m as traverseToFixSpecDownstream, n as absToChr, o as colorToHex, p as getTextStyle, q as computeChromSizes, s as cartesianToPolar, v as getHiGlassColorRange, R as RADIAN_GAP, w as valueToRadian, x as pointsToDegree, y as commonjsGlobal, z as RemoteFile, B as chrToAbs, C as IsOneOfFilter, E as IsRangeFilter, F as IsIncludeFilter, G as getChannelKeysByAggregateFnc, H as getChannelKeysByType, J as sanitizeChrName, K as filterUsingGenoPos, L as IsDataDeepTileset, M as IsDomainChr, N as IsDomainInterval, O as IsDomainChrInterval, S as SUPPORTED_CHANNELS, P as IsChannelValue, Q as getValueUsingChannel, T as rectProperty, U as pointProperty, V as barProperty, W as IsStackedChannel, X as IsDomainArray, Y as PREDEFINED_COLOR_STR_MAP, Z as IsRangeArray, _ as isTabularDataFetcher, $ as drawPreEmbellishment, a0 as drawMark, a1 as drawPostEmbellishment, a2 as getRelativeGenomicPosition, a3 as hasDataTransform, a4 as IsMouseEventsDeep, a5 as flatArrayToPairArray, a6 as IsSingleView, a7 as IsMultipleViews, a8 as GenomicPositionHelper } from "./exported-utils-
|
|
38
|
+
import { A as Ajv, r as resolveSuperposedTracks, I as IsChannelDeep, t as traverseTracks, a as IsTemplateTrack, D as DEWFAULT_TITLE_PADDING_ON_TOP_AND_BOTTOM, b as traverseTracksAndViews, c as traverseViewArrangements, d as DEFAULT_AXIS_SIZE, e as Is2DTrack, f as DEFAULT_VIEW_SPACING, g as DEFAULT_INNER_RADIUS_PROP, h as IsDummyTrack, i as IsOverlaidTrack, j as IsXAxis, k as IsYAxis, l as DEFAULT_CIRCULAR_VIEW_PADDING, u as uuid, m as traverseToFixSpecDownstream, n as absToChr, o as colorToHex, p as getTextStyle, q as computeChromSizes, s as cartesianToPolar, v as getHiGlassColorRange, R as RADIAN_GAP, w as valueToRadian, x as pointsToDegree, y as commonjsGlobal, z as RemoteFile, B as chrToAbs, C as IsOneOfFilter, E as IsRangeFilter, F as IsIncludeFilter, G as getChannelKeysByAggregateFnc, H as getChannelKeysByType, J as sanitizeChrName, K as filterUsingGenoPos, L as IsDataDeepTileset, M as IsDomainChr, N as IsDomainInterval, O as IsDomainChrInterval, S as SUPPORTED_CHANNELS, P as IsChannelValue, Q as getValueUsingChannel, T as rectProperty, U as pointProperty, V as barProperty, W as IsStackedChannel, X as IsDomainArray, Y as PREDEFINED_COLOR_STR_MAP, Z as IsRangeArray, _ as isTabularDataFetcher, $ as drawPreEmbellishment, a0 as drawMark, a1 as drawPostEmbellishment, a2 as getRelativeGenomicPosition, a3 as hasDataTransform, a4 as IsMouseEventsDeep, a5 as flatArrayToPairArray, a6 as IsSingleView, a7 as IsMultipleViews, a8 as GenomicPositionHelper } from "./exported-utils-bd94e9c8.js";
|
|
39
39
|
import React, { useState, useImperativeHandle, useEffect } from "react";
|
|
40
40
|
import { format, precisionPrefix, formatPrefix } from "d3-format";
|
|
41
41
|
import slugid from "slugid";
|
|
@@ -55,7 +55,7 @@ import { createNanoEvents } from "nanoevents";
|
|
|
55
55
|
import PubSub$1 from "pubsub-js";
|
|
56
56
|
import { zoom, ZoomTransform } from "d3-zoom";
|
|
57
57
|
const name = "gosling.js";
|
|
58
|
-
const version = "2.0.0-alpha.
|
|
58
|
+
const version = "2.0.0-alpha.3";
|
|
59
59
|
const $ref$1 = "#/definitions/GoslingSpec";
|
|
60
60
|
const $schema$1 = "http://json-schema.org/draft-07/schema#";
|
|
61
61
|
const definitions$1 = {
|
|
@@ -846,6 +846,10 @@ const definitions$1 = {
|
|
|
846
846
|
description: "Specify the track width in pixels.",
|
|
847
847
|
type: "number"
|
|
848
848
|
},
|
|
849
|
+
x: {
|
|
850
|
+
$ref: "#/definitions/X",
|
|
851
|
+
description: "For showing axis"
|
|
852
|
+
},
|
|
849
853
|
zoomLimits: {
|
|
850
854
|
description: "Unused property for DummyTrack",
|
|
851
855
|
items: {
|
|
@@ -5604,6 +5608,10 @@ const definitions$1 = {
|
|
|
5604
5608
|
},
|
|
5605
5609
|
{
|
|
5606
5610
|
$ref: "#/definitions/ChannelValue"
|
|
5611
|
+
},
|
|
5612
|
+
{
|
|
5613
|
+
$ref: "#/definitions/X",
|
|
5614
|
+
description: "For showing axis"
|
|
5607
5615
|
}
|
|
5608
5616
|
]
|
|
5609
5617
|
},
|
|
@@ -11763,6 +11771,7 @@ function compile(spec, templates, theme, containerStatus) {
|
|
|
11763
11771
|
trackInfos = getRelativeTrackInfo(specCopy, theme).trackInfos;
|
|
11764
11772
|
}
|
|
11765
11773
|
const compileResult = collectViewsAndTracks(specCopy, trackInfos, theme);
|
|
11774
|
+
console.warn(compileResult);
|
|
11766
11775
|
return compileResult;
|
|
11767
11776
|
}
|
|
11768
11777
|
class PixiManager {
|
|
@@ -17711,16 +17720,23 @@ function getAxisTrackCircularOptions(track, boundingBox, position, theme) {
|
|
|
17711
17720
|
return options;
|
|
17712
17721
|
}
|
|
17713
17722
|
function getAxisPositions(track) {
|
|
17714
|
-
var _a, _b;
|
|
17715
|
-
if (IsTemplateTrack(track)
|
|
17723
|
+
var _a, _b, _c;
|
|
17724
|
+
if (IsTemplateTrack(track)) {
|
|
17716
17725
|
return { xAxisPosition: void 0, yAxisPosition: void 0 };
|
|
17717
17726
|
}
|
|
17727
|
+
if (IsDummyTrack(track)) {
|
|
17728
|
+
if ((_a = track.x) == null ? void 0 : _a.axis) {
|
|
17729
|
+
return { xAxisPosition: track.x.axis, yAxisPosition: void 0 };
|
|
17730
|
+
} else {
|
|
17731
|
+
return { xAxisPosition: void 0, yAxisPosition: void 0 };
|
|
17732
|
+
}
|
|
17733
|
+
}
|
|
17718
17734
|
const resolvedSpecs = resolveSuperposedTracks(track);
|
|
17719
17735
|
const firstResolvedSpec = resolvedSpecs[0];
|
|
17720
17736
|
const hasXAxis = "x" in firstResolvedSpec && firstResolvedSpec.x && "axis" in firstResolvedSpec.x && firstResolvedSpec.x.axis !== "none" && firstResolvedSpec.x.type === "genomic" || false;
|
|
17721
17737
|
const hasYAxis = "y" in firstResolvedSpec && firstResolvedSpec.y && "axis" in firstResolvedSpec.y && firstResolvedSpec.y.axis !== "none" && firstResolvedSpec.y.type === "genomic" || false;
|
|
17722
|
-
const xAxisPosition = hasXAxis && IsChannelDeep(firstResolvedSpec.x) ? (
|
|
17723
|
-
const yAxisPosition = hasYAxis && IsChannelDeep(firstResolvedSpec.y) ? (
|
|
17738
|
+
const xAxisPosition = hasXAxis && IsChannelDeep(firstResolvedSpec.x) ? (_b = firstResolvedSpec.x) == null ? void 0 : _b.axis : void 0;
|
|
17739
|
+
const yAxisPosition = hasYAxis && IsChannelDeep(firstResolvedSpec.y) ? (_c = firstResolvedSpec.y) == null ? void 0 : _c.axis : void 0;
|
|
17724
17740
|
return {
|
|
17725
17741
|
xAxisPosition,
|
|
17726
17742
|
yAxisPosition
|
|
@@ -18186,8 +18202,15 @@ class BrushCircularTrack extends CircularBrushTrackClass {
|
|
|
18186
18202
|
return this;
|
|
18187
18203
|
}
|
|
18188
18204
|
}
|
|
18189
|
-
function processDummyTrack(track, boundingBox) {
|
|
18205
|
+
function processDummyTrack(track, boundingBox, theme) {
|
|
18190
18206
|
var _a;
|
|
18207
|
+
const trackDefs = [];
|
|
18208
|
+
const [newTrackBbox, axisTrackDefs] = getAxisTrackDef(track, boundingBox, theme);
|
|
18209
|
+
if (axisTrackDefs) {
|
|
18210
|
+
if (!track.overlayOnPreviousTrack)
|
|
18211
|
+
trackDefs.push(...axisTrackDefs);
|
|
18212
|
+
boundingBox = newTrackBbox;
|
|
18213
|
+
}
|
|
18191
18214
|
const trackDef = {
|
|
18192
18215
|
type: TrackType.Dummy,
|
|
18193
18216
|
trackId: track.id,
|
|
@@ -18199,7 +18222,8 @@ function processDummyTrack(track, boundingBox) {
|
|
|
18199
18222
|
title: (_a = track.title) != null ? _a : ""
|
|
18200
18223
|
}
|
|
18201
18224
|
};
|
|
18202
|
-
|
|
18225
|
+
trackDefs.push(trackDef);
|
|
18226
|
+
return trackDefs;
|
|
18203
18227
|
}
|
|
18204
18228
|
var TrackType = /* @__PURE__ */ ((TrackType2) => {
|
|
18205
18229
|
TrackType2[TrackType2["Text"] = 0] = "Text";
|
|
@@ -18213,7 +18237,6 @@ var TrackType = /* @__PURE__ */ ((TrackType2) => {
|
|
|
18213
18237
|
})(TrackType || {});
|
|
18214
18238
|
function createTrackDefs(trackInfos, theme) {
|
|
18215
18239
|
const trackDefs = [];
|
|
18216
|
-
console.warn("trackinfos", trackInfos);
|
|
18217
18240
|
trackInfos.forEach((trackInfo2) => {
|
|
18218
18241
|
const { track, boundingBox } = trackInfo2;
|
|
18219
18242
|
if (track.mark === "_header") {
|
|
@@ -18223,7 +18246,7 @@ function createTrackDefs(trackInfos, theme) {
|
|
|
18223
18246
|
const heatmapTrackDefs = processHeatmapTrack(track, boundingBox, theme);
|
|
18224
18247
|
trackDefs.push(...heatmapTrackDefs);
|
|
18225
18248
|
} else if (IsDummyTrack(track)) {
|
|
18226
|
-
const dummyTrackDefs = processDummyTrack(track, boundingBox);
|
|
18249
|
+
const dummyTrackDefs = processDummyTrack(track, boundingBox, theme);
|
|
18227
18250
|
trackDefs.push(...dummyTrackDefs);
|
|
18228
18251
|
} else {
|
|
18229
18252
|
const goslingAxisDefs = processGoslingTrack(track, boundingBox, theme);
|
|
@@ -30104,7 +30127,7 @@ function getSingleViewLinks(gs) {
|
|
|
30104
30127
|
};
|
|
30105
30128
|
tracks2.forEach((track) => {
|
|
30106
30129
|
var _a;
|
|
30107
|
-
if (hasDiffXDomainThanView(gs, track, assembly2, viewXDomain2)
|
|
30130
|
+
if (hasDiffXDomainThanView(gs, track, assembly2, viewXDomain2))
|
|
30108
30131
|
return;
|
|
30109
30132
|
const hasOverlaidTracks = "_overlay" in track;
|
|
30110
30133
|
if (hasOverlaidTracks) {
|