@jbrowse/plugin-data-management 2.8.0 → 2.10.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/AddTrackWidget/components/DefaultAddTrackWorkflow.js +4 -8
- package/dist/AddTrackWidget/model.d.ts +81 -0
- package/dist/AddTrackWidget/model.js +81 -0
- package/dist/HierarchicalTrackSelectorWidget/components/ShoppingCart.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/ShoppingCart.js +11 -53
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.d.ts +5 -7
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.js +12 -11
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.d.ts +5 -7
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.js +11 -8
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.d.ts +1 -11
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.js +9 -7
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.js +40 -135
- package/dist/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.d.ts +12 -0
- package/dist/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.js +59 -0
- package/dist/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.d.ts +6 -0
- package/dist/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.js +45 -0
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.js +71 -46
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.js +5 -34
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.js +8 -3
- package/dist/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.d.ts +6 -0
- package/dist/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.js +42 -0
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.js +7 -6
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.js +9 -28
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.d.ts +12 -0
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.js +50 -0
- package/dist/HierarchicalTrackSelectorWidget/components/util.d.ts +3 -0
- package/dist/HierarchicalTrackSelectorWidget/components/util.js +5 -1
- package/dist/HierarchicalTrackSelectorWidget/facetedModel.d.ts +128 -0
- package/dist/HierarchicalTrackSelectorWidget/facetedModel.js +206 -0
- package/dist/HierarchicalTrackSelectorWidget/facetedUtil.d.ts +2 -0
- package/dist/HierarchicalTrackSelectorWidget/{components/faceted/util.js → facetedUtil.js} +5 -1
- package/dist/HierarchicalTrackSelectorWidget/generateHierarchy.d.ts +17 -5
- package/dist/HierarchicalTrackSelectorWidget/generateHierarchy.js +27 -21
- package/dist/HierarchicalTrackSelectorWidget/model.d.ts +193 -15
- package/dist/HierarchicalTrackSelectorWidget/model.js +209 -22
- package/dist/ucsc-trackhub/doConnect.d.ts +1 -0
- package/dist/ucsc-trackhub/doConnect.js +131 -0
- package/dist/ucsc-trackhub/model.d.ts +19 -2
- package/dist/ucsc-trackhub/model.js +16 -71
- package/dist/ucsc-trackhub/ucscTrackHub.d.ts +161 -4
- package/dist/ucsc-trackhub/ucscTrackHub.js +49 -166
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.js +4 -8
- package/esm/AddTrackWidget/model.d.ts +81 -0
- package/esm/AddTrackWidget/model.js +81 -0
- package/esm/HierarchicalTrackSelectorWidget/components/ShoppingCart.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/ShoppingCart.js +12 -31
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.d.ts +5 -7
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.js +13 -11
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.d.ts +5 -7
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.js +12 -8
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.d.ts +1 -11
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.js +9 -7
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.js +41 -113
- package/esm/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.d.ts +12 -0
- package/esm/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.js +31 -0
- package/esm/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.d.ts +6 -0
- package/esm/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.js +40 -0
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.js +71 -46
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.js +6 -12
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.js +8 -3
- package/esm/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.d.ts +6 -0
- package/esm/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.js +37 -0
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.js +7 -6
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.js +8 -27
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.d.ts +12 -0
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.js +45 -0
- package/esm/HierarchicalTrackSelectorWidget/components/util.d.ts +3 -0
- package/esm/HierarchicalTrackSelectorWidget/components/util.js +5 -1
- package/esm/HierarchicalTrackSelectorWidget/facetedModel.d.ts +128 -0
- package/esm/HierarchicalTrackSelectorWidget/facetedModel.js +202 -0
- package/esm/HierarchicalTrackSelectorWidget/facetedUtil.d.ts +2 -0
- package/esm/HierarchicalTrackSelectorWidget/{components/faceted/util.js → facetedUtil.js} +3 -0
- package/esm/HierarchicalTrackSelectorWidget/generateHierarchy.d.ts +17 -5
- package/esm/HierarchicalTrackSelectorWidget/generateHierarchy.js +27 -21
- package/esm/HierarchicalTrackSelectorWidget/model.d.ts +193 -15
- package/esm/HierarchicalTrackSelectorWidget/model.js +211 -24
- package/esm/ucsc-trackhub/doConnect.d.ts +1 -0
- package/esm/ucsc-trackhub/doConnect.js +127 -0
- package/esm/ucsc-trackhub/model.d.ts +19 -2
- package/esm/ucsc-trackhub/model.js +17 -72
- package/esm/ucsc-trackhub/ucscTrackHub.d.ts +161 -4
- package/esm/ucsc-trackhub/ucscTrackHub.js +48 -141
- package/package.json +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/util.d.ts +0 -1
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/util.d.ts +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { HubFile, SingleFileHub } from '@gmod/ucsc-hub';
|
|
2
|
+
import { generateTracks, fetchGenomesFile, fetchTrackDbFile, } from './ucscTrackHub';
|
|
3
|
+
import { getConf } from '@jbrowse/core/configuration';
|
|
4
|
+
import { getSession } from '@jbrowse/core/util';
|
|
5
|
+
import { openLocation } from '@jbrowse/core/util/io';
|
|
6
|
+
import { nanoid } from '@jbrowse/core/util/nanoid';
|
|
7
|
+
function resolve(uri, baseUri) {
|
|
8
|
+
return new URL(uri, baseUri).href;
|
|
9
|
+
}
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
export async function doConnect(self) {
|
|
12
|
+
var _a;
|
|
13
|
+
const session = getSession(self);
|
|
14
|
+
const notLoadedAssemblies = [];
|
|
15
|
+
try {
|
|
16
|
+
const hubFileLocation = getConf(self, 'hubTxtLocation');
|
|
17
|
+
const hubFileText = await openLocation(hubFileLocation).readFile('utf8');
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
const hubUri = resolve(hubFileLocation.uri, hubFileLocation.baseUri);
|
|
20
|
+
const { assemblyManager } = session;
|
|
21
|
+
if (hubFileText.includes('useOneFile on')) {
|
|
22
|
+
const hub = new SingleFileHub(hubFileText);
|
|
23
|
+
const { genome, tracks } = hub;
|
|
24
|
+
const genomeName = genome.name;
|
|
25
|
+
const asm = assemblyManager.get(genomeName);
|
|
26
|
+
if (!asm) {
|
|
27
|
+
// @ts-expect-error
|
|
28
|
+
session.addSessionAssembly({
|
|
29
|
+
name: genomeName,
|
|
30
|
+
sequence: {
|
|
31
|
+
type: 'ReferenceSequenceTrack',
|
|
32
|
+
trackId: `${genomeName}-${nanoid()}`,
|
|
33
|
+
adapter: {
|
|
34
|
+
type: 'TwoBitAdapter',
|
|
35
|
+
twoBitLocation: {
|
|
36
|
+
uri: resolve(genome.data.twoBitPath, hubUri),
|
|
37
|
+
},
|
|
38
|
+
chromSizesLocation: {
|
|
39
|
+
uri: resolve(genome.data.chromSizes, hubUri),
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const asm2 = assemblyManager.get(genomeName);
|
|
46
|
+
const sequenceAdapter = getConf(asm2, ['sequence', 'adapter']);
|
|
47
|
+
const tracksNew = generateTracks({
|
|
48
|
+
trackDb: tracks,
|
|
49
|
+
trackDbLoc: hubFileLocation,
|
|
50
|
+
assemblyName: genomeName,
|
|
51
|
+
sequenceAdapter,
|
|
52
|
+
});
|
|
53
|
+
self.addTrackConfs(tracksNew);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const hubFile = new HubFile(hubFileText);
|
|
57
|
+
const genomeFile = hubFile.data.genomesFile;
|
|
58
|
+
if (!genomeFile) {
|
|
59
|
+
throw new Error('genomesFile not found on hub');
|
|
60
|
+
}
|
|
61
|
+
// @ts-expect-error
|
|
62
|
+
const hubUri = resolve(hubFileLocation.uri, hubFileLocation.baseUri);
|
|
63
|
+
const genomesFileLocation = hubUri
|
|
64
|
+
? {
|
|
65
|
+
uri: resolve(genomeFile, hubUri),
|
|
66
|
+
locationType: 'UriLocation',
|
|
67
|
+
}
|
|
68
|
+
: {
|
|
69
|
+
localPath: genomeFile,
|
|
70
|
+
locationType: 'LocalPathLocation',
|
|
71
|
+
};
|
|
72
|
+
const genomesFile = await fetchGenomesFile(genomesFileLocation);
|
|
73
|
+
const map = {};
|
|
74
|
+
for (const [genomeName, genome] of Object.entries(genomesFile.data)) {
|
|
75
|
+
const assemblyNames = getConf(self, 'assemblyNames');
|
|
76
|
+
if (assemblyNames.length > 0 && !assemblyNames.includes(genomeName)) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
const asm = assemblyManager.get(genomeName);
|
|
80
|
+
if (!asm) {
|
|
81
|
+
notLoadedAssemblies.push(genomeName);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
// @ts-expect-error
|
|
85
|
+
const db = genome.data.trackDb;
|
|
86
|
+
if (!db) {
|
|
87
|
+
throw new Error('genomesFile not found on hub');
|
|
88
|
+
}
|
|
89
|
+
const base = new URL(genomeFile, hubUri);
|
|
90
|
+
const loc = hubUri
|
|
91
|
+
? {
|
|
92
|
+
uri: new URL(db, base).href,
|
|
93
|
+
locationType: 'UriLocation',
|
|
94
|
+
}
|
|
95
|
+
: {
|
|
96
|
+
localPath: db,
|
|
97
|
+
locationType: 'LocalPathLocation',
|
|
98
|
+
};
|
|
99
|
+
const trackDb = await fetchTrackDbFile(loc);
|
|
100
|
+
const sequenceAdapter = getConf(asm, ['sequence', 'adapter']);
|
|
101
|
+
const tracks = generateTracks({
|
|
102
|
+
trackDb,
|
|
103
|
+
trackDbLoc: loc,
|
|
104
|
+
assemblyName: genomeName,
|
|
105
|
+
sequenceAdapter,
|
|
106
|
+
});
|
|
107
|
+
self.addTrackConfs(tracks);
|
|
108
|
+
map[genomeName] = tracks.length;
|
|
109
|
+
}
|
|
110
|
+
const loadedAssemblies = Object.entries(map);
|
|
111
|
+
const str1 = loadedAssemblies.length
|
|
112
|
+
? `Loaded data from these assemblies: ${loadedAssemblies
|
|
113
|
+
.map(([key, val]) => `${key} (${val} tracks)`)
|
|
114
|
+
.join(', ')}`
|
|
115
|
+
: '';
|
|
116
|
+
const str2 = notLoadedAssemblies.length
|
|
117
|
+
? `Skipped data from these assemblies: ${notLoadedAssemblies.join(', ')}`
|
|
118
|
+
: '';
|
|
119
|
+
session.notify([str1, str2].filter(f => !!f).join('. '), 'success');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch (e) {
|
|
123
|
+
console.error(e);
|
|
124
|
+
session.notify(`${getConf(self, 'name')}: "${e}"`, 'error');
|
|
125
|
+
(_a = session.breakConnection) === null || _a === void 0 ? void 0 : _a.call(session, self.configuration);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
/**
|
|
3
|
+
* #stateModel UCSCTrackHubConnection
|
|
4
|
+
* extends BaseConnectionModel
|
|
5
|
+
*/
|
|
2
6
|
export default function UCSCTrackHubConnection(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
3
7
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
4
8
|
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
@@ -10,11 +14,16 @@ export default function UCSCTrackHubConnection(pluginManager: PluginManager): im
|
|
|
10
14
|
};
|
|
11
15
|
assemblyNames: {
|
|
12
16
|
type: string;
|
|
13
|
-
defaultValue: never[];
|
|
17
|
+
defaultValue: never[]; /**
|
|
18
|
+
* #action
|
|
19
|
+
*/
|
|
14
20
|
description: string;
|
|
15
21
|
};
|
|
16
22
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
17
23
|
} & {
|
|
24
|
+
/**
|
|
25
|
+
* #property
|
|
26
|
+
*/
|
|
18
27
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
19
28
|
hubTxtLocation: {
|
|
20
29
|
type: string;
|
|
@@ -25,7 +34,9 @@ export default function UCSCTrackHubConnection(pluginManager: PluginManager): im
|
|
|
25
34
|
description: string;
|
|
26
35
|
};
|
|
27
36
|
assemblyNames: {
|
|
28
|
-
type: string;
|
|
37
|
+
type: string; /**
|
|
38
|
+
* #property
|
|
39
|
+
*/
|
|
29
40
|
defaultValue: never[];
|
|
30
41
|
description: string;
|
|
31
42
|
};
|
|
@@ -41,6 +52,9 @@ export default function UCSCTrackHubConnection(pluginManager: PluginManager): im
|
|
|
41
52
|
description: string;
|
|
42
53
|
};
|
|
43
54
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>, undefined>>;
|
|
55
|
+
/**
|
|
56
|
+
* #property
|
|
57
|
+
*/
|
|
44
58
|
type: import("mobx-state-tree").ISimpleType<"UCSCTrackHubConnection">;
|
|
45
59
|
}, {
|
|
46
60
|
connect(_arg: {
|
|
@@ -67,5 +81,8 @@ export default function UCSCTrackHubConnection(pluginManager: PluginManager): im
|
|
|
67
81
|
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[]): import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
|
|
68
82
|
clear(): void;
|
|
69
83
|
} & {
|
|
84
|
+
/**
|
|
85
|
+
* #action
|
|
86
|
+
*/
|
|
70
87
|
connect(): Promise<void>;
|
|
71
88
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -1,87 +1,32 @@
|
|
|
1
1
|
import { BaseConnectionModelFactory } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
|
-
import { ConfigurationReference
|
|
3
|
-
import { getSession } from '@jbrowse/core/util';
|
|
2
|
+
import { ConfigurationReference } from '@jbrowse/core/configuration';
|
|
4
3
|
import { types } from 'mobx-state-tree';
|
|
5
4
|
// locals
|
|
6
5
|
import configSchema from './configSchema';
|
|
6
|
+
/**
|
|
7
|
+
* #stateModel UCSCTrackHubConnection
|
|
8
|
+
* extends BaseConnectionModel
|
|
9
|
+
*/
|
|
7
10
|
export default function UCSCTrackHubConnection(pluginManager) {
|
|
8
11
|
return types
|
|
9
12
|
.compose('UCSCTrackHubConnection', BaseConnectionModelFactory(pluginManager), types.model({
|
|
13
|
+
/**
|
|
14
|
+
* #property
|
|
15
|
+
*/
|
|
10
16
|
configuration: ConfigurationReference(configSchema),
|
|
17
|
+
/**
|
|
18
|
+
* #property
|
|
19
|
+
*/
|
|
11
20
|
type: types.literal('UCSCTrackHubConnection'),
|
|
12
21
|
}))
|
|
13
22
|
.actions(self => ({
|
|
23
|
+
/**
|
|
24
|
+
* #action
|
|
25
|
+
*/
|
|
14
26
|
async connect() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
const hubFileLocation = getConf(self, 'hubTxtLocation');
|
|
20
|
-
const { generateTracks, fetchGenomesFile, fetchTrackDbFile, fetchHubFile, } = await import('./ucscTrackHub');
|
|
21
|
-
const hubFile = await fetchHubFile(hubFileLocation);
|
|
22
|
-
const genomeFile = hubFile.get('genomesFile');
|
|
23
|
-
if (!genomeFile) {
|
|
24
|
-
throw new Error('genomesFile not found on hub');
|
|
25
|
-
}
|
|
26
|
-
const hubUri = new URL(hubFileLocation.uri, hubFileLocation.baseUri);
|
|
27
|
-
const genomesFileLocation = hubUri
|
|
28
|
-
? {
|
|
29
|
-
uri: new URL(genomeFile, hubUri).href,
|
|
30
|
-
locationType: 'UriLocation',
|
|
31
|
-
}
|
|
32
|
-
: {
|
|
33
|
-
localPath: genomeFile,
|
|
34
|
-
locationType: 'LocalPathLocation',
|
|
35
|
-
};
|
|
36
|
-
const genomesFile = await fetchGenomesFile(genomesFileLocation);
|
|
37
|
-
const map = {};
|
|
38
|
-
for (const [genomeName, genome] of genomesFile) {
|
|
39
|
-
const assemblyNames = getConf(self, 'assemblyNames');
|
|
40
|
-
if (assemblyNames.length > 0 &&
|
|
41
|
-
!assemblyNames.includes(genomeName)) {
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
const conf = (_a = session.assemblyManager.get(genomeName)) === null || _a === void 0 ? void 0 : _a.configuration;
|
|
45
|
-
if (!conf) {
|
|
46
|
-
notLoadedAssemblies.push(genomeName);
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
const db = genome.get('trackDb');
|
|
50
|
-
if (!db) {
|
|
51
|
-
throw new Error('genomesFile not found on hub');
|
|
52
|
-
}
|
|
53
|
-
const base = new URL(genomeFile, hubUri);
|
|
54
|
-
const loc = hubUri
|
|
55
|
-
? {
|
|
56
|
-
uri: new URL(db, base).href,
|
|
57
|
-
locationType: 'UriLocation',
|
|
58
|
-
}
|
|
59
|
-
: {
|
|
60
|
-
localPath: db,
|
|
61
|
-
locationType: 'LocalPathLocation',
|
|
62
|
-
};
|
|
63
|
-
const trackDb = await fetchTrackDbFile(loc);
|
|
64
|
-
const seqAdapter = readConfObject(conf, ['sequence', 'adapter']);
|
|
65
|
-
const tracks = generateTracks(trackDb, loc, genomeName, seqAdapter);
|
|
66
|
-
self.addTrackConfs(tracks);
|
|
67
|
-
map[genomeName] = tracks.length;
|
|
68
|
-
}
|
|
69
|
-
const loadedAssemblies = Object.entries(map);
|
|
70
|
-
const str1 = loadedAssemblies.length
|
|
71
|
-
? `Loaded data from these assemblies: ${loadedAssemblies
|
|
72
|
-
.map(([key, val]) => `${key} (${val} tracks)`)
|
|
73
|
-
.join(', ')}`
|
|
74
|
-
: '';
|
|
75
|
-
const str2 = notLoadedAssemblies.length
|
|
76
|
-
? `Skipped data from these assemblies: ${notLoadedAssemblies.join(', ')}`
|
|
77
|
-
: '';
|
|
78
|
-
session.notify([str1, str2].filter(f => !!f).join('. '), 'success');
|
|
79
|
-
}
|
|
80
|
-
catch (e) {
|
|
81
|
-
console.error(e);
|
|
82
|
-
session.notify(`There was a problem connecting to the UCSC Track Hub "${self.configuration.name}". Please make sure you have entered a valid hub.txt file. The error that was thrown is: "${e}"`, 'error');
|
|
83
|
-
(_b = session.breakConnection) === null || _b === void 0 ? void 0 : _b.call(session, self.configuration);
|
|
84
|
-
}
|
|
27
|
+
const { doConnect } = await import('./doConnect');
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
29
|
+
doConnect(self);
|
|
85
30
|
},
|
|
86
31
|
}));
|
|
87
32
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TrackDbFile } from '@gmod/ucsc-hub';
|
|
2
1
|
import { FileLocation } from '@jbrowse/core/util';
|
|
3
|
-
|
|
4
|
-
export declare function fetchGenomesFile(genomesLoc: FileLocation): Promise<
|
|
2
|
+
import { GenomesFile, TrackDbFile } from '@gmod/ucsc-hub';
|
|
3
|
+
export declare function fetchGenomesFile(genomesLoc: FileLocation): Promise<GenomesFile>;
|
|
5
4
|
export declare function fetchTrackDbFile(trackDbLoc: FileLocation): Promise<TrackDbFile>;
|
|
6
5
|
export declare function makeLoc(first: string, base: {
|
|
7
6
|
uri: string;
|
|
7
|
+
baseUri?: string;
|
|
8
8
|
}): {
|
|
9
9
|
uri: string;
|
|
10
10
|
locationType: string;
|
|
@@ -19,5 +19,162 @@ export declare function makeLoc2(first: string, alt?: string): {
|
|
|
19
19
|
uri: string | undefined;
|
|
20
20
|
locationType: string;
|
|
21
21
|
};
|
|
22
|
-
export declare function generateTracks(trackDb
|
|
22
|
+
export declare function generateTracks({ trackDb, trackDbLoc, assemblyName, sequenceAdapter, }: {
|
|
23
|
+
trackDb: TrackDbFile;
|
|
24
|
+
trackDbLoc: FileLocation;
|
|
25
|
+
assemblyName: string;
|
|
26
|
+
sequenceAdapter: any;
|
|
27
|
+
}): ({
|
|
28
|
+
trackId: string;
|
|
29
|
+
assemblyNames: string[];
|
|
30
|
+
type: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
category: string[] | undefined;
|
|
34
|
+
} | {
|
|
35
|
+
trackId: string;
|
|
36
|
+
assemblyNames: string[];
|
|
37
|
+
type: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
category: string[];
|
|
41
|
+
adapter: {
|
|
42
|
+
type: string;
|
|
43
|
+
bamLocation: {
|
|
44
|
+
uri: string | undefined;
|
|
45
|
+
locationType: string;
|
|
46
|
+
};
|
|
47
|
+
index: {
|
|
48
|
+
location: {
|
|
49
|
+
uri: string | undefined;
|
|
50
|
+
locationType: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
cramLocation?: undefined;
|
|
54
|
+
craiLocation?: undefined;
|
|
55
|
+
sequenceAdapter?: undefined;
|
|
56
|
+
bigBedLocation?: undefined;
|
|
57
|
+
bigWigLocation?: undefined;
|
|
58
|
+
vcfGzLocation?: undefined;
|
|
59
|
+
hicLocation?: undefined;
|
|
60
|
+
};
|
|
61
|
+
} | {
|
|
62
|
+
trackId: string;
|
|
63
|
+
assemblyNames: string[];
|
|
64
|
+
type: string;
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
category: string[];
|
|
68
|
+
adapter: {
|
|
69
|
+
type: string;
|
|
70
|
+
cramLocation: {
|
|
71
|
+
uri: string | undefined;
|
|
72
|
+
locationType: string;
|
|
73
|
+
};
|
|
74
|
+
craiLocation: {
|
|
75
|
+
uri: string | undefined;
|
|
76
|
+
locationType: string;
|
|
77
|
+
};
|
|
78
|
+
sequenceAdapter: any;
|
|
79
|
+
bamLocation?: undefined;
|
|
80
|
+
index?: undefined;
|
|
81
|
+
bigBedLocation?: undefined;
|
|
82
|
+
bigWigLocation?: undefined;
|
|
83
|
+
vcfGzLocation?: undefined;
|
|
84
|
+
hicLocation?: undefined;
|
|
85
|
+
};
|
|
86
|
+
} | {
|
|
87
|
+
trackId: string;
|
|
88
|
+
assemblyNames: string[];
|
|
89
|
+
type: string;
|
|
90
|
+
name: string;
|
|
91
|
+
description: string;
|
|
92
|
+
category: string[];
|
|
93
|
+
adapter: {
|
|
94
|
+
type: string;
|
|
95
|
+
bigBedLocation: {
|
|
96
|
+
uri: string | undefined;
|
|
97
|
+
locationType: string;
|
|
98
|
+
};
|
|
99
|
+
bamLocation?: undefined;
|
|
100
|
+
index?: undefined;
|
|
101
|
+
cramLocation?: undefined;
|
|
102
|
+
craiLocation?: undefined;
|
|
103
|
+
sequenceAdapter?: undefined;
|
|
104
|
+
bigWigLocation?: undefined;
|
|
105
|
+
vcfGzLocation?: undefined;
|
|
106
|
+
hicLocation?: undefined;
|
|
107
|
+
};
|
|
108
|
+
} | {
|
|
109
|
+
trackId: string;
|
|
110
|
+
assemblyNames: string[];
|
|
111
|
+
type: string;
|
|
112
|
+
name: string;
|
|
113
|
+
description: string;
|
|
114
|
+
category: string[];
|
|
115
|
+
adapter: {
|
|
116
|
+
type: string;
|
|
117
|
+
bigWigLocation: {
|
|
118
|
+
uri: string | undefined;
|
|
119
|
+
locationType: string;
|
|
120
|
+
};
|
|
121
|
+
bamLocation?: undefined;
|
|
122
|
+
index?: undefined;
|
|
123
|
+
cramLocation?: undefined;
|
|
124
|
+
craiLocation?: undefined;
|
|
125
|
+
sequenceAdapter?: undefined;
|
|
126
|
+
bigBedLocation?: undefined;
|
|
127
|
+
vcfGzLocation?: undefined;
|
|
128
|
+
hicLocation?: undefined;
|
|
129
|
+
};
|
|
130
|
+
} | {
|
|
131
|
+
trackId: string;
|
|
132
|
+
assemblyNames: string[];
|
|
133
|
+
type: string;
|
|
134
|
+
name: string;
|
|
135
|
+
description: string;
|
|
136
|
+
category: string[];
|
|
137
|
+
adapter: {
|
|
138
|
+
type: string;
|
|
139
|
+
vcfGzLocation: {
|
|
140
|
+
uri: string | undefined;
|
|
141
|
+
locationType: string;
|
|
142
|
+
};
|
|
143
|
+
index: {
|
|
144
|
+
location: {
|
|
145
|
+
uri: string | undefined;
|
|
146
|
+
locationType: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
bamLocation?: undefined;
|
|
150
|
+
cramLocation?: undefined;
|
|
151
|
+
craiLocation?: undefined;
|
|
152
|
+
sequenceAdapter?: undefined;
|
|
153
|
+
bigBedLocation?: undefined;
|
|
154
|
+
bigWigLocation?: undefined;
|
|
155
|
+
hicLocation?: undefined;
|
|
156
|
+
};
|
|
157
|
+
} | {
|
|
158
|
+
trackId: string;
|
|
159
|
+
assemblyNames: string[];
|
|
160
|
+
type: string;
|
|
161
|
+
name: string;
|
|
162
|
+
description: string;
|
|
163
|
+
category: string[];
|
|
164
|
+
adapter: {
|
|
165
|
+
type: string;
|
|
166
|
+
hicLocation: {
|
|
167
|
+
uri: string | undefined;
|
|
168
|
+
locationType: string;
|
|
169
|
+
};
|
|
170
|
+
bamLocation?: undefined;
|
|
171
|
+
index?: undefined;
|
|
172
|
+
cramLocation?: undefined;
|
|
173
|
+
craiLocation?: undefined;
|
|
174
|
+
sequenceAdapter?: undefined;
|
|
175
|
+
bigBedLocation?: undefined;
|
|
176
|
+
bigWigLocation?: undefined;
|
|
177
|
+
vcfGzLocation?: undefined;
|
|
178
|
+
};
|
|
179
|
+
})[];
|
|
23
180
|
export { default as ucscAssemblies } from './ucscAssemblies';
|