scverse/anndataR

Write HDF5 categoricals correctly using attributes

Closed this issue · 0 comments

Currently, the information about whether a categorical is ordered is written as a dataset but it should be an attribute.

Should be a relatively easy fix but is complicated by writing of logical attributes not working in {rhdf5} (see grimbough/rhdf5#136).

Other things to check:

  • categories are written correctly as strings
  • codes are written correctly
    • 0-indexed
    • NAs are converted to -1