STOmics / Stereopy

A toolkit of spatial transcriptomic analysis.
MIT License
184 stars 64 forks source link

GEM to GEF file #165

Closed predictowner closed 11 months ago

predictowner commented 12 months ago

I just got a GEM file after sequencing, and I want to transform this into a GEF file (bin1) for subsequent analysis. But when I'm trying to do that on Jupyter, I met an memoryErroR which suggest that a few TiB memory is needed for this, is there any other possible way for doing this?

tanliwei-coder commented 11 months ago

What method do you use for converting gem to gef?

predictowner commented 11 months ago

I first use io.read_gem(file_path[, sep, bin_type, ...]) to open the data, then try to save the data in GEF file with io.write_mid_gef(data, output).

tanliwei-coder commented 11 months ago

I think your data is very big, it is diffcult to reduce the consumption of memory because the method write_mid_gef will change the expression matirx from sparse matrix to numpy.ndarray.

you can try to use gefpy to do this and you can get example from this url in which the first part is about the converting gem to squarebin.gef