The Variable Neighborhood Search (VNS) method is well known metaheuristic method, which starts from one point from the search space, explores its neighborhoods and repeats the whole process until better solution is found or some stopping criteria is reached. Leveraging the well-established foundation of VNS, first we present a comprehensive solution for the cell clustering problem in the form of the Integer Linear Programming (ILP) minimization problem, which is based on the p-median classification. The proposed algorithm exhibits the ability to organize cells into clusters, utilizing information from both gene expression matrices and spatial coordinates.
Name | Type | Definition | Default |
---|---|---|---|
adata_path | str | Path to adata file | data.h5ad |
emb | str | Choose embeddings ('CCST', 'GraphST', 'STAGATE', 'X_pca', 'STAligner') | X_pca |
k | int | Number of clusters | 20 |
max_iter | int | Maximal number of iterations | 20 |
p | int | LocalSearch parameter | 12 |
m | int | LocalSearch parameter | 15 |
alpha | int | Precentage of the influence of the embedding values | 1 |
s | int | Maximal number of neighborhoods that should be searched | 10 |
seed | int | Seed value | 1234 |
To run the code, you can use the following example command:
python vns.py --adata_path '/goofys/BCO/Benchmark/SS200000128TR_E2_benchmark.h5ad' --ground_truth 'celltype_pred' --emb 'GraphST' --k 33 --max_iter 10 --param 12 --m 15 --alpha 1 --s 20 --seed 4639