This document lists known issues with the package and suggests possible solutions.
HDF5AnnData
uns
, uns_nested
empty
, none
Error: names(adata_r$uns) (`actual`) not equal to reticulate::py_to_r(adata_py$uns) (`expected`).
`actual` is NULL
`expected` is a list
Debug and fix
HDF5AnnData
uns
, uns_nested
categorical
,
categorical_missing_values
,
categorical_ordered
,
categorical_ordered_missing_values
<python.builtin.AttributeError/python.builtin.Exception/python.builtin.BaseException/python.builtin.object/error/condition>
Error in `py_get_attr(x, name)`: AttributeError: 'Categorical' object has no attribute 'get_values'. Did you mean: 'sort_values'?
Run `reticulate::py_last_error()` for details.
Backtrace:
▆
1. ├─testthat::expect_equal(adata_r$uns[[name]], reticulate::py_to_r(adata_py$uns[[name]])) at test-roundtrip-uns.R:80:5
2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─reticulate::py_to_r(adata_py$uns[[name]])
5. └─reticulate:::py_to_r.pandas.core.arrays.categorical.Categorical(adata_py$uns[[name]])
6. ├─reticulate::py_to_r(x$get_values())
7. │ ├─reticulate::is_py_object(x <- py_to_r_cpp(x))
8. │ └─reticulate:::py_to_r_cpp(x)
9. ├─x$get_values
10. └─reticulate:::`$.python.builtin.object`(x, "get_values")
11. └─reticulate:::py_get_attr_or_item(x, name, TRUE)
12. └─reticulate::py_get_attr(x, name)
Debug and fix
HDF5AnnData
uns
, uns_nested
nullable_boolean_array
,
nullable_integer_array
adata_r$uns[[name]] (`actual`) not equal to reticulate::py_to_r(adata_py$uns[[name]]) (`expected`).
`actual` is a logical vector (NA, FALSE, TRUE, FALSE, TRUE, ...)
`expected` is an S3 object of class <pandas.core.arrays.boolean.BooleanArray/pandas.core.arrays.masked.BaseMaskedArray/pandas.core.arraylike.OpsMixin/pandas.core.arrays.base.ExtensionArray/python.builtin.object>, an environment
Debug and fix
HDF5AnnData
uns
, uns_nested
boolean
, char
,
float
, integer
, nan
,
string
bi$type(a) (`actual`) not equal to bi$type(b) (`expected`).
`attr(actual, 'py_object')$pyobj` is <pointer: 0x7f4af9694d00>
`attr(expected, 'py_object')$pyobj` is <pointer: 0x7f4af9f5eca0>
Backtrace:
▆
1. └─anndataR:::expect_equal_py(...) at test-roundtrip-uns.R:109:5
2. └─testthat::expect_equal(bi$type(a), bi$type(b)) at tests/testthat/helper-expect_equal_py.R:7:3
Debug and fix
HDF5AnnData
X
float_csparse
,
float_csparse_nas
Warning: different storage datatype
<shape> has file datatype H5T_STD_I64LE
<shape> has file datatype H5T_STD_I32LE
attribute: <shape of </X>> and <shape of </X>>
We should investigate if we can specify the type with which an attribute should be written.
HDF5AnnData
X
, obsm
,
varm
, obsp
, varp
float_csparse
,
float_csparse_nas
, float_rsparse
,
float_rsparse_nas
dataset: </X/data> and </X/data>
Not comparable: </X/data> has rank 1, dimensions [200], max dimensions [18446744073709551615]
and </X/data> has rank 1, dimensions [108], max dimensions [108]
0 differences found
dataset: </X/indices> and </X/indices>
Not comparable: </X/indices> has rank 1, dimensions [200], max dimensions [18446744073709551615]
and </X/indices> has rank 1, dimensions [108], max dimensions [108]
0 differences found
dataset: </X/indptr> and </X/indptr>
Warning: different maximum dimensions
</X/indptr> has max dimensions [18446744073709551615]
</X/indptr> has max dimensions [21]
We should investigate if something goes wrong with h5py, but I think hdf5 provides the expected behaviour.
HDF5AnnData
obs
, var
integer_with_nas
dataset: </var/nullable_integer_array/mask> and </var/integer_with_nas/mask>
Warning: different storage datatype
Not comparable: </var/nullable_integer_array/mask> has sign H5T_SGN_2 and </var/integer_with_nas/mask> has sign H5T_SGN_NONE
0 differences found
We should investigate if we can specify the type with which an attribute should be written.
HDF5AnnData
obs
, var
nullable_integer_array
dataset: </var/nullable_integer_array/values> and </var/integer_with_nas/values>
Warning: different storage datatype
</var/nullable_integer_array/values> has file datatype H5T_STD_I64LE
</var/integer_with_nas/values> has file datatype H5T_STD_I32LE
size: [20] [20]
position values values difference
------------------------------------------------------------
[ 0 ] 0 1 1
1 differences found
We should investigate if we can specify the type with which an attribute should be written.
HDF5AnnData
obs
, var
nullable_integer_array
dataset: </var/nullable_integer_array/values> and </var/integer_with_nas/values>
Warning: different storage datatype
</var/nullable_integer_array/values> has file datatype H5T_STD_I64LE
</var/integer_with_nas/values> has file datatype H5T_STD_I32LE
size: [20] [20]
position values values difference
------------------------------------------------------------
[ 0 ] 0 1 1
1 differences found
We should investigate why this difference happens.
to_SCE
obsp
, varp
numeric_csparse_with_nas
,
numeric_rsparse_with_nas
,
integer_csparse_with_nas
,
integer_rsparse_with_nas
`sce_matrix` (`actual`) not equal to `ad_matrix` (`expected`).
actual vs expected
[, 1] [, 2] [, 3] [, 4] [, 5] [, 6] [, 7] [, 8] [, 9] [,10]
actual[1, ] NA NA NA NA NA NA NA NA NA NA
- actual[2, ] NA NA NA NA 1.2 NA NA NA NA NA
+ expected[2, ] 0.00 0 0 0 1.2 0 0.00 0 0 0
actual[3, ] NA NA NA NA NA NA NA NA NA NA
- actual[4, ] 0.48 NA NA NA NA NA 0.66 NA NA NA
+ expected[4, ] 0.48 0 0 0 0.0 0 0.66 0 0 0
Upstream the issue, is this intentional?
to_SCE
obsp
, varp
numeric_dense_with_nas
,
numeric_matrix_with_nas
,
integer_dense_with_nas
,
integer_matrix_with_nas
`sce_matrix` (`actual`) not equal to `ad_matrix` (`expected`).
actual vs expected
[, 1] [, 2] [, 3] [, 4] [, 5] [, 6] [, 7] [, 8] [, 9] [,10]
- actual[1, ] 0.00000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.00000000 0.0000000 0.0000000 0.0000000
+ expected[1, ] NA NA NA NA NA NA NA NA NA NA
actual[2, ] 0.30879331 0.3489866 0.9774142 0.5004646 0.5611313 0.8525832 0.06551198 0.1663290 0.1574261 0.4143122
- actual[3, ] 0.00000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.00000000 0.0000000 0.0000000 0.0000000
+ expected[3, ] NA NA NA NA NA NA NA NA NA NA
Upstream the issue, is this intentional?
to_SCE
obsm
, varm
pca
sampleFactors(reducedDims(sce)$pca) (`actual`) not equal to ad$obsm[["X_pca"]] (`expected`).
`dimnames(actual)` is a list `dimnames(expected)` is absent
Investigate if this is a problem or not.