Batch effect
GSG.GSG_Cluster_Comb
GSG.GSG_Cluster_Comb is a function to cluster domain using feature embedding with k-means for the mergerd data.
The input of this function is the feature embedding saved in the anndata object two_atada returned by the GSG.GSG_batch_effect_train function and the number of clustering classes you want to get, the kmeans clustering method is called in the function to perform the clustering operation on the feature embedding, and the function returns the clustering result and saves it into the anndata object.
Parameters
two_adata: anndata
Two spatial transcriptome data.
args: argparse
The arguments of constructing graph.
result_file: str
Path of storing result files.
Returns
adatas_GSG: anndata
Two spatial transcriptome data which removing batch effect and clustering.