-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make
clade_membership
node attribute optional
Not all trees have `clade_membership` attribute on the nodes. Here I made this attribute optional in Nextclade. If `clade_membership` is not present: - output JSON/NDJSON result entries will not contain `clade` field - `clade` column in output CSV/TSV will be empty - `clade` column in Nextclade Web will be empty it does not affect any other parts of the application. Notably clade-like attributes (from `.meta.extensions.nextclade.clade_node_attrs` are still assigned and being written to the output). Tested on `sars-cov-2` dataset and `clade_membership` node attribute removed using `jq`: ```bash jq 'walk(if (type == "object" and .clade_membership) then del(.clade_membership) else . end )' tree.original.json > tree.json ``` (in real trees you might also need to change metadata, such as colorings) ### Further work: - We might remove empty `clade` column from CSV/TSV and from Web. Thought it might be a bit involved - the results are streamed one at a time and we don't know whether there will be any clades or not until very end. But at that point it is too late - everything has been already written.
- Loading branch information
1 parent
3475c1b
commit bb039ed
Showing
7 changed files
with
19 additions
and
11 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
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
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