@jbrowse/plugin-data-management 3.0.1 → 3.0.2

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.
@@ -10,6 +10,7 @@ const ucscTrackHub_1 = require("./ucscTrackHub");
10
10
  const util_2 = require("./util");
11
11
  async function doConnect(self) {
12
12
  var _a;
13
+ const { pluginManager } = (0, util_1.getEnv)(self);
13
14
  const session = (0, util_1.getSession)(self);
14
15
  const notLoadedAssemblies = [];
15
16
  try {
@@ -21,14 +22,16 @@ async function doConnect(self) {
21
22
  const hub = new ucsc_hub_1.SingleFileHub(hubFileText);
22
23
  const { genome, tracks } = hub;
23
24
  const genomeName = genome.name;
25
+ const shortLabel = genome.data.description;
24
26
  const asm = assemblyManager.get(genomeName);
25
27
  if (!asm) {
26
28
  session.addSessionAssembly({
27
29
  name: genomeName,
30
+ displayName: shortLabel,
28
31
  sequence: {
29
32
  type: 'ReferenceSequenceTrack',
30
33
  metadata: {
31
- ...genome,
34
+ ...genome.data,
32
35
  ...(genome.data.htmlPath
33
36
  ? {
34
37
  htmlPath: `<a href="${(0, util_2.resolve)(genome.data.htmlPath, hubUri)}">${genome.data.htmlPath}</a>`,
@@ -58,6 +61,12 @@ async function doConnect(self) {
58
61
  baseUrl: hubUri,
59
62
  });
60
63
  self.addTrackConfs(tracksNew);
64
+ pluginManager.evaluateExtensionPoint('LaunchView-LinearGenomeView', {
65
+ session,
66
+ assembly: genomeName,
67
+ tracklist: true,
68
+ loc: genome.data.defaultPos,
69
+ });
61
70
  }
62
71
  else {
63
72
  const hubFile = new ucsc_hub_1.HubFile(hubFileText);
@@ -14,9 +14,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
14
14
  description: string;
15
15
  category: string[] | undefined;
16
16
  metadata: {
17
- ucscConfig: {
18
- html?: string | undefined;
19
- };
17
+ html?: string | undefined;
20
18
  };
21
19
  } | {
22
20
  trackId: string;
@@ -45,9 +43,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
45
43
  hicLocation?: undefined;
46
44
  };
47
45
  metadata: {
48
- ucscConfig: {
49
- html?: string | undefined;
50
- };
46
+ html?: string | undefined;
51
47
  };
52
48
  category: (string | undefined)[];
53
49
  } | {
@@ -75,9 +71,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
75
71
  hicLocation?: undefined;
76
72
  };
77
73
  metadata: {
78
- ucscConfig: {
79
- html?: string | undefined;
80
- };
74
+ html?: string | undefined;
81
75
  };
82
76
  category: (string | undefined)[];
83
77
  } | {
@@ -102,9 +96,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
102
96
  hicLocation?: undefined;
103
97
  };
104
98
  metadata: {
105
- ucscConfig: {
106
- html?: string | undefined;
107
- };
99
+ html?: string | undefined;
108
100
  };
109
101
  category: (string | undefined)[];
110
102
  } | {
@@ -129,9 +121,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
129
121
  hicLocation?: undefined;
130
122
  };
131
123
  metadata: {
132
- ucscConfig: {
133
- html?: string | undefined;
134
- };
124
+ html?: string | undefined;
135
125
  };
136
126
  category: (string | undefined)[];
137
127
  } | {
@@ -161,9 +151,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
161
151
  hicLocation?: undefined;
162
152
  };
163
153
  metadata: {
164
- ucscConfig: {
165
- html?: string | undefined;
166
- };
154
+ html?: string | undefined;
167
155
  };
168
156
  category: (string | undefined)[];
169
157
  } | {
@@ -188,9 +176,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
188
176
  vcfGzLocation?: undefined;
189
177
  };
190
178
  metadata: {
191
- ucscConfig: {
192
- html?: string | undefined;
193
- };
179
+ html?: string | undefined;
194
180
  };
195
181
  category: (string | undefined)[];
196
182
  })[];
@@ -35,14 +35,12 @@ function generateTracks({ trackDb, trackDbLoc, assemblyName, sequenceAdapter, ba
35
35
  parentTracks.reverse();
36
36
  return {
37
37
  metadata: {
38
- ucscConfig: {
39
- ...track.data,
40
- ...(track.data.html
41
- ? {
42
- html: `<a href="${(0, util_2.resolve)(track.data.html, baseUrl)}">${track.data.html}</a>`,
43
- }
44
- : {}),
45
- },
38
+ ...track.data,
39
+ ...(track.data.html
40
+ ? {
41
+ html: `<a href="${(0, util_2.resolve)(track.data.html, baseUrl)}">${track.data.html}</a>`,
42
+ }
43
+ : {}),
46
44
  },
47
45
  category: [
48
46
  track.data.group,
@@ -1,12 +1,13 @@
1
1
  import { HubFile, SingleFileHub } from '@gmod/ucsc-hub';
2
2
  import { getConf } from '@jbrowse/core/configuration';
3
- import { getSession } from '@jbrowse/core/util';
3
+ import { getEnv, getSession } from '@jbrowse/core/util';
4
4
  import { openLocation } from '@jbrowse/core/util/io';
5
5
  import { nanoid } from '@jbrowse/core/util/nanoid';
6
6
  import { generateTracks } from './ucscTrackHub';
7
7
  import { fetchGenomesFile, fetchTrackDbFile, resolve } from './util';
8
8
  export async function doConnect(self) {
9
9
  var _a;
10
+ const { pluginManager } = getEnv(self);
10
11
  const session = getSession(self);
11
12
  const notLoadedAssemblies = [];
12
13
  try {
@@ -18,14 +19,16 @@ export async function doConnect(self) {
18
19
  const hub = new SingleFileHub(hubFileText);
19
20
  const { genome, tracks } = hub;
20
21
  const genomeName = genome.name;
22
+ const shortLabel = genome.data.description;
21
23
  const asm = assemblyManager.get(genomeName);
22
24
  if (!asm) {
23
25
  session.addSessionAssembly({
24
26
  name: genomeName,
27
+ displayName: shortLabel,
25
28
  sequence: {
26
29
  type: 'ReferenceSequenceTrack',
27
30
  metadata: {
28
- ...genome,
31
+ ...genome.data,
29
32
  ...(genome.data.htmlPath
30
33
  ? {
31
34
  htmlPath: `<a href="${resolve(genome.data.htmlPath, hubUri)}">${genome.data.htmlPath}</a>`,
@@ -55,6 +58,12 @@ export async function doConnect(self) {
55
58
  baseUrl: hubUri,
56
59
  });
57
60
  self.addTrackConfs(tracksNew);
61
+ pluginManager.evaluateExtensionPoint('LaunchView-LinearGenomeView', {
62
+ session,
63
+ assembly: genomeName,
64
+ tracklist: true,
65
+ loc: genome.data.defaultPos,
66
+ });
58
67
  }
59
68
  else {
60
69
  const hubFile = new HubFile(hubFileText);
@@ -14,9 +14,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
14
14
  description: string;
15
15
  category: string[] | undefined;
16
16
  metadata: {
17
- ucscConfig: {
18
- html?: string | undefined;
19
- };
17
+ html?: string | undefined;
20
18
  };
21
19
  } | {
22
20
  trackId: string;
@@ -45,9 +43,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
45
43
  hicLocation?: undefined;
46
44
  };
47
45
  metadata: {
48
- ucscConfig: {
49
- html?: string | undefined;
50
- };
46
+ html?: string | undefined;
51
47
  };
52
48
  category: (string | undefined)[];
53
49
  } | {
@@ -75,9 +71,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
75
71
  hicLocation?: undefined;
76
72
  };
77
73
  metadata: {
78
- ucscConfig: {
79
- html?: string | undefined;
80
- };
74
+ html?: string | undefined;
81
75
  };
82
76
  category: (string | undefined)[];
83
77
  } | {
@@ -102,9 +96,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
102
96
  hicLocation?: undefined;
103
97
  };
104
98
  metadata: {
105
- ucscConfig: {
106
- html?: string | undefined;
107
- };
99
+ html?: string | undefined;
108
100
  };
109
101
  category: (string | undefined)[];
110
102
  } | {
@@ -129,9 +121,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
129
121
  hicLocation?: undefined;
130
122
  };
131
123
  metadata: {
132
- ucscConfig: {
133
- html?: string | undefined;
134
- };
124
+ html?: string | undefined;
135
125
  };
136
126
  category: (string | undefined)[];
137
127
  } | {
@@ -161,9 +151,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
161
151
  hicLocation?: undefined;
162
152
  };
163
153
  metadata: {
164
- ucscConfig: {
165
- html?: string | undefined;
166
- };
154
+ html?: string | undefined;
167
155
  };
168
156
  category: (string | undefined)[];
169
157
  } | {
@@ -188,9 +176,7 @@ export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequ
188
176
  vcfGzLocation?: undefined;
189
177
  };
190
178
  metadata: {
191
- ucscConfig: {
192
- html?: string | undefined;
193
- };
179
+ html?: string | undefined;
194
180
  };
195
181
  category: (string | undefined)[];
196
182
  })[];
@@ -28,14 +28,12 @@ export function generateTracks({ trackDb, trackDbLoc, assemblyName, sequenceAdap
28
28
  parentTracks.reverse();
29
29
  return {
30
30
  metadata: {
31
- ucscConfig: {
32
- ...track.data,
33
- ...(track.data.html
34
- ? {
35
- html: `<a href="${resolve(track.data.html, baseUrl)}">${track.data.html}</a>`,
36
- }
37
- : {}),
38
- },
31
+ ...track.data,
32
+ ...(track.data.html
33
+ ? {
34
+ html: `<a href="${resolve(track.data.html, baseUrl)}">${track.data.html}</a>`,
35
+ }
36
+ : {}),
39
37
  },
40
38
  category: [
41
39
  track.data.group,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-data-management",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "JBrowse 2 linear genome view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -37,9 +37,9 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@gmod/ucsc-hub": "^1.0.0",
40
- "@jbrowse/core": "^3.0.1",
41
- "@jbrowse/plugin-config": "^3.0.1",
42
- "@jbrowse/product-core": "^3.0.1",
40
+ "@jbrowse/core": "^3.0.2",
41
+ "@jbrowse/plugin-config": "^3.0.2",
42
+ "@jbrowse/product-core": "^3.0.2",
43
43
  "@mui/icons-material": "^6.0.0",
44
44
  "@mui/material": "^6.0.0",
45
45
  "@mui/x-data-grid": "^7.0.0",
@@ -61,5 +61,5 @@
61
61
  "distModule": "esm/index.js",
62
62
  "srcModule": "src/index.ts",
63
63
  "module": "esm/index.js",
64
- "gitHead": "aa2f1d1a89d2361c7fd1a93fe29506fa4554f5cc"
64
+ "gitHead": "c01a35edcb2612e94661af8793f09c95c0b13c75"
65
65
  }