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 this file(genes_new.txt) #1

Closed baoyulinn closed 1 year ago

baoyulinn commented 1 year ago

Dear professor I want to know where i can find this file when i try this great STitch3D. genes_new = pd.read_csv("./genes_new.txt") in this part "Run STitch3D on the human heart dataset"

thank you so much

gefeiwang commented 1 year ago

Hi there,

"genes_new.txt" was obtained using ENSEMBL Gene ID to Gene Symbol Converter. You can find this file through this link.

Thank you for your interest!

baoyulinn commented 1 year ago

Thanks for your link!

I also have another question: In this step, we need this file (results_6PCW) plot3D_clusters(directory = "./results_6PCW", clusters = clusters, cluster_colors = cluster_colors, um = um, spot_radius = spot_radius, axis_rescale = axis_rescale ) but i just get the file (results_human_heart) in python, which do not include clustering_result.csv Error in file(file, "rt") : cannot open the connection 3. file(file, "rt") 2. read.table(paste0(directory, "/clustering_result.csv"), sep = ",", header = TRUE) at plot3D_func.R#74 1. plot3D_clusters(directory = "./results_human_heart", clusters = clusters, cluster_colors = cluster_colors, um = um, spot_radius = spot_radius, axis_rescale = axis_rescale)

image
gefeiwang commented 1 year ago

“clustering_result.csv” is created to visualize clustering results in R. You can get this result by saving the clustering result in the results folder. For example, we ran model.adata_st.obs["louvain"].to_csv(os.path.join(save_path, "clustering_result.csv")) after Louvain clustering in the 6 PCW human heart example.

baoyulinn commented 1 year ago

After learning the tutorials, I have got a lot from this great Stitch3D. But, I did not find the method to express specific gene in spatial. For example, in this figure

image

Can you provide the code or tutorial?

gefeiwang commented 1 year ago

We just added an example of differentially gene analysis using 6 PCW and 9 PCW human hearts in our tutorial website. Please check this link for more details.

baoyulinn commented 1 year ago

Thanks for your reply. And i want to know how to express gene in spatial 3D. For example in this following figure image

In the tutorials, there are only the way to Visualize 3D spatial regions and Visualize 3D cell-type distributions. I want to know how to Visualize 3D gene expression.

Thank you so much for carving out time to answer my questions.

gefeiwang commented 1 year ago

Hi, you can follow this code to visualize gene expressions in 3D coordinates provided by STitch3D. Thank you for your interest in our package.