Skip to content

Commit 62ba68b

Browse files
authored
feat: optionally hide 'coming soon' for empty workflow categories (#442) (#449)
* feat: add show_coming_soon to linkml schema for workflow categories * feat: filter empty workflow categories by new show_coming_soon field
1 parent b421c04 commit 62ba68b

File tree

9 files changed

+37
-2
lines changed

9 files changed

+37
-2
lines changed

app/apis/catalog/brc-analytics-catalog/common/entities.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export interface WorkflowCategory {
7979
category: string;
8080
description: string;
8181
name: string;
82+
showComingSoon: boolean;
8283
workflows: Workflow[];
8384
}
8485

app/components/Entity/components/AnalysisMethodsCatalog/analysisMethodsCatalog.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,19 @@ export const AnalysisMethodsCatalog = ({ assembly }: Props): JSX.Element => {
1111
const {
1212
query: { entityId },
1313
} = useRouter();
14+
1415
return (
1516
<Fragment>
1617
{workflows.map((workflowCategory) => {
1718
const compatibleWorkflows = workflowCategory.workflows.filter(
1819
(workflow) => workflowIsCompatibleWithAssembly(workflow, assembly)
1920
);
21+
if (
22+
compatibleWorkflows.length === 0 &&
23+
!workflowCategory.showComingSoon
24+
) {
25+
return null;
26+
}
2027
return (
2128
<AnalysisMethod
2229
entityId={entityId as string}

catalog/build/py/generated_schema/schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ class WorkflowCategory(ConfiguredBaseModel):
176176
category: WorkflowCategoryId = Field(default=..., description="""The ID of the workflow category.""", json_schema_extra = { "linkml_meta": {'alias': 'category', 'domain_of': ['WorkflowCategory']} })
177177
name: str = Field(default=..., description="""The display name of the workflow category.""", json_schema_extra = { "linkml_meta": {'alias': 'name', 'domain_of': ['WorkflowCategory']} })
178178
description: str = Field(default=..., description="""The description of the workflow category.""", json_schema_extra = { "linkml_meta": {'alias': 'description', 'domain_of': ['WorkflowCategory']} })
179+
show_coming_soon: bool = Field(default=..., description="""Whether to show 'Coming Soon' for the workflow category when it is not available.""", json_schema_extra = { "linkml_meta": {'alias': 'show_coming_soon', 'domain_of': ['WorkflowCategory']} })
179180

180181

181182
class Workflows(ConfiguredBaseModel):

catalog/build/ts/build-catalog.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,11 @@ async function buildWorkflows(): Promise<WorkflowCategory[]> {
168168

169169
const workflowCategories: WorkflowCategory[] =
170170
sourceWorkflowCategories.workflow_categories.map(
171-
({ category, description, name }) => ({
171+
({ category, description, name, show_coming_soon }) => ({
172172
category,
173173
description,
174174
name,
175+
showComingSoon: show_coming_soon,
175176
workflows: [],
176177
})
177178
);

catalog/output/workflows.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"category": "VARIANT_CALLING",
44
"description": "Identify nucleotide polymorphisms and short indels from Illumina and Element data.",
55
"name": "Variant calling",
6+
"showComingSoon": true,
67
"workflows": [
78
{
89
"parameters": [
@@ -82,6 +83,7 @@
8283
"category": "TRANSCRIPTOMICS",
8384
"description": "Analyze bulk or single-cell RNA seq data using a variety of approaches.",
8485
"name": "Transcriptomics",
86+
"showComingSoon": true,
8587
"workflows": [
8688
{
8789
"parameters": [
@@ -157,6 +159,7 @@
157159
"category": "REGULATION",
158160
"description": "Workflows for the analysis of ChIP-seq, ATAC-Seq, and beyond.",
159161
"name": "Regulation",
162+
"showComingSoon": true,
160163
"workflows": [
161164
{
162165
"parameters": [
@@ -224,6 +227,7 @@
224227
"category": "CONSENSUS_SEQUENCES",
225228
"description": "Build consensus sequences for related isolates.",
226229
"name": "Consensus sequences",
230+
"showComingSoon": false,
227231
"workflows": [
228232
{
229233
"parameters": [
@@ -244,18 +248,21 @@
244248
"category": "ASSEMBLY",
245249
"description": "Assemble prokaryotic and eukaryotic genomes sequenced with a variety of technologies.",
246250
"name": "Assembly",
251+
"showComingSoon": false,
247252
"workflows": []
248253
},
249254
{
250255
"category": "GENOME_COMPARISONS",
251256
"description": "Workflows for creation of pairwise and multiple genome alignments.",
252257
"name": "Genome comparisons",
258+
"showComingSoon": true,
253259
"workflows": []
254260
},
255261
{
256262
"category": "PROTEIN_FOLDING",
257263
"description": "Analysis of protein folding using the ColabFold framework.",
258264
"name": "Protein folding",
265+
"showComingSoon": true,
259266
"workflows": []
260267
}
261268
]

catalog/schema/generated/schema.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ export interface WorkflowCategory {
9999
name: string,
100100
/** The description of the workflow category. */
101101
description: string,
102+
/** Whether to show 'Coming Soon' for the workflow category when it is not available. */
103+
show_coming_soon: boolean,
102104
}
103105

104106

catalog/schema/generated/workflow_categories.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,17 @@
3333
"name": {
3434
"description": "The display name of the workflow category.",
3535
"type": "string"
36+
},
37+
"show_coming_soon": {
38+
"description": "Whether to show 'Coming Soon' for the workflow category when it is not available.",
39+
"type": "boolean"
3640
}
3741
},
3842
"required": [
3943
"category",
4044
"name",
41-
"description"
45+
"description",
46+
"show_coming_soon"
4247
],
4348
"title": "WorkflowCategory",
4449
"type": "object"

catalog/schema/workflow_categories.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ classes:
3535
description: The description of the workflow category.
3636
required: true
3737
range: string
38+
show_coming_soon:
39+
description: Whether to show 'Coming Soon' for the workflow category when it is not available.
40+
required: true
41+
range: boolean

catalog/source/workflow_categories.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,34 @@ workflow_categories:
22
- category: "VARIANT_CALLING"
33
name: "Variant calling"
44
description: "Identify nucleotide polymorphisms and short indels from Illumina and Element data."
5+
show_coming_soon: true
56

67
- category: "TRANSCRIPTOMICS"
78
name: "Transcriptomics"
89
description: "Analyze bulk or single-cell RNA seq data using a variety of approaches."
10+
show_coming_soon: true
911

1012
- category: "REGULATION"
1113
name: "Regulation"
1214
description: "Workflows for the analysis of ChIP-seq, ATAC-Seq, and beyond."
15+
show_coming_soon: true
1316

1417
- category: "CONSENSUS_SEQUENCES"
1518
name: "Consensus sequences"
1619
description: "Build consensus sequences for related isolates."
20+
show_coming_soon: false
1721

1822
- category: "ASSEMBLY"
1923
name: "Assembly"
2024
description: "Assemble prokaryotic and eukaryotic genomes sequenced with a variety of technologies."
25+
show_coming_soon: false
2126

2227
- category: "GENOME_COMPARISONS"
2328
name: "Genome comparisons"
2429
description: "Workflows for creation of pairwise and multiple genome alignments."
30+
show_coming_soon: true
2531

2632
- category: "PROTEIN_FOLDING"
2733
name: "Protein folding"
2834
description: "Analysis of protein folding using the ColabFold framework."
35+
show_coming_soon: true

0 commit comments

Comments
 (0)