Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions modules/nf-core/fgumi/extract/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::fgumi=0.2.0"
38 changes: 38 additions & 0 deletions modules/nf-core/fgumi/extract/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
process FGUMI_EXTRACT {
tag "${meta.id}"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a5/a510706f3481fae12ff6100d6e4ad298b8bf464a2d93a6afe35e9cf26542d080/data'
: 'community.wave.seqera.io/library/fgumi:0.2.0--fe028e7a64e5da27'}"

input:
tuple val(meta), path(reads), val(library)

output:
tuple val(meta), path("*.bam"), emit: bam
tuple val("${task.process}"), val('fgumi'), eval('fgumi --version | sed "s/^fgumi //"'), topic: versions, emit: versions_fgumi

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
fgumi extract \\
--inputs ${reads.join(' ')} \\
--output ${prefix}.bam \\
${args} \\
--sample ${prefix} \\
--library "${library}"
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bam
"""
}
70 changes: 70 additions & 0 deletions modules/nf-core/fgumi/extract/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: fgumi_extract
description: Extract unique molecular indices (UMIs) from FASTQ files and write
an unaligned BAM file.
keywords:
- umi
- extract
- fastq
- bam
tools:
- fgumi:
description: High-performance tools for working with UMI-tagged sequencing
data.
homepage: https://github.com/fulcrumgenomics/fgumi
documentation: https://docs.rs/fgumi
tool_dev_url: https://github.com/fulcrumgenomics/fgumi
licence:
- "MIT"
identifier: ""
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: Input FASTQ files used for UMI extraction.
pattern: "*.fastq.gz"
ontologies:
- edam: http://edamontology.org/format_3989
- library:
type: string
description: Library name to store in the output BAM read group.
output:
bam:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.bam":
type: file
description: Unaligned BAM with extracted UMIs in SAM tags.
pattern: "*.bam"
ontologies: []
versions_fgumi:
- - ${task.process}:
type: string
description: The process the versions were collected from
- fgumi:
type: string
description: The tool name
- 'fgumi --version | sed "s/^fgumi //"':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The process the versions were collected from
- fgumi:
type: string
description: The tool name
- 'fgumi --version | sed "s/^fgumi //"':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@atrigila"
maintainers:
- "@atrigila"
73 changes: 73 additions & 0 deletions modules/nf-core/fgumi/extract/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
nextflow_process {

name "Test Process FGUMI_EXTRACT"
script "../main.nf"
process "FGUMI_EXTRACT"

tag "modules"
tag "modules_nfcore"
tag "fgumi"
tag "fgumi/extract"

config "./nextflow.config"

test("homo_sapiens - [fastq1, fastq2]") {

when {
params {
module_args = ''
}
process {
"""
input[0] = [
[ id:'test' ],
[
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true)
],
'illumina',
]
"""
}
}

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

}

test("homo_sapiens - [fastq1, fastq2] - stub") {

options "-stub"

when {
params {
module_args = "--read-structures +T +M"
}
process {
"""
input[0] = [
[ id:'test' ],
[
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true)
],
'test',
]
"""
}
}

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

}
}
54 changes: 54 additions & 0 deletions modules/nf-core/fgumi/extract/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"homo_sapiens - [fastq1, fastq2]": {
"content": [
{
"bam": [
[
{
"id": "test"
},
"test.bam:md5,9c2476e5c354f57bed109e582b8953be"
]
],
"versions_fgumi": [
[
"FGUMI_EXTRACT",
"fgumi",
"0.2.0"
]
]
}
],
"timestamp": "2026-05-07T12:48:51.477812468",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"homo_sapiens - [fastq1, fastq2] - stub": {
"content": [
{
"bam": [
[
{
"id": "test"
},
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions_fgumi": [
[
"FGUMI_EXTRACT",
"fgumi",
"0.2.0"
]
]
}
],
"timestamp": "2026-05-07T12:49:21.767581495",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/fgumi/extract/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: FGUMI_EXTRACT {
ext.args = { "${params.module_args}" }
}
}
Loading