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

How can I find "results_6PCW" dataset? #6

Closed cristalliao closed 1 year ago

cristalliao commented 1 year ago

Dear Professor, I want to know where I can find this file "results_6PCW" when I try this great STitch3D in Example 2. 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 human heart dataset". Thanks in advance!

gefeiwang commented 1 year ago

Hi Cristal,

You can rename the results folder created by previous steps (which might be "results_human_heart", depending on how you name it) as "results_6PCW".

Best, Gefei

cristalliao commented 1 year ago

Hi Geifei,

Thanks for your reply!! After renaming "results_human_heart", the code still does not work:

Screen Shot 2023-04-26 at 10 28 08 am

In the "results_6PCW", it has the following file:

Screen Shot 2023-04-26 at 10 29 24 am

But my R studio, cannot open this file. How to deal with this problem? Thanks in advance!

gefeiwang commented 1 year ago

Hi Cristal,

Could you try getwd() to check your current working directory? It seems that the path you provided cannot be found in R.

cristalliao commented 1 year ago

Dear Geifei, Thanks a lot! I have already found the problem: I have not stored the clustering_result.csv in the results_human_heart file so I cannot use the plot3D_clusters function. However, there is a new problem, which is: When I run the code, there is no figure generated, like below:

Screen Shot 2023-05-02 at 10 44 13 am

It is a little bit strange. Do you have any suggestions for me? Thanks a lot!

gefeiwang commented 1 year ago

Hi Cristal,

Maybe you need to check whether your R package rgl is able to create a plot normally or not on your side. Here are some suggestions from stackoverflow:

"Output may be on screen using OpenGL, or to various standard 3D file formats including WebGL, PLY, OBJ, STL" ;

"There are two ways in which rgl scenes are normally displayed within R. The older one is in a dedicated window. In Unix-alikes this is an X11 window; it is a native window in Microsoft Windows. On MacOS, the XQuartz system (see http://xquartz.org/) needs to be installed to support this."

"The newer way to display a scene is by using WebGL in a browser window or in the Viewer pane in RStudio. To select this, set options(rgl.printRglwidget = TRUE). Each operation that would change the scene will return a value which triggers a new WebGL display when printed."

cristalliao commented 1 year ago

Thanks a lot, Gefei! The solution is really helpful. The problem has been solved! Very appreciated! Best regards, Cristal