STOmics / Stereopy

A toolkit of spatial transcriptomic analysis.
MIT License
180 stars 59 forks source link

Segmentation fault(core dumped) on tissue_extraction_to_bgef #224

Open OswaldZhang opened 7 months ago

OswaldZhang commented 7 months ago

Hi, this is a transfer issue from SAW to Stereopy. https://github.com/STOmics/SAW/issues/81, as suggested by @Clouate https://github.com/STOmics/SAW/issues/81#issuecomment-1851869160

As you can see here, when performing segmentation on my own converted GEF file, there is a trouble for me:

https://github.com/STOmics/SAW/issues/81#issuecomment-1851424191

My question is, can I convert my combined gem file to the proper gef file as input to tissue_extraction_to_bgef? The reason behind this is we have 2 different separate stereo-seq SN.tissue.gem files measured in one tissue section (one is more dense and the other is sparse). We want to do tissue segmentation in an unbiased manner( this is to say, the transcripts located in the more dense one may not contain the transcripts located in the sparse one).

tanliwei-coder commented 7 months ago

Sorry for replying so late, could you tell me how you combined those gem files to one and converted it to a gef file? Also, It would be best to provide the gem files to me if you can so that I can try to reproduce the error to find out the reson.

OswaldZhang commented 6 months ago

Thanks for your kind reply. The combination of my gem file is done by simply adding the sparse one to the end of the dense one, and converting it to gef either by stereopy https://github.com/STOmics/SAW/issues/81#issuecomment-1851424191 or geftools https://github.com/BGIResearch/geftools/issues/1#issue-2038890682.

When running SAW tissueCut or done this by stereopy, it always returns

/usr/local/bin/tissueCut: line 1: 139646 Segmentation fault (core dumped) python3 /opt/saw_v6.0.0_software/pipeline/tissueCut/Tissuecut.pyc $*

As suggested by @Clouat, it seems there is sth wrong with the conversion from GEM to GEF as input for tissue cut:

https://github.com/STOmics/SAW/issues/81#issuecomment-1851777748

However, I do find there exists a mask.tif file on the dest. dir, so currently I use this file to manually filter my combined raw gem file.

Here is a file I think is minimally required to reproduce the bug

geneID  x   y   MIDCount    ExonCount

0 Gm1992 15244 8385 1 0 1 Gm1992 13665 24443 1 0 2 Gm1992 20889 18202 1 0 3 Gm37381 18336 12669 1 0 4 Gm37381 21477 16541 1 0 5 Rp1 21177 13510 2 0 6 Rp1 17217 14497 1 0 7 Rp1 10429 16570 1 0 8 Rp1 21462 16391 1 0 9 csRNA 22192 12321 1 1 10 cdRNA 22213 12133 1 1

image

Is it because of the index?