Skip to content

Commit

Permalink
Remove duplicate extension_categories config
Browse files Browse the repository at this point in the history
Refs #1300
  • Loading branch information
kimrutherford committed Nov 27, 2023
1 parent c19fdeb commit 2456e7b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ export interface AppConfig {
slims: { [slimName: string]: SlimConfig };
chromosomes: Array<ChromosomeConfig>;

extensionCategories?: { [filterSubType: string]: Array<ExtensionFilterCategory> };

geneExpression: GeneExpressionConfig;

documentation: DocumentationConfig;
Expand Down Expand Up @@ -419,6 +421,7 @@ export interface ThroughputFilterCategory {

export interface FilterConfig {
filter_type: string;
filter_subtype?: string;
display_name: string;
detailed_view_only: boolean;
scope: Array<string>;
Expand Down Expand Up @@ -632,6 +635,15 @@ for (let configName of Object.keys(_config.annotationTypes)) {
Object.assign(newConfig, parentConfig, thisConfig);
Object.assign(thisConfig, newConfig);
}

if (thisConfig.filters) {
for (const filterConfig of thisConfig.filters) {
if (filterConfig.filter_subtype) {
filterConfig.extension_categories =
pombaseConfig.extension_categories[filterConfig.filter_subtype];
}
}
}
}

if (pombaseConfig.term_page_extensions_cv_names &&
Expand Down Expand Up @@ -805,6 +817,7 @@ let _appConfig: AppConfig = {
'SO-protein': 'sequence',
},
slims: pombaseConfig.slims,
extensionCategories: pombaseConfig.extension_categories,

linkoutConfig: {
pro: 'http://www.proconsortium.org/cgi-bin/pro/entry_pro?id=',
Expand Down

0 comments on commit 2456e7b

Please sign in to comment.