Skip to content

Commit fd91924

Browse files
authored
New module ngsbits/rohhunter (#12005)
new module ngsbits/rohhunter
1 parent a40ca37 commit fd91924

5 files changed

Lines changed: 393 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+
channels:
4+
- conda-forge
5+
- bioconda
6+
dependencies:
7+
# renovate: datasource=conda depName=bioconda/ngs-bits
8+
- bioconda::ngs-bits=2025_09
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
process NGSBITS_ROHHUNTER {
2+
tag "$meta.id"
3+
label 'process_single'
4+
5+
conda "${moduleDir}/environment.yml"
6+
container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
7+
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/2b/2be56a07ac1d5a447a10fd061be4d6144620bec00bac834f58c2bdef0330147f/data'
8+
: 'community.wave.seqera.io/library/ngs-bits:2025_09--f6ea3a4494373ed6'}"
9+
10+
input:
11+
tuple val(meta), path(vcf), path(exclude_bed)
12+
tuple val(meta2), path(annotation_beds)
13+
14+
output:
15+
tuple val(meta), path("*.tsv"), emit: tsv
16+
tuple val("${task.process}"), val('ngsbits'), eval("RohHunter --version | sed 's/RohHunter //'"), topic: versions, emit: versions_ngsbits
17+
18+
when:
19+
task.ext.when == null || task.ext.when
20+
21+
script:
22+
def args = task.ext.args ?: ''
23+
def prefix = task.ext.prefix ?: "${meta.id}"
24+
def ann_beds = annotation_beds ? "-annotate ${annotation_beds.join(' ')}" : ''
25+
def excl_bed = exclude_bed ? "-exclude ${exclude_bed}" : ''
26+
27+
"""
28+
RohHunter \\
29+
$args \\
30+
$ann_beds \\
31+
$excl_bed \\
32+
-out ${prefix}.tsv \\
33+
-in $vcf
34+
"""
35+
36+
stub:
37+
def args = task.ext.args ?: ''
38+
def prefix = task.ext.prefix ?: "${meta.id}"
39+
"""
40+
echo $args
41+
42+
touch ${prefix}.tsv
43+
"""
44+
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: "ngsbits_rohhunter"
2+
description: RohHunter is a tool for run of homozygosity (ROH) detection based
3+
on a variant list in VCF format.
4+
keywords:
5+
- roh
6+
- homozygosity
7+
- allele frequency
8+
tools:
9+
- "ngsbits":
10+
description: "Short-read sequencing tools"
11+
homepage: "https://github.com/imgag/ngs-bits"
12+
documentation: "https://github.com/imgag/ngs-bits"
13+
tool_dev_url: "https://github.com/imgag/ngs-bits"
14+
licence:
15+
- "MIT"
16+
identifier: ""
17+
input:
18+
- - meta:
19+
type: map
20+
description: |
21+
Groovy Map containing sample information
22+
e.g. `[ id:'sample1' ]`
23+
- vcf:
24+
type: file
25+
description: VCF file containing variants for ROH detection
26+
pattern: "*.vcf{,.gz}"
27+
ontologies:
28+
- edam: "http://edamontology.org/format_3016" # VCF
29+
- exclude_bed:
30+
type: file
31+
description: BED file with regions to exclude from ROH detection
32+
pattern: "*.bed"
33+
ontologies:
34+
- edam: "http://edamontology.org/format_3003" # BED
35+
- - meta2:
36+
type: map
37+
description: |
38+
Groovy Map containing annotation information
39+
e.g. `[ id:'sample1' ]`
40+
- annotation_beds:
41+
type: file
42+
description: BED file with annotation regions for ROH detection
43+
pattern: "*.bed"
44+
ontologies:
45+
- edam: "http://edamontology.org/format_3003" # BED
46+
output:
47+
versions_ngsbits:
48+
- - ${task.process}:
49+
type: string
50+
description: The name of the process
51+
- ngsbits:
52+
type: string
53+
description: The name of the tool
54+
- RohHunter --version | sed 's/RohHunter //':
55+
type: eval
56+
description: The expression to obtain the version of the tool
57+
tsv:
58+
- - meta:
59+
type: map
60+
description: |
61+
Groovy Map containing sample information
62+
e.g. `[ id:'sample1' ]`
63+
- "*.tsv":
64+
type: file
65+
description: TSV file containing the detected ROHs
66+
pattern: "*.tsv"
67+
ontologies:
68+
- edam: "http://edamontology.org/format_3475" # TSV
69+
topics:
70+
versions:
71+
- - ${task.process}:
72+
type: string
73+
description: The name of the process
74+
- ngsbits:
75+
type: string
76+
description: The name of the tool
77+
- RohHunter --version | sed 's/RohHunter //':
78+
type: eval
79+
description: The expression to obtain the version of the tool
80+
authors:
81+
- "@nvnieuwk"
82+
maintainers:
83+
- "@nvnieuwk"
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
nextflow_process {
2+
3+
name "Test Process NGSBITS_ROHHUNTER"
4+
script "../main.nf"
5+
process "NGSBITS_ROHHUNTER"
6+
7+
tag "modules"
8+
tag "modules_nfcore"
9+
tag "ngsbits"
10+
tag "ngsbits/rohhunter"
11+
12+
topics "versions"
13+
14+
test("homo_sapiens - vcf") {
15+
16+
when {
17+
process {
18+
"""
19+
input[0] = [
20+
[ id:'test' ],
21+
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotc.vcf.gz', checkIfExists: true),
22+
[]
23+
]
24+
input[1] = [
25+
[ id: 'annotate_beds'],
26+
[]
27+
]
28+
"""
29+
}
30+
}
31+
32+
then {
33+
assert process.success
34+
assertAll(
35+
{ assert snapshot(
36+
process.out,
37+
topics
38+
).match() }
39+
)
40+
}
41+
42+
}
43+
44+
test("homo_sapiens - vcf & beds") {
45+
46+
when {
47+
process {
48+
"""
49+
input[0] = [
50+
[ id:'test' ],
51+
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotc.vcf.gz', checkIfExists: true),
52+
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true)
53+
]
54+
input[1] = [
55+
[ id: 'annotate_beds'],
56+
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bins_10kb_annotated.bed', checkIfExists: true)
57+
]
58+
"""
59+
}
60+
}
61+
62+
then {
63+
assert process.success
64+
assertAll(
65+
{ assert snapshot(
66+
process.out,
67+
topics
68+
).match() }
69+
)
70+
}
71+
72+
}
73+
74+
test("homo_sapiens - vcf - stub") {
75+
76+
options "-stub"
77+
78+
when {
79+
process {
80+
"""
81+
input[0] = [
82+
[ id:'test' ],
83+
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotc.vcf.gz', checkIfExists: true),
84+
[]
85+
]
86+
input[1] = [
87+
[ id: 'annotate_beds'],
88+
[]
89+
]
90+
"""
91+
}
92+
}
93+
94+
then {
95+
assert process.success
96+
assertAll(
97+
{ assert snapshot(
98+
process.out,
99+
topics
100+
).match() }
101+
)
102+
}
103+
104+
}
105+
106+
}
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
{
2+
"homo_sapiens - vcf": {
3+
"content": [
4+
{
5+
"0": [
6+
[
7+
{
8+
"id": "test"
9+
},
10+
"test.tsv:md5,cb63516bae442eb91e59aec4d89a1d8f"
11+
]
12+
],
13+
"1": [
14+
[
15+
"NGSBITS_ROHHUNTER",
16+
"ngsbits",
17+
"2025_09"
18+
]
19+
],
20+
"tsv": [
21+
[
22+
{
23+
"id": "test"
24+
},
25+
"test.tsv:md5,cb63516bae442eb91e59aec4d89a1d8f"
26+
]
27+
],
28+
"versions_ngsbits": [
29+
[
30+
"NGSBITS_ROHHUNTER",
31+
"ngsbits",
32+
"2025_09"
33+
]
34+
]
35+
},
36+
{
37+
"versions": [
38+
[
39+
"NGSBITS_ROHHUNTER",
40+
"ngsbits",
41+
"2025_09"
42+
]
43+
]
44+
}
45+
],
46+
"timestamp": "2026-06-15T14:33:12.646074394",
47+
"meta": {
48+
"nf-test": "0.9.5",
49+
"nextflow": "26.04.1"
50+
}
51+
},
52+
"homo_sapiens - vcf & beds": {
53+
"content": [
54+
{
55+
"0": [
56+
[
57+
{
58+
"id": "test"
59+
},
60+
"test.tsv:md5,d45383ec2c0f62e28efaca8e8f5ff53e"
61+
]
62+
],
63+
"1": [
64+
[
65+
"NGSBITS_ROHHUNTER",
66+
"ngsbits",
67+
"2025_09"
68+
]
69+
],
70+
"tsv": [
71+
[
72+
{
73+
"id": "test"
74+
},
75+
"test.tsv:md5,d45383ec2c0f62e28efaca8e8f5ff53e"
76+
]
77+
],
78+
"versions_ngsbits": [
79+
[
80+
"NGSBITS_ROHHUNTER",
81+
"ngsbits",
82+
"2025_09"
83+
]
84+
]
85+
},
86+
{
87+
"versions": [
88+
[
89+
"NGSBITS_ROHHUNTER",
90+
"ngsbits",
91+
"2025_09"
92+
]
93+
]
94+
}
95+
],
96+
"timestamp": "2026-06-15T14:35:43.303225273",
97+
"meta": {
98+
"nf-test": "0.9.5",
99+
"nextflow": "26.04.1"
100+
}
101+
},
102+
"homo_sapiens - vcf - stub": {
103+
"content": [
104+
{
105+
"0": [
106+
[
107+
{
108+
"id": "test"
109+
},
110+
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
111+
]
112+
],
113+
"1": [
114+
[
115+
"NGSBITS_ROHHUNTER",
116+
"ngsbits",
117+
"2025_09"
118+
]
119+
],
120+
"tsv": [
121+
[
122+
{
123+
"id": "test"
124+
},
125+
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
126+
]
127+
],
128+
"versions_ngsbits": [
129+
[
130+
"NGSBITS_ROHHUNTER",
131+
"ngsbits",
132+
"2025_09"
133+
]
134+
]
135+
},
136+
{
137+
"versions": [
138+
[
139+
"NGSBITS_ROHHUNTER",
140+
"ngsbits",
141+
"2025_09"
142+
]
143+
]
144+
}
145+
],
146+
"timestamp": "2026-06-15T14:33:48.820950611",
147+
"meta": {
148+
"nf-test": "0.9.5",
149+
"nextflow": "26.04.1"
150+
}
151+
}
152+
}

0 commit comments

Comments
 (0)