Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
2 changes: 1 addition & 1 deletion modules/nf-core/stranger/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- bioconda::stranger=0.8.1
- bioconda::stranger=0.9.0
6 changes: 3 additions & 3 deletions modules/nf-core/stranger/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process STRANGER {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/stranger:0.8.1--pyh5e36f6f_0':
'biocontainers/stranger:0.8.1--pyh5e36f6f_0' }"
'https://depot.galaxyproject.org/singularity/stranger:0.9.0--pyh7cba7a3_0':
'biocontainers/stranger:0.9.0--pyh7cba7a3_0' }"

input:
tuple val(meta), path(vcf)
Expand Down Expand Up @@ -37,7 +37,7 @@ process STRANGER {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.vcf.gz
echo "" | gzip > ${prefix}.vcf.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
82 changes: 82 additions & 0 deletions modules/nf-core/stranger/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
nextflow_process {

name "Test Process STRANGER"
script "../main.nf"
process "STRANGER"
config "./nextflow.config"

tag "modules"
tag "modules_nfcore"
tag "stranger"
tag "expansionhunter"

setup {
run("EXPANSIONHUNTER") {
script "../../expansionhunter/main.nf"
process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
]
input[1] = [
[id:'fasta'],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
]
input[2] = [
[id:'fai'],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
]
input[3] = [
[id:'catalogue'],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/loci/repeat_expansions.json', checkIfExists: true)
]
"""
}
}
}

test("homo_sapiens - vcf, repeat_catalogue") {

when {
process {
"""
input[0] = EXPANSIONHUNTER.out.vcf
input[1] = [
[id:'catalogue'],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/loci/repeat_expansions.json', checkIfExists: true)
]
"""
}
}

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

}

test("homo_sapiens - vcf, repeat_catalogue - stub") {

options "-stub"

when {
process {
"""
input[0] = EXPANSIONHUNTER.out.vcf
input[1] = [
[id:'catalogue'],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/loci/repeat_expansions.json', checkIfExists: true)
]
"""
}
}

then {
assert process.success
assert snapshot(process.out).match()
}
}
}
68 changes: 68 additions & 0 deletions modules/nf-core/stranger/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"homo_sapiens - vcf, repeat_catalogue - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"stranger.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"1": [
"versions.yml:md5,369e472eaaf24bf7d154b41bc731ac50"
],
"vcf": [
[
{
"id": "test"
},
"stranger.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"versions": [
"versions.yml:md5,369e472eaaf24bf7d154b41bc731ac50"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-06-24T06:58:08.232701026"
},
"homo_sapiens - vcf, repeat_catalogue": {
"content": [
{
"0": [
[
{
"id": "test"
},
"stranger.vcf.gz:md5,bce108ecdcff045eebd6cf831be9b5a8"
]
],
"1": [
"versions.yml:md5,369e472eaaf24bf7d154b41bc731ac50"
],
"vcf": [
[
{
"id": "test"
},
"stranger.vcf.gz:md5,bce108ecdcff045eebd6cf831be9b5a8"
]
],
"versions": [
"versions.yml:md5,369e472eaaf24bf7d154b41bc731ac50"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-06-24T06:57:54.749238699"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/stranger/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise the input vcf and output will be named the same.

withName: 'STRANGER' {
ext.prefix = "stranger"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/stranger/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
stranger:
- "modules/nf-core/stranger/**"
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1642,9 +1642,6 @@ stecfinder:
stitch:
- modules/nf-core/stitch/**
- tests/modules/nf-core/stitch/**
stranger:
- modules/nf-core/stranger/**
- tests/modules/nf-core/stranger/**
subworkflows/align_bowtie2:
- subworkflows/nf-core/align_bowtie2/**
- tests/subworkflows/nf-core/align_bowtie2/**
Expand Down
31 changes: 0 additions & 31 deletions tests/modules/nf-core/stranger/main.nf

This file was deleted.

9 changes: 0 additions & 9 deletions tests/modules/nf-core/stranger/nextflow.config

This file was deleted.

27 changes: 0 additions & 27 deletions tests/modules/nf-core/stranger/test.yml

This file was deleted.