Skip to content

Commit 363522c

Browse files
Provide a default sequence ontology location
1 parent 4b97500 commit 363522c

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

packages/jbrowse-plugin-apollo/local.config.json

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,5 @@
4545
"name": "Apollo",
4646
"url": "http://localhost:9000/dist/jbrowse-plugin-apollo.umd.development.js"
4747
}
48-
],
49-
"configuration": {
50-
"ApolloPlugin": {
51-
"ontologies": [
52-
{
53-
"name": "Sequence Ontology",
54-
"source": {
55-
"uri": "http://localhost:9000/test_data/so-v3.1.json",
56-
"locationType": "UriLocation"
57-
}
58-
}
59-
]
60-
}
61-
}
48+
]
6249
}

packages/jbrowse-plugin-apollo/src/session/ClientDataStore.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import {
4242
import { ChangeManager } from '../ChangeManager'
4343
import {
4444
OntologyManagerType,
45+
OntologyRecordConfiguration,
4546
type TextIndexFieldDefinition,
4647
} from '../OntologyManager'
4748
import type ApolloPluginConfigurationSchema from '../config'
@@ -173,6 +174,18 @@ export function clientDataStoreFactory(
173174
const { ontologyManager, pluginConfiguration } = self
174175
const configuredOntologies =
175176
pluginConfiguration.ontologies as AnyConfigurationModel[]
177+
if (configuredOntologies.length === 0) {
178+
configuredOntologies.push(
179+
OntologyRecordConfiguration.create({
180+
name: 'Sequence Ontology',
181+
version: '01c33c6d9b6c8dca12e7d3e37b49ee113093c2fa',
182+
source: {
183+
uri: 'https://raw.githubusercontent.com/The-Sequence-Ontology/SO-Ontologies/01c33c6d9b6c8dca12e7d3e37b49ee113093c2fa/Ontology_Files/so.json',
184+
locationType: 'UriLocation',
185+
},
186+
}),
187+
)
188+
}
176189
for (const ont of configuredOntologies || []) {
177190
const [name, version, source, indexFields] = [
178191
readConfObject(ont, 'name') as string,

0 commit comments

Comments
 (0)