@jbrowse/plugin-breakpoint-split-view 2.18.0 → 3.0.1
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/BreakpointAlignmentsFeatureDetail/BreakpointAlignmentsFeatureDetail.d.ts +1 -2
- package/dist/BreakpointAlignmentsFeatureDetail/BreakpointAlignmentsFeatureDetail.js +2 -9
- package/dist/BreakpointAlignmentsFeatureDetail/index.js +17 -7
- package/dist/BreakpointSplitView/components/AlignmentConnections.d.ts +2 -3
- package/dist/BreakpointSplitView/components/AlignmentConnections.js +91 -113
- package/dist/BreakpointSplitView/components/Breakends.d.ts +2 -3
- package/dist/BreakpointSplitView/components/Breakends.js +67 -89
- package/dist/BreakpointSplitView/components/BreakpointSplitView.d.ts +1 -2
- package/dist/BreakpointSplitView/components/BreakpointSplitView.js +12 -16
- package/dist/BreakpointSplitView/components/BreakpointSplitViewOverlay.d.ts +1 -2
- package/dist/BreakpointSplitView/components/BreakpointSplitViewOverlay.js +9 -31
- package/dist/BreakpointSplitView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/BreakpointSplitView/components/ExportSvgDialog.js +34 -73
- package/dist/BreakpointSplitView/components/Overlay.d.ts +2 -3
- package/dist/BreakpointSplitView/components/Overlay.js +7 -6
- package/dist/BreakpointSplitView/components/PairedFeatures.d.ts +2 -3
- package/dist/BreakpointSplitView/components/PairedFeatures.js +47 -69
- package/dist/BreakpointSplitView/components/Translocations.d.ts +2 -3
- package/dist/BreakpointSplitView/components/Translocations.js +57 -79
- package/dist/BreakpointSplitView/index.js +17 -7
- package/dist/BreakpointSplitView/model.d.ts +19 -46
- package/dist/BreakpointSplitView/model.js +46 -64
- package/dist/BreakpointSplitView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/BreakpointSplitView/svgcomponents/SVGBackground.js +2 -5
- package/dist/BreakpointSplitView/svgcomponents/SVGBreakpointSplitView.d.ts +2 -1
- package/dist/BreakpointSplitView/svgcomponents/SVGBreakpointSplitView.js +2 -23
- package/dist/BreakpointSplitView/types.d.ts +22 -0
- package/dist/BreakpointSplitView/types.js +2 -0
- package/dist/BreakpointSplitView/util.d.ts +11 -1
- package/dist/BreakpointSplitView/util.js +34 -0
- package/esm/BreakpointAlignmentsFeatureDetail/BreakpointAlignmentsFeatureDetail.d.ts +1 -2
- package/esm/BreakpointAlignmentsFeatureDetail/BreakpointAlignmentsFeatureDetail.js +2 -6
- package/esm/BreakpointSplitView/components/AlignmentConnections.d.ts +2 -3
- package/esm/BreakpointSplitView/components/AlignmentConnections.js +91 -90
- package/esm/BreakpointSplitView/components/Breakends.d.ts +2 -3
- package/esm/BreakpointSplitView/components/Breakends.js +67 -66
- package/esm/BreakpointSplitView/components/BreakpointSplitView.d.ts +1 -2
- package/esm/BreakpointSplitView/components/BreakpointSplitView.js +12 -16
- package/esm/BreakpointSplitView/components/BreakpointSplitViewOverlay.d.ts +1 -2
- package/esm/BreakpointSplitView/components/BreakpointSplitViewOverlay.js +9 -8
- package/esm/BreakpointSplitView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/BreakpointSplitView/components/ExportSvgDialog.js +34 -50
- package/esm/BreakpointSplitView/components/Overlay.d.ts +2 -3
- package/esm/BreakpointSplitView/components/Overlay.js +7 -6
- package/esm/BreakpointSplitView/components/PairedFeatures.d.ts +2 -3
- package/esm/BreakpointSplitView/components/PairedFeatures.js +47 -46
- package/esm/BreakpointSplitView/components/Translocations.d.ts +2 -3
- package/esm/BreakpointSplitView/components/Translocations.js +57 -56
- package/esm/BreakpointSplitView/model.d.ts +19 -46
- package/esm/BreakpointSplitView/model.js +26 -53
- package/esm/BreakpointSplitView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/BreakpointSplitView/svgcomponents/SVGBackground.js +2 -2
- package/esm/BreakpointSplitView/svgcomponents/SVGBreakpointSplitView.d.ts +2 -1
- package/esm/BreakpointSplitView/svgcomponents/SVGBreakpointSplitView.js +2 -23
- package/esm/BreakpointSplitView/types.d.ts +22 -0
- package/esm/BreakpointSplitView/types.js +1 -0
- package/esm/BreakpointSplitView/util.d.ts +11 -1
- package/esm/BreakpointSplitView/util.js +32 -1
- package/package.json +10 -10
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ExportSvgOptions {
|
|
2
|
+
rasterizeLayers?: boolean;
|
|
3
|
+
filename?: string;
|
|
4
|
+
Wrapper?: React.FC<{
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
fontSize?: number;
|
|
8
|
+
rulerHeight?: number;
|
|
9
|
+
textHeight?: number;
|
|
10
|
+
paddingHeight?: number;
|
|
11
|
+
headerHeight?: number;
|
|
12
|
+
cytobandHeight?: number;
|
|
13
|
+
trackLabels?: string;
|
|
14
|
+
themeName?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface Breakend {
|
|
17
|
+
MateDirection: string;
|
|
18
|
+
Join: string;
|
|
19
|
+
Replacement: string;
|
|
20
|
+
MatePosition: string;
|
|
21
|
+
}
|
|
22
|
+
export type LayoutRecord = [number, number, number, number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { LayoutRecord } from './
|
|
1
|
+
import type { LayoutRecord } from './types';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
2
4
|
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view';
|
|
3
5
|
type LGV = LinearGenomeViewModel;
|
|
4
6
|
interface Display {
|
|
@@ -7,6 +9,7 @@ interface Display {
|
|
|
7
9
|
SNPCoverageDisplay?: {
|
|
8
10
|
height: number;
|
|
9
11
|
};
|
|
12
|
+
searchFeatureByID?: (str: string) => LayoutRecord;
|
|
10
13
|
}
|
|
11
14
|
interface Track {
|
|
12
15
|
displays: Display[];
|
|
@@ -16,4 +19,11 @@ export declare function getPxFromCoordinate(view: LGV, refName: string, coord: n
|
|
|
16
19
|
export declare function yPos(trackId: string, level: number, views: LGV[], tracks: Track[], c: LayoutRecord, getYPosOverride?: (trackId: string, level: number) => number): number;
|
|
17
20
|
export declare const useNextFrame: (variable: unknown) => void;
|
|
18
21
|
export declare function intersect<T>(cb: (l: T) => string, a1?: T[], a2?: T[], ...rest: T[][]): T[];
|
|
22
|
+
export declare function getClip(cigar: string, strand: number): number;
|
|
23
|
+
export declare function calc(track: Track, f: Feature): LayoutRecord | undefined;
|
|
24
|
+
export declare function getBlockFeatures(model: {
|
|
25
|
+
views: LinearGenomeViewModel[];
|
|
26
|
+
}, track: {
|
|
27
|
+
configuration: AnyConfigurationModel;
|
|
28
|
+
}): Promise<Feature[][] | undefined>;
|
|
19
29
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getConf } from '@jbrowse/core/configuration';
|
|
3
|
+
import { clamp, getSession } from '@jbrowse/core/util';
|
|
3
4
|
const [, TOP, , BOTTOM] = [0, 1, 2, 3];
|
|
4
5
|
function cheight(chunk) {
|
|
5
6
|
return chunk[BOTTOM] - chunk[TOP];
|
|
@@ -39,3 +40,33 @@ export function intersect(cb, a1 = [], a2 = [], ...rest) {
|
|
|
39
40
|
const a12 = a1.filter(value => ids.has(cb(value)));
|
|
40
41
|
return rest.length === 0 ? a12 : intersect(cb, a12, ...rest);
|
|
41
42
|
}
|
|
43
|
+
const startClip = new RegExp(/(\d+)[SH]$/);
|
|
44
|
+
const endClip = new RegExp(/^(\d+)([SH])/);
|
|
45
|
+
export function getClip(cigar, strand) {
|
|
46
|
+
return strand === -1
|
|
47
|
+
? +(startClip.exec(cigar) || [])[1] || 0
|
|
48
|
+
: +(endClip.exec(cigar) || [])[1] || 0;
|
|
49
|
+
}
|
|
50
|
+
export function calc(track, f) {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
return (_b = (_a = track.displays[0]).searchFeatureByID) === null || _b === void 0 ? void 0 : _b.call(_a, f.id());
|
|
53
|
+
}
|
|
54
|
+
export async function getBlockFeatures(model, track) {
|
|
55
|
+
var _a;
|
|
56
|
+
const { views } = model;
|
|
57
|
+
const { rpcManager, assemblyManager } = getSession(model);
|
|
58
|
+
const assemblyName = (_a = model.views[0]) === null || _a === void 0 ? void 0 : _a.assemblyNames[0];
|
|
59
|
+
if (!assemblyName) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
const assembly = await assemblyManager.waitForAssembly(assemblyName);
|
|
63
|
+
if (!assembly) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
const sessionId = track.configuration.trackId;
|
|
67
|
+
return Promise.all(views.map(async (view) => (await rpcManager.call(sessionId, 'CoreGetFeatures', {
|
|
68
|
+
adapterConfig: getConf(track, ['adapter']),
|
|
69
|
+
sessionId,
|
|
70
|
+
regions: view.staticBlocks.contentBlocks,
|
|
71
|
+
})).flat()));
|
|
72
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-breakpoint-split-view",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "JBrowse 2 breakpoint detail split view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -37,26 +37,26 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@gmod/vcf": "^6.0.0",
|
|
40
|
+
"@jbrowse/core": "^3.0.1",
|
|
41
|
+
"@jbrowse/plugin-linear-genome-view": "^3.0.1",
|
|
40
42
|
"@mui/icons-material": "^6.0.0",
|
|
41
|
-
"@types/file-saver": "^2.0.1",
|
|
42
|
-
"file-saver": "^2.0.0"
|
|
43
|
-
},
|
|
44
|
-
"peerDependencies": {
|
|
45
|
-
"@jbrowse/core": "^2.0.0",
|
|
46
|
-
"@jbrowse/plugin-linear-genome-view": "^2.0.0",
|
|
47
43
|
"@mui/material": "^6.0.0",
|
|
44
|
+
"@types/file-saver": "^2.0.1",
|
|
45
|
+
"file-saver": "^2.0.0",
|
|
48
46
|
"mobx": "^6.0.0",
|
|
49
47
|
"mobx-react": "^9.0.0",
|
|
50
48
|
"mobx-state-tree": "^5.0.0",
|
|
51
|
-
"react": ">=16.8.4",
|
|
52
|
-
"react-dom": ">=16.8.4",
|
|
53
49
|
"tss-react": "^4.0.0"
|
|
54
50
|
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"react": ">=16.8.4",
|
|
53
|
+
"react-dom": ">=16.8.4"
|
|
54
|
+
},
|
|
55
55
|
"distModule": "esm/index.js",
|
|
56
56
|
"srcModule": "src/index.ts",
|
|
57
57
|
"module": "esm/index.js",
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "aa2f1d1a89d2361c7fd1a93fe29506fa4554f5cc"
|
|
62
62
|
}
|