BiomedicalMachineLearning / stLearn

A novel machine learning pipeline to analyse spatial transcriptomics data
Other
190 stars 25 forks source link

Question on create_stlearn function #271

Closed cxlpanpan closed 6 months ago

cxlpanpan commented 9 months ago

Dear developer, Thanks for your woderful jobs! I am writing to seek assistance with the create_stlearn when I am currently utilizing for my data analysis.In my results, adata$obs[imagecol] = spatial[imagecol] scale scale,rather than adata$obs[imagecol] = spatial[imagecol] * scale. adata <- st$create_stlearn(count = count_matrix, spatial = spatial,library_id = "HCC", image_path = "/home/cxl/win_share/cxl_win/HCCst/rawdata_spatial/HCC_1T/spatial/tissue_hires_image.png", scale = 0.1, quality = "hires", background_color = "white")

head(spatial) imagecol imagerow array_row array_col TGCTTGAAACCATGCA-1 5758 4602 9 17 CGTGCTGGCCTAGTCG-1 5958 4602 9 19 GGGTAATGCTGTGTTT-1 6158 4602 9 21 AGAGCTACGAAAGCAT-1 5657 4776 10 16 CACATGTTTGGACATG-1 5858 4776 10 18 CCCTAGTGTCAGGTGT-1 6058 4776 10 20 head(adata$obs) imagecol imagerow 0 57.58 46.02 1 59.58 46.02 2 61.58 46.02 3 56.57 47.76 4 58.58 47.76 5 60.58 47.76

duypham2108 commented 9 months ago

That's an unexpected result but you can fix it manually by multiplying those columns by 10 (it will not break anything later). I haven't tested it in R like this

cxlpanpan commented 9 months ago

That's an unexpected result but you can fix it manually by multiplying those columns by 10 (it will not break anything later). I haven't tested it in R like this

Thanks for your reply!