Skip to content

Commit affae4a

Browse files
pinin4fjordsclaude
andcommitted
refactor: emit individual files instead of directory
- tlens: tlens_by_allele.tsv (primary result) - plots: *.png (allele and violin plots, optional) - qc: qc directory (stats, read lengths, metadata) Also revert modules_testdata_base_path now that nf-core/test-datasets#1947 is merged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent de72854 commit affae4a

File tree

5 files changed

+84
-97
lines changed

5 files changed

+84
-97
lines changed

modules/nf-core/telogator2/main.nf

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ process TELOGATOR2 {
1212
tuple val(meta2), path(fasta), path(fai)
1313

1414
output:
15-
tuple val(meta), path("${prefix}"), emit: results
15+
tuple val(meta), path("${prefix}/tlens_by_allele.tsv"), emit: tlens
16+
tuple val(meta), path("${prefix}/*.png") , emit: plots, optional: true
17+
tuple val(meta), path("${prefix}/qc") , emit: qc
1618
tuple val("${task.process}"), val('telogator2'), eval("telogator2 --version | sed 's/telogator2 //'"), emit: versions_telogator2, topic: versions
1719

1820
when:
@@ -34,7 +36,10 @@ process TELOGATOR2 {
3436
stub:
3537
prefix = task.ext.prefix ?: "${meta.id}"
3638
"""
37-
mkdir -p ${prefix}
38-
touch ${prefix}/telomere_length_summary.tsv
39+
mkdir -p ${prefix}/qc
40+
touch ${prefix}/tlens_by_allele.tsv
41+
touch ${prefix}/all_final_alleles.png
42+
touch ${prefix}/violin_atl.png
43+
touch ${prefix}/qc/stats.txt
3944
"""
4045
}

modules/nf-core/telogator2/meta.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,39 @@ input:
5353
pattern: "*.fai"
5454
ontologies: []
5555
output:
56-
results:
56+
tlens:
5757
- - meta:
5858
type: map
5959
description: |
6060
Groovy Map containing sample information
6161
e.g. [ id:'test' ]
62-
- ${prefix}:
62+
- ${prefix}/tlens_by_allele.tsv:
63+
type: file
64+
description: TSV file with telomere length estimates per allele
65+
pattern: "*/tlens_by_allele.tsv"
66+
ontologies:
67+
- edam: http://edamontology.org/format_3475
68+
plots:
69+
- - meta:
70+
type: map
71+
description: |
72+
Groovy Map containing sample information
73+
e.g. [ id:'test' ]
74+
- ${prefix}/*.png:
75+
type: file
76+
description: PNG plots including allele visualizations and violin plots
77+
pattern: "*/*.png"
78+
ontologies:
79+
- edam: http://edamontology.org/format_3603
80+
qc:
81+
- - meta:
82+
type: map
83+
description: |
84+
Groovy Map containing sample information
85+
e.g. [ id:'test' ]
86+
- ${prefix}/qc:
6387
type: directory
64-
description: Directory containing telogator2 output files including telomere length estimates and TVR characterization
88+
description: Directory containing QC statistics, read length distributions, and run metadata
6589
ontologies: []
6690
versions_telogator2:
6791
- - ${task.process}:

modules/nf-core/telogator2/tests/main.nf.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ nextflow_process {
2626
assertAll(
2727
{ assert process.success },
2828
{ assert snapshot(
29-
process.out.results,
29+
process.out.tlens,
30+
process.out.plots,
31+
process.out.qc,
3032
process.out.findAll { key, val -> key.startsWith('versions') }
3133
).match() }
3234
)
Lines changed: 45 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,39 @@
11
{
22
"homo_sapiens - ont bam - telomere reads": {
33
"content": [
4+
[
5+
[
6+
{
7+
"id": "test_tel"
8+
},
9+
"tlens_by_allele.tsv:md5,5949984d605b852ffe752a5e5ec31c66"
10+
]
11+
],
412
[
513
[
614
{
715
"id": "test_tel"
816
},
917
[
1018
"all_final_alleles.png:md5,2242d82fe92d168a664ea8eb5035bdff",
11-
[
12-
"cmd.txt:md5,f167983ff2dc16854484614091f62e1d",
13-
"qc_readlens.png:md5,a6b94da78e364a3577cb573f394e3830",
14-
"readlens.npz:md5,b70ce6f33464057fe6c53dcc6a9d8a76",
15-
"rng.txt:md5,46b0db3f2fc915347fc79570ec4bf75a",
16-
"stats.txt:md5,642c44fb5ab98fbf9c208b419642aa4c"
17-
],
18-
[
19-
[
20-
[
21-
"i1_dendrogram_000.png:md5,e36b09b9d6f2b1bc5ed11523249f8198",
22-
"i1_dendrogram_001.png:md5,d9b30d9c5672a6236e801210fc808e94",
23-
"i2_dendrogram_000.png:md5,e36b09b9d6f2b1bc5ed11523249f8198"
24-
],
25-
[
26-
"i2_consensus_000.fa:md5,9b0694ee7b9d7fa2bca4a27f142e83cc"
27-
],
28-
[
29-
"i0_dist-matrix.npz:md5,4832bc91bcdf9ffeefd2eab94bdf6be7",
30-
"i1_dist-matrix_000.npz:md5,81725f75ed680c0514a4c2834ff8438a",
31-
"i1_dist-matrix_001.npz:md5,f7ef5d0c9f5b89025739af143a4bcd5f",
32-
"i2_dist-matrix_000.npz:md5,81725f75ed680c0514a4c2834ff8438a"
33-
],
34-
[
35-
36-
]
37-
],
38-
[
39-
[
40-
"i1_dendrogram_000.png:md5,9cd468eb2941e442243d9902b44b7ec4"
41-
],
42-
[
43-
44-
],
45-
[
46-
"i1_dist-matrix_000.npz:md5,f8ccbe4eaa31a486dbb1a21480eab79c"
47-
],
48-
[
49-
50-
]
51-
],
52-
[
53-
"tvrs_dist-matrix.npz:md5,725a7a0463a85b32c17cab3b3f1b7069"
54-
],
55-
[
56-
[
57-
"dendrogram_000.png:md5,3ac3f110532fe3cd0199534a8cb4e780"
58-
],
59-
[
60-
61-
],
62-
[
63-
"dist-matrix_000.npz:md5,30242eecf9708c0ddbb24c91950d3306"
64-
],
65-
[
66-
67-
]
68-
],
69-
[
70-
[
71-
"dendrogram_000.png:md5,a8ddf0b37fb9392f8b92ea7f4b3146e8"
72-
],
73-
[
74-
"consensus_000.fa:md5,9b0694ee7b9d7fa2bca4a27f142e83cc"
75-
],
76-
[
77-
"dist-matrix_000.npz:md5,545430c2ff75c6baedcfb175d10d9232"
78-
],
79-
[
80-
81-
]
82-
],
83-
[
84-
"subtel_aln.bam:md5,c0e35e1ffa851248eb8a13a82243ca59",
85-
"subtel_aln.bam.bai:md5,bf87fc829ceef247ee77e201d84d7988",
86-
"subtel_aln.log:md5,cb385c6fdbedb4c9130c26ea87a6cce3",
87-
"unanchored_subtels.fa.gz:md5,55f417096a110125d2f2d4275dc298a8"
88-
],
89-
[
90-
91-
],
92-
"tel_reads.fa.gz:md5,982d3e502f31bce7b56a81b7ca890fb6"
93-
],
94-
"tlens_by_allele.tsv:md5,5949984d605b852ffe752a5e5ec31c66",
9519
"violin_atl.png:md5,8d1df419ab8c71db20bea14af2ffd5a6"
9620
]
9721
]
9822
],
23+
[
24+
[
25+
{
26+
"id": "test_tel"
27+
},
28+
[
29+
"cmd.txt:md5,f167983ff2dc16854484614091f62e1d",
30+
"qc_readlens.png:md5,a6b94da78e364a3577cb573f394e3830",
31+
"readlens.npz:md5,b70ce6f33464057fe6c53dcc6a9d8a76",
32+
"rng.txt:md5,7fa2310ab39ef8932ec062d154f016be",
33+
"stats.txt:md5,642c44fb5ab98fbf9c208b419642aa4c"
34+
]
35+
]
36+
],
9937
{
10038
"versions_telogator2": [
10139
[
@@ -110,21 +48,40 @@
11048
"nf-test": "0.9.3",
11149
"nextflow": "25.10.2"
11250
},
113-
"timestamp": "2026-03-24T11:57:55.866219"
51+
"timestamp": "2026-03-24T12:12:43.364233"
11452
},
11553
"homo_sapiens - pacbio bam - stub": {
11654
"content": [
11755
{
118-
"results": [
56+
"plots": [
57+
[
58+
{
59+
"id": "stub"
60+
},
61+
[
62+
"all_final_alleles.png:md5,d41d8cd98f00b204e9800998ecf8427e",
63+
"violin_atl.png:md5,d41d8cd98f00b204e9800998ecf8427e"
64+
]
65+
]
66+
],
67+
"qc": [
11968
[
12069
{
12170
"id": "stub"
12271
},
12372
[
124-
"telomere_length_summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
73+
"stats.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
12574
]
12675
]
12776
],
77+
"tlens": [
78+
[
79+
{
80+
"id": "stub"
81+
},
82+
"tlens_by_allele.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
83+
]
84+
],
12885
"versions_telogator2": [
12986
[
13087
"TELOGATOR2",
@@ -138,6 +95,6 @@
13895
"nf-test": "0.9.3",
13996
"nextflow": "25.10.2"
14097
},
141-
"timestamp": "2026-03-24T11:58:28.830702"
98+
"timestamp": "2026-03-24T12:13:16.495196"
14299
}
143100
}

tests/config/nf-test.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ params {
22
publish_dir_mode = "copy"
33
singularity_pull_docker_container = false
44
test_data_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules'
5-
// TODO: revert to nf-core/test-datasets/modules once nf-core/test-datasets#1947 is merged
6-
modules_testdata_base_path = 'https://raw.githubusercontent.com/pinin4fjords/test-datasets/telogator2-test-data/data/'
5+
modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/'
76
}
87

98
// Resolves issue with accessing s3 from self-hosted runners

0 commit comments

Comments
 (0)