Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
91bffbe
Meta attempt
Jakob37 Dec 19, 2025
ad1582c
Iterating on the new prepare gens input data module
Jakob37 Jan 12, 2026
c248349
Moving tools to subfolder and updating using module that worked in pi…
Jakob37 Jan 13, 2026
8de95a4
Skip doi
Jakob37 Jan 13, 2026
e16f792
Update meta
Jakob37 Jan 13, 2026
b8281bb
Drafting on test structure
Jakob37 Jan 14, 2026
56d07eb
nf-module with test data
Jakob37 Jan 14, 2026
be3f30c
Temporary test setup
Jakob37 Jan 14, 2026
7764e30
Missing slash
Jakob37 Jan 14, 2026
91cc31b
Update container paths
Jakob37 Jan 15, 2026
49c9478
Remove leftover URLs
Jakob37 Jan 15, 2026
f887f79
Use the updated Python package entry point
Jakob37 Jan 15, 2026
3cc6acf
Separate stub input file names
Jakob37 Jan 15, 2026
a8f90a9
Read counts as a variable
Jakob37 Jan 15, 2026
5b48d49
Test snapshots
Jakob37 Jan 15, 2026
37517f6
Update tests to use test repo data
Jakob37 Jan 21, 2026
853e968
Wrapping changes
Jakob37 Jan 21, 2026
211d066
Trying to put files into the correct locations
Jakob37 Jan 21, 2026
61b0506
Fix the output channels
Jakob37 Jan 21, 2026
cf1be94
Trying to get input names right
Jakob37 Jan 21, 2026
e5f7288
Successful nf-test run
Jakob37 Jan 21, 2026
30c8200
Remove todo
Jakob37 Jan 21, 2026
c23fd17
Add topic: versions
Jakob37 Jan 21, 2026
35a6363
Pin environment.yml versions
Jakob37 Jan 21, 2026
25df865
Rename versions channel
Jakob37 Jan 21, 2026
9932f83
Versions output channel
Jakob37 Jan 21, 2026
8145864
Merge branch 'master' into prepare-gens-input-data
Jakob37 Jan 21, 2026
a1ee38d
Make the versions channel a tuple
Jakob37 Jan 21, 2026
a29d089
Cleanup linting issues
Jakob37 Jan 21, 2026
4345e9c
meta.yml
Jakob37 Jan 21, 2026
926d1a5
Fix such that all the nf-core validation errors are resolved
Jakob37 Jan 21, 2026
cf10640
Added newline at end of file
Jakob37 Jan 21, 2026
b7190ae
Update snapshot
Jakob37 Jan 22, 2026
977b3da
Add container info to meta.yml
Jakob37 Jan 22, 2026
b1fdb62
Remove the container def again
Jakob37 Jan 22, 2026
081a69c
Bump
Jakob37 Jan 22, 2026
8e286e6
Merge branch 'master' of https://github.com/nf-core/modules into prep…
Jakob37 Jan 22, 2026
1432447
Fix stub name
Jakob37 Jan 22, 2026
4d9041e
Expand on the GVCF documentation
Jakob37 Jan 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions modules/nf-core/gens/preparecovandbaf/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::htslib=1.23
- conda-forge::pip=25.3
- conda-forge::python=3.14.2
- pip:
- gens-input-data-tools==2.0.0
46 changes: 46 additions & 0 deletions modules/nf-core/gens/preparecovandbaf/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
process PREPARECOVANDBAF {
tag "$meta.id"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a9/a9f414681caefff508dcab89f4872ae3cda18d15b9b610b679fa5eb5023b4b7c/data':
'community.wave.seqera.io/library/tabix_pip_gens-input-data-tools:5d39cfe6f6bf258b' }"

input:
tuple val(meta), path(read_counts), path(gvcf), path(gvcf_tbi)
path baf_positions

output:
tuple val(meta), path("*.cov.bed.gz") , emit: cov_gz
tuple val(meta), path("*.cov.bed.gz.tbi") , emit: cov_tbi
tuple val(meta), path("*.baf.bed.gz") , emit: baf_gz
tuple val(meta), path("*.baf.bed.gz.tbi") , emit: baf_tbi
tuple val("${task.process}"), val('preparecovandbaf'), eval("generate_cov_and_baf --version"), topic: versions, emit: versions_preparecovandbaf

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
generate_cov_and_baf \\
--coverage $read_counts \\
--gvcf $gvcf \\
--label $prefix \\
--baf_positions $baf_positions \\
--bgzip_tabix_output \\
$args \\
--outdir .
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo "" | gzip > ${prefix}.cov.bed.gz
touch ${prefix}.cov.bed.gz.tbi
echo "" | gzip > ${prefix}.baf.bed.gz
touch ${prefix}.baf.bed.gz.tbi
"""
}
110 changes: 110 additions & 0 deletions modules/nf-core/gens/preparecovandbaf/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: "preparecovandbaf"
description: Tools for preparing inputs for visualization in Gens
keywords:
- gens
- preparecovandbaf
- preprocessing
- genomics
- CNV
tools:
- "gens":
description: "Scripts for preparing input data to Gens"
homepage: "https://github.com/SMD-Bioinformatics-Lund/Prepare-Gens-input-data"
documentation: "https://github.com/SMD-Bioinformatics-Lund/Prepare-Gens-input-data/README.md"
tool_dev_url: "https://github.com/SMD-Bioinformatics-Lund/Prepare-Gens-input-data"
licence: [MIT]
identifier: ""

input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- read_counts:
type: file
description: Binned coverage calculations from GATK
pattern: "*.{tsv}"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
- gvcf:
type: file
description: GVCF. It is used to calculate B-allele frequencies at the sites specified in baf_positions. It can be generated using any SNV-caller.
pattern: "*.vcf.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
- gvcf_tbi:
type: file
description: GVCF tabix index
pattern: "*.vcf.gz.tbi"
ontologies: []
- baf_positions:
type: file
description: Sites to sample for BAF calculations
pattern: "*.{tsv,tsv.gz}"

ontologies:
- edam: http://edamontology.org/format_3475 # TSV
output:
cov_gz:
- - meta:
type: map
description: |
Groovy Map containing sample information
- "*.cov.bed.gz":
type: file
description: Coverage bed (bgzipped)

cov_tbi:
- - meta:
type: map
description: |
Groovy Map containing sample information
- "*.cov.bed.gz.tbi":
type: file
description: Tabix index for coverage bed

baf_gz:
- - meta:
type: map
description: |
Groovy Map containing sample information
- "*.baf.bed.gz":
type: file
description: BAF bed (bgzipped)

baf_tbi:
- - meta:
type: map
description: |
Groovy Map containing sample information
- "*.baf.bed.gz.tbi":
type: file
description: Tabix index for BAF bed

versions_preparecovandbaf:
- - "${task.process}":
type: string
description: The process the versions were collected from
- "preparecovandbaf":
type: string
description: The tool name
- "generate_cov_and_baf --version":
type: string
description: The command used to generate the version of the tool

topics:
versions:
- - "${task.process}":
type: string
description: The process the versions were collected from
- "preparecovandbaf":
type: string
description: The tool name
- "generate_cov_and_baf --version":
type: eval
description: The expression used to obtain the tool version
authors:
- "@jakob37"
maintainers:
- "@jakob37"
66 changes: 66 additions & 0 deletions modules/nf-core/gens/preparecovandbaf/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
nextflow_process {

name "Test Process PREPARECOVANDBAF"
script "modules/nf-core/gens/preparecovandbaf/main.nf"
process "PREPARECOVANDBAF"

tag "modules"
tag "modules_nfcore"
tag "gens"
tag "gens/preparecovandbaf"

test("gens_preparecovandbaf") {

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/gatk/hg002_chr20_90000_to_100000.standardizedCR.tsv", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/vcf/hg002_chr20_90000_to_100000.dnascope.gvcf.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/vcf/hg002_chr20_90000_to_100000.dnascope.gvcf.gz.tbi", checkIfExists: true),
]
input[1] = [
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/tab/gnomad_hg38_chr20_90000_to_100000.0.05.txt.gz", checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

test("gens_preparecovandbaf - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/gatk/hg002_chr20_90000_to_100000.standardizedCR.tsv", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/vcf/hg002_chr20_90000_to_100000.dnascope.gvcf.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/vcf/hg002_chr20_90000_to_100000.dnascope.gvcf.gz.tbi", checkIfExists: true),
]
input[1] = [
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/tab/gnomad_hg38_chr20_90000_to_100000.0.05.txt.gz", checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}
}
Loading