Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove missing geo_resolutions warning #1791

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

* remove missing warning then dataset JSON has no `.meta.geo_resolutions` field ([#1791](https://github.com/nextstrain/auspice/pull/1791))


## version 2.54.3 - 2024/06/12


Expand Down
8 changes: 3 additions & 5 deletions src/actions/recomputeReduxState.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ const modifyStateViaMetadata = (state, metadata, genomeMap) => {
state.panelsAvailable = state.panelsAvailable.filter((item) => item !== "entropy");
state.panelsToDisplay = state.panelsToDisplay.filter((item) => item !== "entropy");
if (Object.keys(metadata.colorings).includes('gt')) {
console.error("Genotype coloring ('gt') was specified as an option in the JSON, however the data does not support this: " +
console.error("Genotype coloring ('gt') was specified as an option in the JSON, however the data does not support this: " +
"check that 'metadata.genome_annotations' is correct and that mutations have been assigned to 'branch_attrs' on the tree.")
delete metadata.colorings.gt;
}
Expand Down Expand Up @@ -544,8 +544,6 @@ const checkAndCorrectErrorsInState = (state, metadata, genomeMap, query, tree, v
console.error("Error detected. Setting geoResolution to ", state.geoResolution);
delete query.r; // no-op if query.r doesn't exist
}
} else {
console.warn("JSONs did not include `geoResolutions`");
}

/* show label */
Expand Down Expand Up @@ -588,7 +586,7 @@ const checkAndCorrectErrorsInState = (state, metadata, genomeMap, query, tree, v
const _queryKey = (traitName) => (traitName === strainSymbol) ? 's' :
(traitName === genotypeSymbol) ? 'gt' :
`f_${traitName}`;

for (const traitName of Reflect.ownKeys(state.filters)) {
/* delete empty filters, e.g. "?f_country" or "?f_country=" */
if (!state.filters[traitName].length) {
Expand Down Expand Up @@ -812,7 +810,7 @@ function updateMetadataStateViaSecondTree(metadata, json, genomeMap) {
// ¹ This could be relaxed in the future - currently we enforce that the order
// of genes matches. We could also make this more fine grained and allow the
// 2nd tree to have a subset of CDSs (wrt the main tree), with genotypes
// only working for the shared CDSs.
// only working for the shared CDSs.
if (genomeMap && json.meta.genome_annotations) {
try {
metadata.identicalGenomeMapAcrossBothTrees = isEqualWith(
Expand Down