Skip to content
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

Concoct/concoctcoveragetable modules updates #5868

Merged
merged 5 commits into from
Jun 21, 2024
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
16 changes: 14 additions & 2 deletions modules/nf-core/concoct/concoctcoveragetable/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ process CONCOCT_CONCOCTCOVERAGETABLE {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/concoct:1.1.0--py311h245ed52_4':
'biocontainers/concoct:1.1.0--py311h245ed52_4' }"
'https://depot.galaxyproject.org/singularity/concoct:1.1.0--py312h245ed52_6':
'biocontainers/concoct:1.1.0--py312h245ed52_6' }"

input:
tuple val(meta), path(bed), path(bamfiles), path(baifiles)
Expand All @@ -33,4 +33,16 @@ process CONCOCT_CONCOCTCOVERAGETABLE {
concoct: \$(echo \$(concoct --version 2>&1) | sed 's/concoct //g' )
END_VERSIONS
"""

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
concoct: \$(echo \$(concoct --version 2>&1) | sed 's/concoct //g' )
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion modules/nf-core/concoct/concoctcoveragetable/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tools:
documentation: "https://concoct.readthedocs.io/en/latest/index.html"
tool_dev_url: "https://github.com/BinPro/CONCOCT"
doi: "10.1038/nmeth.3103"
licence: "['FreeBSD']"
licence: ["FreeBSD"]
input:
- meta:
type: map
Expand Down
99 changes: 99 additions & 0 deletions modules/nf-core/concoct/concoctcoveragetable/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "concoct"
tag "concoct/concoctcoveragetable"
tag "concoct/cutupfasta"

setup {
run("CONCOCT_CUTUPFASTA") {
script "../../cutupfasta/main.nf"
process {
"""
input[0] = [
[id: 'test', single_end: false],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
input[1] = true
"""
}
}
}

test("sarscov2 - bam") {

when {
process {
"""
ch_bam_input = Channel
.fromList([
[
[ id:'test', single_end:false ], // meta map
[
file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/bam/test.single_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true)
],
[
file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/bam/test.single_end.sorted.bam.bai', checkIfExists: true),
file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
]
]
])


input[0] = CONCOCT_CUTUPFASTA.out.bed.join( ch_bam_input )
"""
}
}

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

}

test("sarscov2 - bam - stub") {

options "-stub"

when {
process {
"""
ch_bam_input = Channel
.fromList([
[
[ id:'test', single_end:false ], // meta map
[
file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/bam/test.single_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true)
],
[
file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/bam/test.single_end.sorted.bam.bai', checkIfExists: true),
file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
]
]
])

input[0] = CONCOCT_CUTUPFASTA.out.bed.join( ch_bam_input )
"""
}
}

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

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"sarscov2 - bam - stub": {
"content": [
{
"0": [

],
"1": [

],
"tsv": [

],
"versions": [

]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-06-21T16:02:03.884676509"
},
"sarscov2 - bam": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,0183c95ec03d2a6c83a4ca82935308a4"
]
],
"1": [
"versions.yml:md5,156a9a23e05b34188d03d52b39fae343"
],
"tsv": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,0183c95ec03d2a6c83a4ca82935308a4"
]
],
"versions": [
"versions.yml:md5,156a9a23e05b34188d03d52b39fae343"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-06-21T15:59:09.328659542"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/concoct/concoctcoveragetable/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
concoct/concoctcoveragetable:
- "modules/nf-core/concoct/concoctcoveragetable/**"
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,6 @@ cnvnator/convert2vcf:
concoct/concoct:
- modules/nf-core/concoct/concoct/**
- tests/modules/nf-core/concoct/concoct/**
concoct/concoctcoveragetable:
- modules/nf-core/concoct/concoctcoveragetable/**
- tests/modules/nf-core/concoct/concoctcoveragetable/**
concoct/extractfastabins:
- modules/nf-core/concoct/extractfastabins/**
- tests/modules/nf-core/concoct/extractfastabins/**
Expand Down
35 changes: 0 additions & 35 deletions tests/modules/nf-core/concoct/concoctcoveragetable/main.nf

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions tests/modules/nf-core/concoct/concoctcoveragetable/test.yml

This file was deleted.

Loading