BiomedicalMachineLearning / stLearn

A novel machine learning pipeline to analyse spatial transcriptomics data
Other
176 stars 23 forks source link

st.ReadXenium issue #267

Closed yandouwahhh closed 3 months ago

yandouwahhh commented 7 months ago

Thanks for the wonderful tool! When I run st.ReadXenium to read Xenium data, I get an error: ‘ValueError: 'CS1384_post-CS0_H&E_S1A_RGB-shlee-crop.png' does not end on a valid extension.’

My code : adata = st.ReadXenium(feature_cell_matrix_file="C:\Users\lfr\Desktop\Spatial_study\stlearn_Xenium\outs\Xenium_FFPE_Human_Breast_Cancer_Rep1_cell_feature_matrix.h5", cell_summary_file="C:\Users\lfr\Desktop\Spatial_study\stlearn_Xenium\outs\Xenium_FFPE_Human_Breast_Cancer_Rep1_cells.csv.gz", library_id="Xenium_FFPE_Human_Breast_Cancer_Rep1", image_path="CS1384_post-CS0_H&E_S1A_RGB-shlee-crop.png", scale=1, spot_diameter_fullres=15 # Recommend ) error message:Traceback (most recent call last):

File "C:\Users\lfr\AppData\Local\Temp\ipykernel_27788\3713781270.py", line 1, in adata = st.ReadXenium(feature_cell_matrix_file="C:\Users\lfr\Desktop\Spatial_study\stlearn_Xenium\outs\Xenium_FFPE_Human_Breast_Cancer_Rep1_cell_feature_matrix.h5",

File "E:\Anaconda\envs\stlearnPy38\lib\site-packages\stlearn\wrapper\read.py", line 560, in ReadXenium stlearn.add.image(

File "E:\Anaconda\envs\stlearnPy38\lib\site-packages\stlearn\adds\add_image.py", line 80, in image raise ValueError(

ValueError: 'CS1384_post-CS0_H&E_S1A_RGB-shlee-crop.png' does not end on a valid extension.

duypham2108 commented 7 months ago

Can you try this to see if there is any issue? https://github.com/BiomedicalMachineLearning/stLearn/issues/258#issuecomment-1787261983

I will refactor this function for better bug identification

yandouwahhh commented 7 months ago

Thank you for your reply. I will check whether this is the case