Skip to content

Add custom clustering#11642

Open
dbaku42 wants to merge 42 commits into
nf-core:masterfrom
dbaku42:add-custom-clustering
Open

Add custom clustering#11642
dbaku42 wants to merge 42 commits into
nf-core:masterfrom
dbaku42:add-custom-clustering

Conversation

@dbaku42
Copy link
Copy Markdown

@dbaku42 dbaku42 commented May 13, 2026

New module: custom/clustering

Description 📖
Applies K-means or DBSCAN clustering to plink2_pca eigenvec output.

Input

  • eigenvec from plink2_pca (coordinates + meta)
  • algorithm: 'kmeans' or 'dbscan'
  • n_clusters: K-means clusters (int)
  • dbscan_eps, dbscan_min_samples: DBSCAN params

Output

  • *_clusters.csv: cluster assignments
  • *_clustering_info.json: params used (optional)
  • versions.yml

Test results

  • nf-core modules lint custom/clustering
  • nf-test test custom/clustering/tests/main.nf.test
  • pre-commit passed

Dependencies
Container: matplotlib_pandas_python_scikit-learn_pruned:054f91aaa56bd7d5
Conda: environment.yml

nf-core/modules version
4.0.0

dbaku42 and others added 30 commits May 7, 2026 00:16
- cluster_metrics: computes clustering quality metrics + k-sweep
- cluster_viz: generates PCA, UMAP and t-SNE plots colored by cluster
- Both use conda environment.yml
- Full nf-test coverage
Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
…iz.py

Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
…iz.py

Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
…iz.py

Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
…PCA orphans, fix versions.yml, rename clustervisualiation -> clustervisualization
Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
Co-authored-by: Jonathan Manning <pininforthefjords@gmail.com>
@dbaku42 dbaku42 requested review from a team as code owners May 13, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant