SnapATAC2 icon indicating copy to clipboard operation
SnapATAC2 copied to clipboard

Add support to convert AnnData to Seurat v5

Open beyondpie opened this issue 2 years ago • 6 comments

Hi Kai,

https://github.com/beyondpie/CEMBA_wmb_snATAC/blob/c48737ddf360519231721b63cc81a0fc75d83cca/02.integration/src/main/R/annToS5.R#L36C9-L36C9

Here is how I did the transformation for gmat.

We can also think about how to transform AnnData to Signac object, where they support cicero and other analysis, too.

Songpeng

beyondpie avatar Nov 22 '23 06:11 beyondpie

@kaizhang

I think I can add one R script for this task. Do you have any suggestions about adding a Rscript to this repo? I know rpy2 can call R from python, but this might be not that stable from my opinion.

Songpeng

beyondpie avatar Feb 07 '24 19:02 beyondpie

Hi Kai,

I now have one single-file script for this: https://github.com/beyondpie/tools/blob/main/singlecell/SnapATACAnnData2Seurat.R

I still need some time to test it. Do you think we can put it somewhere in this repo or other place for SnapATAC2 Ann to Seurat function?

Thanks! Songpeng

beyondpie avatar Mar 12 '24 05:03 beyondpie

Another potential function, should be convert SnapATAC2 AnnData to Signac object?

beyondpie avatar Mar 12 '24 05:03 beyondpie

Another potential function, should be convert SnapATAC2 AnnData to Signac object?

Hi beyondpie, it would be very useful to be able to convert to Signac object. Did you ever create a script for this please?

lf96abc avatar Jul 12 '24 15:07 lf96abc

@lf96abc No. I haven't used Signac before. And probably will give it a try later.

beyondpie avatar Jul 12 '24 18:07 beyondpie

https://smorabit.github.io/blog/2021/velocyto/ this one works well for me by manually adding assays/metadata/reductions where they need to be from R seurat obj to Python anndata, then the reverse process should be also available~

Ruismart avatar Aug 13 '24 03:08 Ruismart