Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to convert SingleCellExperiment (trajectory analysis object) to h5ad #83

Open
Yanst86 opened this issue Dec 27, 2023 · 0 comments

Comments

@Yanst86
Copy link

Yanst86 commented Dec 27, 2023

Hello,

I have a SingleCellExperiment, in which I computed Trajectory of Single-Cell RNA-seq data using Slingshot, which I want to convert to h5ad/Anndata.

I used this code:

library(reticulate)
use_condaenv('r-sctools')
sceasy::convertFormat(Traj_RNA, from="sce", to="anndata", outFile='D:/Python_coding/Trajectory_Analysis/Slingshot_Trajectory.h5ad')

And got this error:

Loading required package: TrajectoryUtils
Error in as.vector(x) : no method for coercing this S4 class to a vector

Here is the structure of my object:

Traj_RNA
class: SingleCellExperiment
dim: 36601 39215
metadata(0):
assays(2): counts logcounts
rownames(36601): MIR1302-2HG FAM138A ... AC007325.4 AC007325.2
rowData names(0):
colnames(39215): C01_AAACCCAAGCAATTCC-1 C01_AAACCCACACGTTGGC-1 ... R264_TTTGTTGCAGCGTACC-1
R264_TTTGTTGGTCCACACG-1
colData names(15): orig.ident nCount_RNA ... slingPseudotime_3 slingPseudotime_4
reducedDimNames(2): PCA UMAP
mainExpName: RNA
altExpNames(0):

Is the conversion of this type of object supported? If so, what is the fix to my problem?

Thanks in advance,
Yan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant