Open Rongtingting opened 3 weeks ago
BAF module without specifying reference cells
Hi, Rongting @Rongtingting
Thank you for your prompt answer last time. Sorry to bother you again. I wonder if the normal and tumor cells identified by this BAF module can be used as the result of the final comboine? Can I cluster with the results after the combine module? Will there be any difference between the combine and BAF results? In addition, does xclone have the ability to identify subclones? I am looking forward to hearing from you and I would appreciate it very much.
Best regards!
Hi @ShuaiManMan,
Thank you for your questions. Yes, you should cluster the results after the Combine module.
Here, BAF module clustering just provides an option for finding reference/normal cells.
If there are LOH events (similar expression level as reference populations but loss allele), only Combine module can detect.
Yes, XClone can detect subclones based on the Combine module's output.
You may find the following codes helpful
import xclone
import scanpy as sc
data_dir = "xxxxxx/BCH869_scRNA_trials/"
combine_final_file = data_dir + "data/combined_final.h5ad"
adata = sc.read(combine_final_file)
## explore the clusters numbers by UMAP visualization
xclone.al.exploreClustering(adata, ref_anno_key = "spot_anno", Xlayer = "prob1_merge", max_clusters = 5)
## explore the clustering by specify 2 clusters
adata_anno = xclone.al.OnestopBAFClustering(adata, Xlayer = "prob1_merge",
n_clusters = 2, ref_anno_key = "spot_anno", clone_anno_key = "clone(2)",
plot_title = "xxxx (XClone)",
file_save_path = "xxxx/analysis/", file_save_name = "xxx_2clones", complex_plot = True)
## Similarly, explore the clustering by specify 3 clusters
adata_anno = xclone.al.OnestopBAFClustering(adata, Xlayer = "prob1_merge",
n_clusters = 3, ref_anno_key = "spot_anno", clone_anno_key = "clone(3)",
plot_title = "xxxx (XClone)",
file_save_path = "xxxx/analysis/", file_save_name = "xxx_3clones", complex_plot = True)
Bests, Rongting
Hi Rongting, Thank you very much for your timely reply, and your answer is very detailed, I really appreciate it! ^-^
Hi @Rongtingting ,
I have some questions about the results of clustering after the Combine module. I ran the following code.
import xclone
import scanpy as sc
data_dir = "xxxxxx/BCH869_scRNA_trials/"
combine_final_file = data_dir + "data/combined_final.h5ad"
adata = sc.read(combine_final_file)
## explore the clusters numbers by UMAP visualization
xclone.al.exploreClustering(adata, ref_anno_key = "spot_anno", Xlayer = "prob1_merge", max_clusters = 5)
## explore the clustering by specify 2 clusters
adata_anno = xclone.al.OnestopBAFClustering(adata, Xlayer = "prob1_merge",
n_clusters = 2, ref_anno_key = "spot_anno", clone_anno_key = "clone(2)",
plot_title = "xxxx (XClone)",
file_save_path = "xxxx/analysis/", file_save_name = "xxx_2clones", complex_plot = True)
the results as follow: I want to know what the coordinates on the right mean. And how do I know which of the two clones is normal and tumor? Run the results of the combine again and label the results with this clone?I am looking forward to hearing from you and I would appreciate it very much.
Bests, Mashuai
Hi @Mashuaiii,
Thank you for your updates.
Here, you have 2 clone labels; you can use that label to plot a combined module-derived heatmap to check the patterns of the 2 clones.
Bests, Rongting
Ok,Thank you ~
I am sorry for the late reply. I have added functions for finding normal and tumor cells in XClone BAF module (latest version via github installation). And XClone works well in Python 3.9 environment now.
Example
Bests, Rongting
Originally posted by @Rongtingting in https://github.com/single-cell-genetics/XClone/issues/5#issuecomment-2306914141