Skip to content

Commit e4877e4

Browse files
committed
Address review comments for clustering custom modules
1 parent 3a26119 commit e4877e4

17 files changed

Lines changed: 87 additions & 87 deletions

File tree

modules/nf-core/custom/cluster_metrics/environment.yml renamed to modules/nf-core/custom/clustermetrics/environment.yml

File renamed without changes.

modules/nf-core/custom/cluster_metrics/main.nf renamed to modules/nf-core/custom/clustermetrics/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ process CLUSTER_METRICS {
3232
def prefix = task.ext.prefix ?: out_prefix ?: "${meta.id}"
3333

3434
"""
35-
python3 ${projectDir}/modules/nf-core/custom/cluster_metrics/templates/cluster_metrics.py \\
35+
python3 ${moduleDir}/templates/cluster_metrics.py \\
3636
--features ${features} \\
3737
--clusters ${clusters} \\
3838
--out-k-sweep ${prefix}_k_sweep.csv \\

modules/nf-core/custom/cluster_metrics/meta.yml renamed to modules/nf-core/custom/clustermetrics/meta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "cluster_metrics"
1+
name: "clustermetrics"
22
description: "Computes clustering quality metrics (silhouette, Calinski-Harabasz,
33
Davies-Bouldin) and performs k-sweep analysis"
44
keywords:

modules/nf-core/custom/cluster_metrics/templates/cluster_metrics.py renamed to modules/nf-core/custom/clustermetrics/templates/cluster_metrics.py

File renamed without changes.

modules/nf-core/custom/cluster_metrics/tests/data/test_clusters.csv renamed to modules/nf-core/custom/clustermetrics/tests/data/test_clusters.csv

File renamed without changes.

modules/nf-core/custom/cluster_metrics/tests/data/test_features.tsv renamed to modules/nf-core/custom/clustermetrics/tests/data/test_features.tsv

File renamed without changes.

modules/nf-core/custom/cluster_metrics/tests/main.nf.test renamed to modules/nf-core/custom/clustermetrics/tests/main.nf.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ nextflow_process {
55
tag "modules"
66
tag "modules_nfcore"
77
tag "custom"
8-
tag "custom/cluster_metrics"
9-
tag "cluster_metrics"
8+
tag "custom/clustermetrics"
9+
tag "clustermetrics"
1010

11-
test("cluster_metrics - features and clusters") {
11+
test("clustermetrics - features and clusters") {
1212
when {
1313
process {
1414
"""
15-
input[0] = [ [id:'test'], file("${projectDir}/modules/nf-core/custom/cluster_metrics/tests/data/test_features.tsv", checkIfExists: true), file("${projectDir}/modules/nf-core/custom/cluster_metrics/tests/data/test_clusters.csv", checkIfExists: true) ]
15+
input[0] = [ [id:'test'], file("${projectDir}/modules/nf-core/custom/clustermetrics/tests/data/test_features.tsv", checkIfExists: true), file("${projectDir}/modules/nf-core/custom/clustermetrics/tests/data/test_clusters.csv", checkIfExists: true) ]
1616
input[1] = 'test'
1717
"""
1818
}
@@ -28,12 +28,12 @@ nextflow_process {
2828
}
2929
}
3030

31-
test("cluster_metrics - features and clusters - stub") {
31+
test("clustermetrics - features and clusters - stub") {
3232
options "-stub"
3333
when {
3434
process {
3535
"""
36-
input[0] = [ [id:'test'], file("${projectDir}/modules/nf-core/custom/cluster_metrics/tests/data/test_features.tsv", checkIfExists: true), file("${projectDir}/modules/nf-core/custom/cluster_metrics/tests/data/test_clusters.csv", checkIfExists: true) ]
36+
input[0] = [ [id:'test'], file("${projectDir}/modules/nf-core/custom/clustermetrics/tests/data/test_features.tsv", checkIfExists: true), file("${projectDir}/modules/nf-core/custom/clustermetrics/tests/data/test_clusters.csv", checkIfExists: true) ]
3737
input[1] = 'test'
3838
"""
3939
}

modules/nf-core/custom/cluster_metrics/tests/main.nf.test.snap renamed to modules/nf-core/custom/clustermetrics/tests/main.nf.test.snap

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
{
2-
"cluster_metrics - features and clusters - stub": {
2+
"clustermetrics - features and clusters": {
3+
"content": [
4+
[
5+
[
6+
{
7+
"id": "test"
8+
},
9+
"test_metrics.tsv:md5,7bfdac9bca90ba2ea3c03eca25b24f28"
10+
]
11+
],
12+
[
13+
[
14+
{
15+
"id": "test"
16+
},
17+
"test_k_sweep.csv:md5,8c382a00d959ae5d6e19f42cf9278f37"
18+
]
19+
],
20+
[
21+
[
22+
{
23+
"id": "test"
24+
},
25+
"test_selected.json:md5,633493b1585fb0ec0a81629bde4c00cb"
26+
]
27+
],
28+
[
29+
"versions.yml:md5,00e23b98be698c459e9c94079b0164e0"
30+
]
31+
],
32+
"timestamp": "2026-05-06T17:29:16.510271878",
33+
"meta": {
34+
"nf-test": "0.9.5",
35+
"nextflow": "25.09.0"
36+
}
37+
},
38+
"clustermetrics - features and clusters - stub": {
339
"content": [
440
{
541
"0": [
@@ -32,15 +68,15 @@
3268
"id": "test"
3369
},
3470
[
35-
"test_calinski.png:md5,9ad4ecb0779b571ed6f869b5523d821c",
36-
"test_davies_bouldin.png:md5,87eeef85f2bdc97cd3faab3c984fa4cc",
37-
"test_elbow.png:md5,e1980b81ed477b8defe062f5e1dd9af3",
38-
"test_silhouette.png:md5,4fff8e7a883ed692329e4d73485e0e50"
71+
"test_calinski.png:md5,a5db5a4340f5a203f8cfb1e27617eab1",
72+
"test_davies_bouldin.png:md5,b083077c690cc454c7094d6d0c72fdb9",
73+
"test_elbow.png:md5,e90e14974deb0776c9b784c1de8b8ef0",
74+
"test_silhouette.png:md5,b7f103711912855f97d8588e1be2d659"
3975
]
4076
]
4177
],
4278
"4": [
43-
"versions.yml:md5,7f675f156526d327dab66b3edbcaf81d"
79+
"versions.yml:md5,00e23b98be698c459e9c94079b0164e0"
4480
],
4581
"k_sweep": [
4682
[
@@ -64,10 +100,10 @@
64100
"id": "test"
65101
},
66102
[
67-
"test_calinski.png:md5,9ad4ecb0779b571ed6f869b5523d821c",
68-
"test_davies_bouldin.png:md5,87eeef85f2bdc97cd3faab3c984fa4cc",
69-
"test_elbow.png:md5,e1980b81ed477b8defe062f5e1dd9af3",
70-
"test_silhouette.png:md5,4fff8e7a883ed692329e4d73485e0e50"
103+
"test_calinski.png:md5,a5db5a4340f5a203f8cfb1e27617eab1",
104+
"test_davies_bouldin.png:md5,b083077c690cc454c7094d6d0c72fdb9",
105+
"test_elbow.png:md5,e90e14974deb0776c9b784c1de8b8ef0",
106+
"test_silhouette.png:md5,b7f103711912855f97d8588e1be2d659"
71107
]
72108
]
73109
],
@@ -80,47 +116,11 @@
80116
]
81117
],
82118
"versions": [
83-
"versions.yml:md5,7f675f156526d327dab66b3edbcaf81d"
119+
"versions.yml:md5,00e23b98be698c459e9c94079b0164e0"
84120
]
85121
}
86122
],
87-
"timestamp": "2026-05-04T16:19:18.154807795",
88-
"meta": {
89-
"nf-test": "0.9.5",
90-
"nextflow": "25.09.0"
91-
}
92-
},
93-
"cluster_metrics - features and clusters": {
94-
"content": [
95-
[
96-
[
97-
{
98-
"id": "test"
99-
},
100-
"test_metrics.tsv:md5,7bfdac9bca90ba2ea3c03eca25b24f28"
101-
]
102-
],
103-
[
104-
[
105-
{
106-
"id": "test"
107-
},
108-
"test_k_sweep.csv:md5,8c382a00d959ae5d6e19f42cf9278f37"
109-
]
110-
],
111-
[
112-
[
113-
{
114-
"id": "test"
115-
},
116-
"test_selected.json:md5,633493b1585fb0ec0a81629bde4c00cb"
117-
]
118-
],
119-
[
120-
"versions.yml:md5,7f675f156526d327dab66b3edbcaf81d"
121-
]
122-
],
123-
"timestamp": "2026-05-04T16:18:56.462902926",
123+
"timestamp": "2026-05-06T17:29:21.180634202",
124124
"meta": {
125125
"nf-test": "0.9.5",
126126
"nextflow": "25.09.0"

modules/nf-core/custom/cluster_viz/environment.yml renamed to modules/nf-core/custom/clustervisualiation/environment.yml

File renamed without changes.

modules/nf-core/custom/cluster_viz/main.nf renamed to modules/nf-core/custom/clustervisualiation/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ process CLUSTER_VIZ {
3333
def prefix = task.ext.prefix ?: out_prefix ?: "${meta.id}"
3434

3535
"""
36-
python3 ${projectDir}/modules/nf-core/custom/cluster_viz/templates/cluster_viz.py \\
36+
python3 ${moduleDir}/templates/cluster_viz.py \\
3737
--features ${features} \\
3838
--clusters ${clusters} \\
3939
--pca-scores ${pca_scores} \\

0 commit comments

Comments
 (0)