@jbrowse/plugin-rdf 2.6.1 → 2.6.3

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.
@@ -1,114 +0,0 @@
1
- {
2
- "head": {
3
- "link": [],
4
- "vars": ["refName"]
5
- },
6
- "results": {
7
- "distinct": false,
8
- "ordered": true,
9
- "bindings": [
10
- {
11
- "refName": {
12
- "type": "literal",
13
- "value": "NC_004353.4"
14
- }
15
- },
16
- {
17
- "refName": {
18
- "type": "literal",
19
- "value": "NC_004354.4"
20
- }
21
- },
22
- {
23
- "refName": {
24
- "type": "literal",
25
- "value": "NC_024511.2"
26
- }
27
- },
28
- {
29
- "refName": {
30
- "type": "literal",
31
- "value": "NC_024512.1"
32
- }
33
- },
34
- {
35
- "refName": {
36
- "type": "literal",
37
- "value": "NT_033777.3"
38
- }
39
- },
40
- {
41
- "refName": {
42
- "type": "literal",
43
- "value": "NT_033778.4"
44
- }
45
- },
46
- {
47
- "refName": {
48
- "type": "literal",
49
- "value": "NT_033779.5"
50
- }
51
- },
52
- {
53
- "refName": {
54
- "type": "literal",
55
- "value": "NT_037436.4"
56
- }
57
- },
58
- {
59
- "refName": {
60
- "type": "literal",
61
- "value": "NC_001665.2"
62
- }
63
- },
64
- {
65
- "refName": {
66
- "type": "literal",
67
- "value": "NC_005100.4"
68
- }
69
- },
70
- {
71
- "refName": {
72
- "type": "literal",
73
- "value": "NC_005101.4"
74
- }
75
- },
76
- {
77
- "refName": {
78
- "type": "literal",
79
- "value": "NC_005102.4"
80
- }
81
- },
82
- {
83
- "refName": {
84
- "type": "literal",
85
- "value": "NC_005103.4"
86
- }
87
- },
88
- {
89
- "refName": {
90
- "type": "literal",
91
- "value": "NC_005104.4"
92
- }
93
- },
94
- {
95
- "refName": {
96
- "type": "literal",
97
- "value": "NC_005105.4"
98
- }
99
- },
100
- {
101
- "refName": {
102
- "type": "literal",
103
- "value": "NC_005106.4"
104
- }
105
- },
106
- {
107
- "refName": {
108
- "type": "literal",
109
- "value": "NC_039323.1"
110
- }
111
- }
112
- ]
113
- }
114
- }
@@ -1,3 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`plugin in a stock JBrowse 1`] = `{}`;
package/src/index.test.ts DELETED
@@ -1,18 +0,0 @@
1
- import PluginManager from '@jbrowse/core/PluginManager'
2
- import { getSnapshot } from 'mobx-state-tree'
3
- import ThisPlugin from './index'
4
-
5
- test('plugin in a stock JBrowse', () => {
6
- const pluginManager = new PluginManager([new ThisPlugin()])
7
- pluginManager.createPluggableElements()
8
- pluginManager.configure()
9
- expect(() => pluginManager.addPlugin(new ThisPlugin())).toThrow(
10
- /JBrowse already configured, cannot add plugins/,
11
- )
12
-
13
- const SPARQLAdapter = pluginManager.getAdapterType('SPARQLAdapter')
14
- const config = SPARQLAdapter.configSchema.create({
15
- type: 'SPARQLAdapter',
16
- })
17
- expect(getSnapshot(config)).toMatchSnapshot()
18
- })
package/src/index.ts DELETED
@@ -1,46 +0,0 @@
1
- import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType'
2
- import Plugin from '@jbrowse/core/Plugin'
3
- import PluginManager from '@jbrowse/core/PluginManager'
4
- import { FileLocation } from '@jbrowse/core/util/types'
5
- import {
6
- AdapterClass as SPARQLAdapterClass,
7
- configSchema as sparqlAdapterConfigSchema,
8
- } from './SPARQLAdapter'
9
- import { AdapterGuesser, getFileName } from '@jbrowse/core/util/tracks'
10
-
11
- export default class RdfPlugin extends Plugin {
12
- name = 'RdfPlugin'
13
-
14
- install(pluginManager: PluginManager) {
15
- pluginManager.addAdapterType(
16
- () =>
17
- new AdapterType({
18
- name: 'SPARQLAdapter',
19
- displayName: 'SPARQL adapter',
20
- configSchema: sparqlAdapterConfigSchema,
21
- AdapterClass: SPARQLAdapterClass,
22
- }),
23
- )
24
- pluginManager.addToExtensionPoint(
25
- 'Core-guessAdapterForLocation',
26
- (adapterGuesser: AdapterGuesser) => {
27
- return (
28
- file: FileLocation,
29
- index?: FileLocation,
30
- adapterHint?: string,
31
- ) => {
32
- const regexGuess = /\/sparql$/i
33
- const adapterName = 'SPARQLAdapter'
34
- const fileName = getFileName(file)
35
- if (regexGuess.test(fileName) || adapterHint === adapterName) {
36
- return {
37
- type: adapterName,
38
- endpoint: file,
39
- }
40
- }
41
- return adapterGuesser(file, index, adapterHint)
42
- }
43
- },
44
- )
45
- }
46
- }