YangLabHKUST / STitch3D

Construction of a 3D whole organism spatial atlas by joint modeling of multiple slices
https://stitch3d-tutorial.readthedocs.io/en/latest/index.html#
MIT License
52 stars 2 forks source link

Cannot find "clustering_result.csv" in the Example 1 mouse brain dataset #10

Closed cristalliao closed 1 year ago

cristalliao commented 1 year ago

Dear Professor, I want to know where I can find this file "clustering_result.csv" in the mouse brain dataset when I try this great STitch3D in Example 1. plot3D_clusters(directory = "./results_6PCW", clusters = clusters, cluster_colors = cluster_colors, um = um, spot_radius = spot_radius, axis_rescale = axis_rescale ) in this part "Run STitch3D on the mouse heart dataset". The error said that

Warning: cannot open file '/albona/nobackup2/xiaoyinl/STitch3D_analysis_and_dataset/results_mouse_brain/clustering_result.csv': No such file or directoryError in file(file, "rt") : cannot open the connection

Screen Shot 2023-05-02 at 10 53 31 am

Because in the Example1 Tutorial, I cannot find the code to generate this "clustering_result.csv", is the same procedure like Example2? Could you provide more details about it?

Thanks in advance!

gefeiwang commented 1 year ago

Hi Cristal,

After running STitch3D, a clustering step is required to get domain labels from representation vectors. You can follow this tutorial for this and save the results by adata_all.obs["louvain"].to_csv(os.path.join(res_path, "clustering_result.csv")).

cristalliao commented 1 year ago

Dear Gefei, Got it! Thanks a lot! Very appreciated! Best regards, Cristal