错误:需要一个Python对象,收到一个字符

问题描述 投票:0回答:1

我正在尝试将 h5ad 文件加载到 R:

ref_anndata <- anndata::read_h5ad("/Fetal_nephron.h5ad")

对象似乎正确加载的地方:

ref_anndata

#> AnnData object with n_obs × n_vars = 10790 × 33694
#> obs: 'Barcode', 'Short_Sample', 'Experiment', 'Gender', 'Age', 'Stage', 'Selection', 'celltype', #> 'compartment'
#>   var: 'ID'
#>   obsm: 'X_umap

但是,当我尝试访问

ref_anndata$obs
时,我得到:

Error: Expected a python object, received a character

有人可以帮忙吗?谢谢你。

python r seurat
1个回答
0
投票

此问题已由 rstudio/reticulate#1591 修复,因此应该在下一个版本的 reticulate 中修复。

© www.soinside.com 2019 - 2024. All rights reserved.