Closed pinin4fjords closed 2 years ago
Out of a first look, this doesn't seem to be covered by any tests. Can we add one please? Thanks.
Out of a first look, this doesn't seem to be covered by any tests. Can we add one please? Thanks.
Okay, tests added! I know we need to get proper pytest going on this package at some point, but for now this is just via the bats.
Thanks @pcm32 !
The current export code is incorrect for .X, assuming as it does that adata.raw is a complete annData object. It's not, and in fact only stores separate versions of .X and .var. So adata.raw.obs does not work, for example, leading to errors like:
... when we try to export .raw.X.
This PR changes things to reference .raw.X and .raw.var only.
I've also fixed use of the layers slot (we've clearly only been using this to export .X!)