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

v2: encoding for / in group and array names #128

Open
joshmoore opened this issue Feb 8, 2022 · 1 comment
Open

v2: encoding for / in group and array names #128

joshmoore opened this issue Feb 8, 2022 · 1 comment
Labels

Comments

@joshmoore
Copy link
Member

In AnnData, / is frequently used in key names. This leads to subdirectories in Zarr. In HDF5 it appears to be disallowed:

A path name is a string of components separated by '/'. Each component is the name of a (hard or soft) link, or the special characters "." (meaning current group). Link names (components) can be any string of ASCII characters not containing '/' (except the string ".", which is reserved). However, users are advised to avoid the use of punctuation and non-printing characters, because they may create problems for other software. Figure 39 gives a BNF grammar for HDF5 path names.

(via stackoveflow)

  • Should text be added to the spec to be clearer about this issue?
  • Should a preferred encoding of / be added?

cc: @ivirshup

@ivirshup
Copy link

ivirshup commented Feb 8, 2022

The case where it comes up most commonly is in user provided column names in dataframes, e.g. "CD4+/CD8-". Our dataframe spec/ implementation conveniently (?) works around this by storing the names of columns as an attribute, so things end up working as expected in many cases. E.g. df_group["CD4+/CD8-"] returns the right data. Would definitely prefer if this didn't just work by implementation detail.

Some more discussion on the anndata repo (mostly discussing hdf5): scverse/anndata#321 (comment)

@jstriebel jstriebel added the v2 label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants