Read/write H5AD obs/var names directly
Closed this issue · 1 comments
lazappi commented
Currently reading works by reading obs
/var
and getting the row names (and caching them). Writing tries to set the rownames and then write obs
/var
but that doesn't work because the validation function strips the rownames.
What we need to do instead is:
- Check the name of the index column
- Read names directly from
[obs/var]/[_index]
- Maybe writing should always write to
_index
and not overwrite any other column that might be an index?
Needs to be fixed for #85. Maybe should also properly consider how this works for data frames more generally.
lazappi commented
Also need to make sure that writing obs
/var
doesn't overwrite obs_names
/var_names
. This is trickier and probably requires modifying write_h5ad_data_frame
to give some way of not writing the index.