Skip to content

Commit feb7001

Browse files
authored
When reading zarr connectome files, read mapping name from correct json key (#8927)
There was a mismatch between what voxelytics writes and what webknossos expects for zarr3 connectome files. Adapting wk to vx here. ### Steps to test: - Open voxelytics-generated zarr3 connectome file ### Issues: - fixes https://discuss.webknossos.org/t/connectome-file-not-visible-in-connectome-tab/1143/4 ------ - [x] Added changelog entry (create a `$PR_NUMBER.md` file in `unreleased_changes` or use `./tools/create-changelog-entry.py`) - [x] Removed dev-only changes like prints and application.conf edits - [x] Considered [common edge cases](../blob/master/.github/common_edge_cases.md) - [x] Needs datastore update after deployment
1 parent d907f38 commit feb7001

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

unreleased_changes/8927.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Fixed
2+
- Fixed a bug in reading zarr3-format connectome files caused by a wrong metadata key

webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/connectome/ConnectomeFileUtils.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ trait ConnectomeFileUtils {
1414
protected val keySynapseToSrcAgglomerate = "synapse_to_src_agglomerate"
1515
protected val keySynapseToDstAgglomerate = "synapse_to_dst_agglomerate"
1616

17-
protected val attrKeyMetadataMappingName = "metadata/mapping_name"
17+
protected val attrKeyMetadataMappingName = "metadata/mapping_name" // Used for legacy (hdf5) only
18+
protected val attrKeyMappingName = "mapping_name"
1819
protected val attrKeySynapseTypeNames = "synapse_type_names"
1920

2021
protected def synapticPartnerKey(direction: SynapticPartnerDirection): String =

webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/connectome/ZarrConnectomeFileService.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ object ConnectomeFileAttributes extends VoxelyticsZarrArtifactUtils with Connect
2929
val connectomeFileAttrs = lookUpArtifactAttributes(json)
3030
for {
3131
formatVersion <- readArtifactSchemaVersion(json)
32-
mappingName <- (connectomeFileAttrs \ attrKeyMetadataMappingName).validate[String]
32+
mappingName <- (connectomeFileAttrs \ attrKeyMappingName).validate[String]
3333
synapseTypeNames <- (connectomeFileAttrs \ attrKeySynapseTypeNames).validate[Seq[String]]
3434
} yield
3535
ConnectomeFileAttributes(

0 commit comments

Comments
 (0)