DongqingSun96 / STRIDE

STRIDE (Spatial TRanscRIptomics DEconvolution by topic modelling) is a cell-type deconvolution tool for spatial transcriptomics by using single-cell transcriptomics data.
GNU General Public License v3.0
17 stars 10 forks source link

Deconvolution sometimes return empty proportions #6

Open csangara opened 2 years ago

csangara commented 2 years ago

Hello,

I'm having an issue that is quite difficult to reproduce. Sometimes when I run the deconvolution, I just get an empty file, as follows:

image

The code I used was simply

STRIDE deconvolve --sc-count $sc_input  --st-count $st_input --sc-celltype $annotation_file

This can happen both with and without --normalize. And often it happened that the deconvolution works once I reran the code.

In this above case, the model chosen was BayesNorm with 22 topics (judging by the fact that Prediction_truth_heatmap_BayesNorm_22.pdf was saved in the directory). When I looked at the file celltype_topic_mat_bayes_22.txt, I found that there was a column of NAs.

image

However, there were also times when the topic x celltype matrix did not have any NAs, but the resulting proportions were empty anyway. So far, I only noticed the issue happening when the BayesNorm or Norm models were selected, but I could be wrong about that.

Do you have any ideas on what could be going on here? Thanks in advance!

DongqingSun96 commented 2 years ago

Hi, could you please provide the input files for debugging? Thanks!

csangara commented 2 years ago

Hello, so sorry for the late reply!

Please find the files here. I ran the command

STRIDE deconvolve --sc-count single_cell_brain.h5 --sc-celltype annot.txt \
--st-count spatial_data.h5 --normalize

and got the results in the results/ folder. The proportions I got were empty (proportions.txt).

Actually, I modified your code slightly so it runs on Anndata (.h5ad) files too (implemented in this Docker container), so that is what I have been using. I haven't tested them on these .h5 files but the result should be the same I think.

DongqingSun96 commented 2 years ago

Hi, thank you so much for providing the input and output files! We fixed the bug and have released a new version 0.0.2b. Please update STRIDE by pip install --upgrade stridespatial and have a try. If there's any other problem, please feel free to let us know.