Skip to content

improve Zattrs show method #83

@HelenaLC

Description

@HelenaLC
  • .zattrs are read using jsonlite::fromJSON, and are represented as a Zattrs object for handling, validity checks etc.
  • Zattrs in turn are currently display as a nested, partially collapsed list that is pretty ugly (see example below)
  • alternatives might be to either figure out an automated, prettified list view; or defining a custom show method that is restricted to the most relevant information (in any case, asS3() would allow viewing list content as is)
> x <- file.path("extdata", "blobs.zarr")
> x <- system.file(x, package="SpatialData")
> x <- readSpatialData(x, tables=FALSE)
> meta(point(x))
An object of class "Zattrs"
[[1]]
[1] "x" "y"

[[2]]
    input.axes input.name  output.axes output.name     type
1 c("x", "....         xy c("x", "....      global identity

[[3]]
[1] "ngff:points"

[[4]]
[[4]]$feature_key
[1] "genes"

[[4]]$instance_key
[1] "instance_id"

[[4]]$version
[1] "0.1"

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions