Open ivirshup opened 3 years ago
@rcannood which of the above points have been adressed by your PR?
To begin:
There are also some basic checks for 'Views', but not everything mentioned above has been taken care of so it's still WIP.
I've fixed up many of these cases in #677.
I think .X is None
is now in a fairly useable state, and think we're in an alright place to push the rest to the next release.
Adding a point to the checklist:
Gotta figure out what the shape of the object is when X is None. Currently we figure out the shape of an AnnData by checking the shapes of X
, obs
, and var
and asserting everything else fits that. What we should probably start doing is resolving the shape from all elements, so an AnnData with just obsm
/ varm
can be created.
An interesting question is what happens if you only provide elements aligned to one axis. E.g. just obsm
or obs
. Is n_vars
unknown or zero?
Is this allowed?
adata = AnnData(obs=obs)
Then what is n_vars
. Would this be allowed after?
adata.varm["x"] = np.ones((20, 10))
We think this is probably closable but we need to verify
Tracking issue for allowing
X
to beNone
.When parts get ticked off they should be marked with the PR that fixed them.
TODO:
All of these need tests, some of them may already work.
.X = None
doesn't change other view behavior,a[idx].X
doesn't do anything weird, and copying views still works)_subset_inplace
(https://github.com/theislab/anndata/pull/677/commits/25bbf8a08498c79959e3419b8033e4d72e1f62b5)X
is NoneX
, e.g.obs_vector
,to_df
. (#677)zarr
,hdf5
) #677to_csvs
There is a bit of ordering to do here.