Skip to content

Commit 945c5f1

Browse files
author
Sebastian Benjamin
committed
WIP
1 parent 8fe4edb commit 945c5f1

26 files changed

Lines changed: 3148 additions & 1809 deletions

File tree

jbrowse/package-lock.json

Lines changed: 2922 additions & 1716 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jbrowse/package.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,20 @@
1111
"clean": "rimraf resources/web/gen && rimraf resources/web/jbrowse/gen && rimraf resources/views/gen",
1212
"jb-sea:fetch": "node ./resources/external/fetch-jbrowse-bundle.mjs",
1313
"jb-sea:build": "node ./resources/external/build-sea.mjs ./resources/external/jbrowse.js",
14-
"jb-sea": "npm run jb-sea:fetch && npm run jb-sea:build"
14+
"jb-sea": "npm run jb-sea:fetch && npm run jb-sea:build",
15+
"postinstall": "patch-package"
1516
},
1617
"dependencies": {
17-
"@gmod/vcf": "^6.0.9",
18-
"@jbrowse/core": "^3.2.0",
19-
"@jbrowse/plugin-linear-genome-view": "^3.2.0",
20-
"@jbrowse/plugin-svg": "^3.2.0",
21-
"@jbrowse/plugin-variants": "^3.2.0",
22-
"@jbrowse/product-core": "^3.2.0",
23-
"@jbrowse/react-linear-genome-view2": "^3.2.0",
18+
"@gmod/vcf": "^7.0.0",
19+
"@jbrowse/core": "^4.1.3",
20+
"@jbrowse/mobx-state-tree": "^5.5.0",
21+
"@jbrowse/plugin-canvas": "^4.1.3",
22+
"@jbrowse/plugin-linear-genome-view": "^4.1.3",
23+
"@jbrowse/plugin-variants": "^4.1.3",
24+
"@jbrowse/product-core": "^4.1.3",
25+
"@jbrowse/react-linear-genome-view2": "^4.1.3",
2426
"@labkey/api": "^1.39.0",
25-
"@labkey/components": "^6.32.2",
27+
"@labkey/components": "^7.16.0",
2628
"@mui/x-data-grid": "^7.28.1",
2729
"assert": "^2.1.0",
2830
"browserify-zlib": "^0.2.0",
@@ -46,12 +48,14 @@
4648
"vm-browserify": "^1.1.2"
4749
},
4850
"devDependencies": {
49-
"@labkey/build": "^8.4.0",
51+
"@labkey/build": "^8.8.0",
5052
"@types/jexl": "^2.3.4",
5153
"@types/jquery": "^3.5.32",
5254
"@types/node": "^20.14.11",
5355
"@types/react": "^18.3.0",
5456
"@types/react-dom": "^18.3.0",
57+
"patch-package": "^8.0.1",
58+
"postinstall-postinstall": "^2.1.0",
5559
"rimraf": "^6.0.1",
5660
"tar": "^7.5.7",
5761
"typescript": "^5.1.6",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff --git a/node_modules/@gmod/bbi/esm/wasm/inflate-wasm-inlined.js b/node_modules/@gmod/bbi/esm/wasm/inflate-wasm-inlined.js
2+
index b2d8cfa..07f8d05 100644
3+
--- a/node_modules/@gmod/bbi/esm/wasm/inflate-wasm-inlined.js
4+
+++ b/node_modules/@gmod/bbi/esm/wasm/inflate-wasm-inlined.js
5+
@@ -357,10 +357,17 @@ async function init() {
6+
return wrapper_wasm;
7+
if (!initPromise) {
8+
initPromise = (async () => {
9+
- const response = await fetch(inflate_wasm_bg_namespaceObject);
10+
- const bytes = await response.arrayBuffer();
11+
+ const b64 = inflate_wasm_bg_namespaceObject.replace(
12+
+ 'data:application/wasm;base64,',
13+
+ '',
14+
+ );
15+
+ const bin = atob(b64);
16+
+ const bytes = new Uint8Array(bin.length);
17+
+ for (let i = 0; i < bin.length; i++) {
18+
+ bytes[i] = bin.charCodeAt(i);
19+
+ }
20+
const { instance } = await WebAssembly.instantiate(bytes, {
21+
- './inflate_wasm_bg.js': src_wasm_inflate_wasm_bg_namespaceObject,
22+
+ './inflate_wasm_bg.js': src_wasm_inflate_wasm_bg_namespaceObject,
23+
});
24+
wrapper_wasm = instance.exports;
25+
__wbg_set_wasm(wrapper_wasm);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/node_modules/@gmod/bgzf-filehandle/esm/wasm/bgzf-wasm-inlined.js b/node_modules/@gmod/bgzf-filehandle/esm/wasm/bgzf-wasm-inlined.js
2+
index b8a4365..5227798 100644
3+
--- a/node_modules/@gmod/bgzf-filehandle/esm/wasm/bgzf-wasm-inlined.js
4+
+++ b/node_modules/@gmod/bgzf-filehandle/esm/wasm/bgzf-wasm-inlined.js
5+
@@ -350,11 +350,19 @@ async function init() {
6+
if (!initPromise) {
7+
initPromise = (async () => {
8+
// wasmData is a data URL from asset/inline
9+
- const response = await fetch(bgzf_wasm_bg_namespaceObject);
10+
- const bytes = await response.arrayBuffer();
11+
+ const b64 = bgzf_wasm_bg_namespaceObject.replace(
12+
+ 'data:application/wasm;base64,',
13+
+ '',
14+
+ );
15+
+ const bin = atob(b64);
16+
+ const bytes = new Uint8Array(bin.length);
17+
+ for (let i = 0; i < bin.length; i++) {
18+
+ bytes[i] = bin.charCodeAt(i);
19+
+ }
20+
const { instance } = await WebAssembly.instantiate(bytes, {
21+
- './bgzf_wasm_bg.js': src_wasm_bgzf_wasm_bg_namespaceObject,
22+
+ './bgzf_wasm_bg.js': src_wasm_bgzf_wasm_bg_namespaceObject,
23+
});
24+
+
25+
wrapper_wasm = instance.exports;
26+
__wbg_set_wasm(wrapper_wasm);
27+
return wrapper_wasm;

jbrowse/resources/external/mGAPSession.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@
6060
"maxFeatureScreenDensity": 100,
6161
"height": 400,
6262
"mouseover": "jexl:'Position: ' + formatWithCommas(get(feature,'POS'))",
63-
"renderer": {
64-
"type": "ExtendedVariantRenderer"
65-
},
6663
"detailsConfig": {
6764
"sections": [
6865
{

jbrowse/resources/external/minimalSession.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@
5151
},
5252
"displays": [{
5353
"type": "ExtendedVariantDisplay",
54-
"displayId": "clinvar_ncbi_hg38-ExtendedVariantDisplay",
55-
"renderer": {
56-
"type": "ExtendedVariantRenderer"
57-
}
54+
"displayId": "clinvar_ncbi_hg38-ExtendedVariantDisplay"
5855
}],
5956
"metadata": {
6057
"extendedVariantDisplayConfig" : [

jbrowse/src/client/JBrowse/Browser/components/JBrowseFilterPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const JBrowseFilterPanel = observer(props => {
4747
const filterDisplayItems = []
4848
for (const track of tracks) {
4949
// @ts-ignore
50-
const activeSamples = getConf(track, ['displays', '0', 'renderer', 'activeSamples'])
50+
const activeSamples = getConf(track, ['displays', '0', 'activeSamples'])
5151
const trackId = getConf(track, ['trackId'])
5252
if (activeSamples) {
5353
const sampleText = activeSamples.split(',').length > 5 ? '<too many to show>' : activeSamples
@@ -56,7 +56,7 @@ const JBrowseFilterPanel = observer(props => {
5656
filterDisplayItems.push(<Button color="primary" key={"sampleFilterButton"} style={{marginRight: 10, textTransform: 'initial'}} variant={'contained'} onClick={() => handleButtonClick('SampleFilterWidget', track, label)}>{label + ': ' + 'Showing sites with a variant in any of:'}<br />{sampleText}</Button>)
5757
}
5858

59-
const infoFilters = getConf(track, ['displays', '0', 'renderer', 'infoFilters'])
59+
const infoFilters = getConf(track, ['displays', '0', 'infoFilters'])
6060
if (infoFilters?.length) {
6161
const filterText = infoFilters.map(filter => generateUserFriendlyLabel(filter)).join(', ')
6262
const label = getConf(track, ['name']) || getConf(track, ['trackId'])

jbrowse/src/client/JBrowse/Browser/plugins/ExtendedVariantPlugin/ColorWidget/ColorWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default jbrowse => {
2323

2424
// @ts-ignore
2525
const displays = readConfObject(track, ['displays']) || []
26-
let paletteName = displays[0].renderer.palette
26+
let paletteName = displays[0].palette
2727
paletteName = paletteName || 'IMPACT'
2828

2929
const [palette, setPalette] = useState(paletteName)
@@ -34,7 +34,7 @@ export default jbrowse => {
3434

3535
const onApply = (event) => {
3636
// NOTE: preProcessSnapshot in the renderer schema should set color1
37-
track.displays[0].renderer.palette.set(palette)
37+
track.displays[0].palette.set(palette)
3838
track.displays[0].renderer.color1.set(generateSchemeJexl(palette))
3939

4040
const m = getSession(model) as SessionWithWidgets

jbrowse/src/client/JBrowse/Browser/plugins/ExtendedVariantPlugin/ExtendedVariantAdapter/ExtendedVcfFeature.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,20 @@ export default class ExtendedVcfFeature extends VcfFeature {
1414
return(variant);
1515
}
1616

17-
if (!variant.INFO["ANN"]) {
17+
const ann = variant.INFO["ANN"] as string[] | undefined
18+
if (!ann) {
1819
return(variant);
1920
}
2021

2122
let IMPACTs = new Set<String>()
22-
for (let i = 0; i < variant.INFO["ANN"].length; i++){
23-
if (/HIGH/g.exec(variant.INFO["ANN"][i])){
23+
for (let i = 0; i < ann.length; i++){
24+
if (/HIGH/g.exec(ann[i])){
2425
IMPACTs.add("HIGH")
2526
}
26-
else if (/MODERATE/g.exec(variant.INFO["ANN"][i])){
27+
else if (/MODERATE/g.exec(ann[i])){
2728
IMPACTs.add("MODERATE")
2829
}
29-
else if (/LOW/g.exec(variant.INFO["ANN"][i])){
30+
else if (/LOW/g.exec(ann[i])){
3031
IMPACTs.add("LOW")
3132
}
3233
}

jbrowse/src/client/JBrowse/Browser/plugins/ExtendedVariantPlugin/ExtendedVariantAdapter/configSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { types } from 'mobx-state-tree'
1+
import { types } from '@jbrowse/mobx-state-tree'
22
import { ConfigurationSchema } from '@jbrowse/core/configuration'
33

44
// TODO: avoid this duplication

0 commit comments

Comments
 (0)