Skip to content

Commit

Permalink
Add a default location for feature type ontology
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjstevens committed Oct 20, 2024
1 parent b8a4e94 commit 7cc023b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/apollo-collaboration-server/.development.env
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ DESCRIPTION=A server for Apollo development purposes
# URL (relative or absolute) of the Apollo JBrowse plugin.
# Defaults to relative URL 'apollo.js'
PLUGIN_LOCATION=http://localhost:9000/dist/jbrowse-plugin-apollo.umd.development.js
FEATURE_TYPE_ONTOLOGY_LOCATION=test_data/so-v3.1.json

# Application port, defaults to 3999
# PORT=3999
Expand Down
1 change: 1 addition & 0 deletions packages/apollo-collaboration-server/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const validationSchema = Joi.object({
SESSION_SECRET_FILE: Joi.string(),
// Optional
DESCRIPTION: Joi.string(),
FEATURE_TYPE_ONTOLOGY_LOCATION: Joi.string(),
PLUGIN_LOCATION: Joi.string(),
ALLOW_ROOT_USER: Joi.boolean().default(false),
ROOT_USER_NAME: Joi.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class JBrowseService {
NAME: string
DESCRIPTION?: string
PLUGIN_LOCATION?: string
FEATURE_TYPE_ONTOLOGY_LOCATION?: string
},
true
>,
Expand All @@ -38,6 +39,10 @@ export class JBrowseService {
}

getConfiguration() {
const feature_type_ontology_location =
this.configService.get('FEATURE_TYPE_ONTOLOGY_LOCATION', {
infer: true,
}) ?? 'sequence_ontology.json'
return {
theme: {
palette: {
Expand All @@ -55,6 +60,17 @@ export class JBrowseService {
},
},
},
ApolloPlugin: {
ontologies: [
{
name: 'Sequence Ontology',
source: {
uri: feature_type_ontology_location,
locationType: 'UriLocation',
},
},
],
},
}
}

Expand Down

0 comments on commit 7cc023b

Please sign in to comment.