Closed akhst7 closed 3 years ago
The error occurred when trying to import anndata. I guess reticulate somehow was not calling the right python installation. You could try load reticulate manually before loading sceasy and specify python version using one of the methods listed here https://rstudio.github.io/reticulate/articles/versions.html#providing-hints.
@nh3, it worked but I have an new issue.
convertFormat(pbmc10k, from = "seurat", to="anndata", outFile = "pbmc10k.h5ad")
... storing 'Phase' as categorical
... storing 'hpca.fine' as categorical
... storing 'hpca.main' as categorical
... storing 'monaco.main' as categorical
... storing 'monaco.fine' as categorical
AnnData object with n_obs × n_vars = 10194 × 36601
obs: 'nCount_RNA', 'nFeature_RNA', 'nCount_spliced', 'nFeature_spliced', 'nCount_unspliced', 'nFeature_unspliced', 'percent.mt', 'nCount_SCT', 'nFeature_SCT', 'SCT_snn_res.0.8', 'seurat_clusters', 'S.Score', 'G2M.Score', 'Phase', 'old.ident', 'hpca.fine', 'hpca.main', 'monaco.main', 'monaco.fine'
var: 'vst.mean', 'vst.variance', 'vst.variance.expected', 'vst.variance.standardized', 'vst.variable'
obsm: 'X_pca', 'X_umap'
Warning message:
In .regularise_df(obj@meta.data, drop_single_values = drop_single_values) :
Dropping single category variables:orig.ident
Hi ,did you figure out. I also met: In .regularise_df(obj@meta.data, drop_single_values = drop_single_values) : Dropping single category variables:IR_VJ_1_d_call, IR_VJ_2_d_call
It's just a warning not an error. The resulting object is still valid except for lacking those two columns in obs
.
The cause of the warning is that those two variables each contain only a single value, and are therefore dropped as some version of anndata
complains about single value categorical variables. If you want to keep them, try passing drop_single_values=FALSE
to convertFormat()
; or you could add them manually afterwards like
adata.obs["IR_VJ_1_d_call"] = <your_value>
I get an following error after firing this command,
convertFormat(pbmc10k, from = "seurat", to="anndata", outFile = "~/Desktop/pbmc.h5ad")
;and traceback is ;
I am not exactly sure what a "AttributeError: 'module' object has no attribute 'import'" means and evidently, the issue may lie in the Seurat obj in question but I am not sure how to approach it. Any help will be appreciated.