cellgeni / sceasy

A package to help convert different single-cell data formats to each other
GNU General Public License v3.0
363 stars 53 forks source link

AnnData to Seurat: Add functionality to store X in data and raw.X in counts #25

Closed pablo-gar closed 3 years ago

pablo-gar commented 3 years ago

sceasy::convertFormat(h5ad_path, from="anndata", to="seurat", outFile =seurat_path, main_layer = "data")

If there was a raw layer in the source AnnData, the command above would not transfer that to the output seurat object (when main_layer=data)

Now, when executing that command:

pablo-gar commented 3 years ago

@nh3 just bringing visibility to this

nh3 commented 3 years ago

Many thanks @pablo-gar for the PR!

Yes, this is useful for cases where X and raw.X have the same number of genes, but what if the two slots have different number of genes?

pablo-gar commented 3 years ago

@nh3 do you think a sensible solution would be to resize the X and raw.X matrices to have the same number of genes?