-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add lineage definition file to SILO import config (#3434)
* Add TODOs * Add dummy lineage definitions bits * WIP * Add env var * Remove outdated docs * . * . * progress * write config file (only with the setting we need, I hope that's enough) * move file defintions up in the script * Add a bit of docs * fix log msg * Add dummy lineage defintion file * fix lineage and add correct link * remove myLineage but * fix config writing * fix deleting * fix lineage definition file path * fix lineage definition file path now? * copy for no lineage defs * Add docs * fix typo * generate lineage indexes for lineage system fields in silo * fix * test fix? * print * fix * update lineage def * Update lineage in test query to fix the test * Add comment; remove print * Update docs/src/content/docs/reference/helm-chart-config.mdx Co-authored-by: Theo Sanderson <[email protected]> * fix the quoted keys --------- Co-authored-by: Theo Sanderson <[email protected]>
- Loading branch information
1 parent
701a19b
commit 0d9d597
Showing
10 changed files
with
148 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
kubernetes/loculus/templates/_lineage-system-for-organism.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- define "loculus.lineageSystemForOrganism" -}} | ||
{{- $organism := . -}} | ||
{{- $schema := $organism.schema | include "loculus.patchMetadataSchema" | fromYaml }} | ||
{{- $lineageSystems := list }} | ||
{{- range $entry := $schema.metadata }} | ||
{{- if hasKey $entry "lineageSystem" }} | ||
{{- $lineageSystems = append $lineageSystems $entry.lineageSystem }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- $uniqueLineageSystems := $lineageSystems | uniq }} | ||
{{- if gt (len $uniqueLineageSystems) 1 }} | ||
{{- fail (printf "Multiple lineage systems found: %v" $uniqueLineageSystems) }} | ||
{{- else if eq (len $uniqueLineageSystems) 0 }} | ||
{{- /*no op*/ -}} | ||
{{- else }} | ||
{{- index $uniqueLineageSystems 0 -}} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
A.1: | ||
aliases: [] | ||
parents: [] | ||
A.1.1: | ||
aliases: [] | ||
parents: | ||
- A.1 | ||
A.2: | ||
aliases: [] | ||
parents: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters