Question: Convert a Seurat object to .h5ad file
0
gravatar for gaelgarcia05
11 weeks ago by
gaelgarcia05190
UK
gaelgarcia05190 wrote:

Hi,

I'm trying to build a single-cell browser using cellxgene from the Chan-Zuckerberg Intiative. However, I need to have a .h5ad file from the annpdata ackage in Python. I've done all my analysis in R, mainly using Seurat.

I was wondering if there's a way to convert a Seurat object to .h5ad within R. Seurat team seems to be working on this but as of Aug 2019 it's non-functional.

Thanks.

ADD COMMENTlink modified 11 weeks ago by shoujun.gu250 • written 11 weeks ago by gaelgarcia05190
1
gravatar for jared.andrews07
11 weeks ago by
jared.andrews073.9k
St. Louis, MO
jared.andrews073.9k wrote:

Looks like the way to do it is to write to loom format via loomR, then read that into anndata to be written as an .h5ad file.

Single cell folks need to a pick a file format/structure and stick with it.

ADD COMMENTlink written 11 weeks ago by jared.andrews073.9k

Could not have said it better. Thanks!

ADD REPLYlink written 11 weeks ago by gaelgarcia05190
1
gravatar for shoujun.gu
11 weeks ago by
shoujun.gu250
shoujun.gu250 wrote:

The best way now is to manually create your h5ad from seurat objects, such as put all normalized value as adata.X , raw counts to adata.raw, all gene annotations to adata.var and all cell annotations to adata.obs, etc

Or use scanpy from the very beginning.

ADD COMMENTlink written 11 weeks ago by shoujun.gu250
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1719 users visited in the last hour