@jbrowse/plugin-linear-genome-view 3.2.0 → 3.4.0
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/BaseLinearDisplay/components/LinearBlocks.js +1 -1
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +1 -1
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +22 -8
- package/dist/LinearBareDisplay/model.d.ts +1 -1
- package/dist/LinearBasicDisplay/components/AddFiltersDialog.js +1 -1
- package/dist/LinearBasicDisplay/model.d.ts +1 -1
- package/dist/LinearBasicDisplay/model.js +8 -2
- package/dist/LinearGenomeView/components/Cytobands.js +18 -4
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +3 -2
- package/dist/LinearGenomeView/components/HeaderZoomControls.js +8 -2
- package/dist/LinearGenomeView/components/ImportForm.js +1 -1
- package/dist/LinearGenomeView/components/OverviewRubberband.js +0 -6
- package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +1 -9
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +16 -10
- package/dist/LinearGenomeView/components/RubberbandSpan.js +2 -2
- package/dist/LinearGenomeView/components/SearchBox.d.ts +1 -1
- package/dist/LinearGenomeView/components/SearchBox.js +29 -16
- package/dist/LinearGenomeView/components/useWheelScroll.js +13 -1
- package/dist/LinearGenomeView/components/util.d.ts +1 -0
- package/dist/LinearGenomeView/components/util.js +7 -4
- package/dist/LinearGenomeView/model.d.ts +4 -3
- package/dist/LinearGenomeView/model.js +12 -10
- package/dist/LinearGenomeView/util.d.ts +6 -1
- package/dist/LinearGenomeView/util.js +20 -6
- package/dist/index.d.ts +1 -1
- package/dist/searchUtils.js +1 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +1 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +1 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +24 -10
- package/esm/LinearBareDisplay/model.d.ts +1 -1
- package/esm/LinearBasicDisplay/components/AddFiltersDialog.js +1 -1
- package/esm/LinearBasicDisplay/model.d.ts +1 -1
- package/esm/LinearBasicDisplay/model.js +8 -2
- package/esm/LinearGenomeView/components/Cytobands.js +18 -4
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +3 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +9 -3
- package/esm/LinearGenomeView/components/ImportForm.js +1 -1
- package/esm/LinearGenomeView/components/OverviewRubberband.js +0 -6
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +1 -9
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +16 -10
- package/esm/LinearGenomeView/components/RubberbandSpan.js +3 -3
- package/esm/LinearGenomeView/components/SearchBox.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchBox.js +29 -16
- package/esm/LinearGenomeView/components/useWheelScroll.js +13 -1
- package/esm/LinearGenomeView/components/util.d.ts +1 -0
- package/esm/LinearGenomeView/components/util.js +7 -4
- package/esm/LinearGenomeView/model.d.ts +4 -3
- package/esm/LinearGenomeView/model.js +12 -10
- package/esm/LinearGenomeView/util.d.ts +6 -1
- package/esm/LinearGenomeView/util.js +20 -6
- package/esm/index.d.ts +1 -1
- package/esm/searchUtils.js +1 -1
- package/package.json +5 -5
|
@@ -50,7 +50,7 @@ export function makeTicks(start, end, bpPerPx, emitMajor = true, emitMinor = tru
|
|
|
50
50
|
}
|
|
51
51
|
return ticks;
|
|
52
52
|
}
|
|
53
|
-
export async function generateLocations(regions, assemblyManager, assemblyName) {
|
|
53
|
+
export async function generateLocations({ regions, assemblyManager, assemblyName, grow, }) {
|
|
54
54
|
return Promise.all(regions.map(async (region) => {
|
|
55
55
|
const asmName = region.assemblyName || assemblyName;
|
|
56
56
|
if (!asmName) {
|
|
@@ -73,11 +73,25 @@ export async function generateLocations(regions, assemblyManager, assemblyName)
|
|
|
73
73
|
if (!parentRegion) {
|
|
74
74
|
throw new Error(`Could not find refName ${refName} in ${asmName}`);
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
const { start, end } = region;
|
|
77
|
+
if (grow && start && end) {
|
|
78
|
+
const len = end - start;
|
|
79
|
+
const margin = len * grow;
|
|
80
|
+
return {
|
|
81
|
+
...region,
|
|
82
|
+
start: Math.max(0, start - margin),
|
|
83
|
+
end: end + margin,
|
|
84
|
+
assemblyName: asmName,
|
|
85
|
+
parentRegion,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return {
|
|
90
|
+
...region,
|
|
91
|
+
assemblyName: asmName,
|
|
92
|
+
parentRegion,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
81
95
|
}));
|
|
82
96
|
}
|
|
83
97
|
export function parseLocStrings(input, assemblyName, isValidRefName) {
|
package/esm/index.d.ts
CHANGED
|
@@ -195,7 +195,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
195
195
|
} & {
|
|
196
196
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
197
197
|
deleteBlock(key: string): void;
|
|
198
|
-
selectFeature(feature: import("@jbrowse/core/util").Feature): void
|
|
198
|
+
selectFeature(feature: import("@jbrowse/core/util").Feature): Promise<void>;
|
|
199
199
|
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
200
200
|
clearFeatureSelection(): void;
|
|
201
201
|
setFeatureIdUnderMouse(feature?: string): void;
|
package/esm/searchUtils.js
CHANGED
|
@@ -4,7 +4,7 @@ export async function navToOption({ option, model, assemblyName, }) {
|
|
|
4
4
|
const location = option.getLocation();
|
|
5
5
|
const trackId = option.getTrackId();
|
|
6
6
|
if (location) {
|
|
7
|
-
await model.navToLocString(location, assemblyName);
|
|
7
|
+
await model.navToLocString(location, assemblyName, 0.2);
|
|
8
8
|
if (trackId) {
|
|
9
9
|
model.showTrack(trackId);
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-linear-genome-view",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "JBrowse 2 linear genome view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"useSrc": "node ../../scripts/useSrc.js"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@jbrowse/core": "^3.
|
|
42
|
-
"@mui/icons-material": "^
|
|
43
|
-
"@mui/material": "^
|
|
41
|
+
"@jbrowse/core": "^3.4.0",
|
|
42
|
+
"@mui/icons-material": "^7.0.0",
|
|
43
|
+
"@mui/material": "^7.0.0",
|
|
44
44
|
"@types/file-saver": "^2.0.1",
|
|
45
45
|
"copy-to-clipboard": "^3.3.1",
|
|
46
46
|
"file-saver": "^2.0.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"module": "esm/index.js",
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "a9f1ac35fc2dd810bae92cdaf1fc19995bee4413"
|
|
62
62
|
}
|