Skip to content

nf-test migration for universc #8478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions modules/nf-core/universc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ process UNIVERSC {
--per-cell-data \\
$args 1> _log 2> _err

mkdir sample-${meta.id}/outs/
# save log files
echo !! > sample-${meta.id}/outs/_invocation
cp _log sample-${meta.id}/outs/_log
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/universc/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,31 @@ input:
type: file
description: FASTQ or FASTQ.GZ file, list of 2 files for paired-end data
pattern: "*.{fastq,fq,fastq.gz,fq.gz}"
ontologies:
- edam: http://edamontology.org/format_1930 # FASTQ
- - reference:
type: file
description: Reference genome file
ontologies: []
output:
- outs:
- meta:
type: file
description: Files containing the outputs of Cell Ranger
pattern: "sample-${meta.id}/outs/*"
ontologies: []
- sample-${meta.id}/outs/*:
type: file
description: Files containing the outputs of Cell Ranger
pattern: "sample-${meta.id}/outs/*"
ontologies: []
- versions:
- versions.yml:
type: file
description: File containing software version
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
authors:
- "@kbattenb"
- "@tomkellygenetics"
Expand Down
88 changes: 88 additions & 0 deletions modules/nf-core/universc/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "cellranger"
tag "cellranger/mkgtf"
tag "cellranger/mkref"
tag "universc"

setup {
run("CELLRANGER_MKGTF") {
script "../../cellranger/mkgtf/main.nf"

process {
"""
input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf',checkIfExists:true)
"""
}
}

run("CELLRANGER_MKREF") {
script "../../cellranger/mkref/main.nf"

process {
"""
input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta',checkIfExists:true)
input[1] = CELLRANGER_MKGTF.out.gtf
input[2] = "homo_sapiens_chr22_reference"
"""
}
}
}

test("test_universc_10x") {

when {
params {
module_args = ''
}
process {
"""
input[0] = [[id:'123',technology:'10x',chemistry:'SC3Pv3',single_end:false,strandedness:'forward',samples:["test_10x"]],// meta map
[file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/cellranger/10k_pbmc_cmo/fastqs/gex_1/subsampled_SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K_1_gex_S2_L001_R1_001.fastq.gz',checkIfExists:true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/cellranger/10k_pbmc_cmo/fastqs/gex_1/subsampled_SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K_1_gex_S2_L001_R2_001.fastq.gz',checkIfExists:true)
]
]
input[1] = CELLRANGER_MKREF.out.reference
"""
}
}
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}


test("test_universc_10x -- stub") {
options '-stub'
when {
params {
module_args = ''
}
process {
"""
input[0] = [[id:'123',technology:'10x',chemistry:'SC3Pv3',single_end:false,strandedness:'forward',samples:["test_10x"]],// meta map
[file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/cellranger/10k_pbmc_cmo/fastqs/gex_1/subsampled_SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K_1_gex_S2_L001_R1_001.fastq.gz',checkIfExists:true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/cellranger/10k_pbmc_cmo/fastqs/gex_1/subsampled_SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K_1_gex_S2_L001_R2_001.fastq.gz',checkIfExists:true)
]
]
input[1] = CELLRANGER_MKREF.out.reference
"""
}
}
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}
}
104 changes: 104 additions & 0 deletions modules/nf-core/universc/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"test_universc_10x": {
"content": [
{
"0": [
[
{
"id": "123",
"technology": "10x",
"chemistry": "SC3Pv3",
"single_end": false,
"strandedness": "forward",
"samples": [
"test_10x"
]
},
[
"_err:md5,92544b75bfe4ad17becb3fa17b83dac9",
"_invocation:md5,adbbbc1027756be9fdeebabf979863e5",
"_log:md5,f4ab003ca08293ce9a80a2b2a3b25749"
]
]
],
"1": [
"versions.yml:md5,70bfcfea05b26a198a980e8b0eabb348"
],
"outs": [
[
{
"id": "123",
"technology": "10x",
"chemistry": "SC3Pv3",
"single_end": false,
"strandedness": "forward",
"samples": [
"test_10x"
]
},
[
"_err:md5,92544b75bfe4ad17becb3fa17b83dac9",
"_invocation:md5,adbbbc1027756be9fdeebabf979863e5",
"_log:md5,f4ab003ca08293ce9a80a2b2a3b25749"
]
]
],
"versions": [
"versions.yml:md5,70bfcfea05b26a198a980e8b0eabb348"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
},
"timestamp": "2025-05-14T15:52:03.725881758"
},
"test_universc_10x -- stub": {
"content": [
{
"0": [
[
{
"id": "123",
"technology": "10x",
"chemistry": "SC3Pv3",
"single_end": false,
"strandedness": "forward",
"samples": [
"test_10x"
]
},
"fake_file.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,70bfcfea05b26a198a980e8b0eabb348"
],
"outs": [
[
{
"id": "123",
"technology": "10x",
"chemistry": "SC3Pv3",
"single_end": false,
"strandedness": "forward",
"samples": [
"test_10x"
]
},
"fake_file.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,70bfcfea05b26a198a980e8b0eabb348"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
},
"timestamp": "2025-05-14T15:52:10.667692329"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ ultra/align:
ultra/index:
- modules/nf-core/ultra/index/**
- tests/modules/nf-core/ultra/index/**
universc:
- modules/nf-core/universc/**
- tests/modules/nf-core/universc/**
varlociraptor/callvariants:
- modules/nf-core/varlociraptor/callvariants/**
- tests/modules/nf-core/varlociraptor/callvariants/**
33 changes: 0 additions & 33 deletions tests/modules/nf-core/universc/main.nf

This file was deleted.

17 changes: 0 additions & 17 deletions tests/modules/nf-core/universc/nextflow.config

This file was deleted.

68 changes: 0 additions & 68 deletions tests/modules/nf-core/universc/test.yml

This file was deleted.

Loading