Skip to content

Commit

Permalink
use conda-forge instead of anaconda (#5626)
Browse files Browse the repository at this point in the history
* use conda-forge instead of anaconda

* Update modules/nf-core/homer/maketagdirectory/environment.yml

Co-authored-by: Phil Ewels <phil.ewels@seqera.io>

* nf-test homer/findpeaks

* nf-test homer/maketagdirectory

* nf-test homer/pos2bed

* fix perl version?

* Update modules/nf-core/gawk/environment.yml

Co-authored-by: Phil Ewels <phil.ewels@seqera.io>

* fix gawk

---------

Co-authored-by: Phil Ewels <phil.ewels@seqera.io>
  • Loading branch information
nvnieuwk and ewels authored May 17, 2024
1 parent 7948029 commit cf3ed07
Show file tree
Hide file tree
Showing 28 changed files with 616 additions and 197 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/cadd/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ channels:
- defaults
dependencies:
- bioconda::cadd-scripts=1.6.post1
- anaconda::conda=4.14.0
- conda-forge::conda=4.14.0
- conda-forge::mamba=1.4.0
2 changes: 1 addition & 1 deletion modules/nf-core/gawk/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- anaconda::gawk=5.1.0
- conda-forge::gawk=5.3.0
4 changes: 2 additions & 2 deletions modules/nf-core/gawk/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GAWK {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gawk:5.1.0' :
'biocontainers/gawk:5.1.0' }"
'https://depot.galaxyproject.org/singularity/gawk:5.3.0' :
'biocontainers/gawk:5.3.0' }"

input:
tuple val(meta), path(input)
Expand Down
16 changes: 8 additions & 8 deletions modules/nf-core/gawk/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]
],
"1": [
"versions.yml:md5,4c320d8c98ca80690afd7651da1ba520"
"versions.yml:md5,842acc9870dc8ac280954047cb2aa23a"
],
"output": [
[
Expand All @@ -22,15 +22,15 @@
]
],
"versions": [
"versions.yml:md5,4c320d8c98ca80690afd7651da1ba520"
"versions.yml:md5,842acc9870dc8ac280954047cb2aa23a"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.02.0"
"nextflow": "24.03.0"
},
"timestamp": "2024-04-05T11:00:28.097563"
"timestamp": "2024-05-17T15:20:02.495430346"
},
"convert fasta to bed": {
"content": [
Expand All @@ -44,7 +44,7 @@
]
],
"1": [
"versions.yml:md5,4c320d8c98ca80690afd7651da1ba520"
"versions.yml:md5,842acc9870dc8ac280954047cb2aa23a"
],
"output": [
[
Expand All @@ -55,14 +55,14 @@
]
],
"versions": [
"versions.yml:md5,4c320d8c98ca80690afd7651da1ba520"
"versions.yml:md5,842acc9870dc8ac280954047cb2aa23a"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.02.0"
"nextflow": "24.03.0"
},
"timestamp": "2024-04-05T10:28:15.625869"
"timestamp": "2024-05-17T15:19:53.291809648"
}
}
13 changes: 13 additions & 0 deletions modules/nf-core/homer/findpeaks/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,17 @@ process HOMER_FINDPEAKS {
homer: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '4.11' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.

"""
touch ${prefix}.peaks.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
homer: $VERSION
END_VERSIONS
"""
}
73 changes: 73 additions & 0 deletions modules/nf-core/homer/findpeaks/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "homer"
tag "homer/findpeaks"
tag "homer/maketagdirectory"

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

}

test("sarscov2 - tagdir") {

when {
process {
"""
input[0] = HOMER_MAKETAGDIRECTORY.out.tagdir
"""
}
}

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

}

test("sarscov2 - tagdir - stub") {

options "-stub"

when {
process {
"""
input[0] = HOMER_MAKETAGDIRECTORY.out.tagdir
"""
}
}

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

}

}
68 changes: 68 additions & 0 deletions modules/nf-core/homer/findpeaks/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.peaks.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa"
],
"txt": [
[
{
"id": "test"
},
"test.peaks.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.03.0"
},
"timestamp": "2024-05-17T13:57:52.208349083"
},
"tagdir": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.peaks.txt:md5,86e15beaa4b439585786478e58418c0c"
]
],
"1": [
"versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa"
],
"txt": [
[
{
"id": "test"
},
"test.peaks.txt:md5,86e15beaa4b439585786478e58418c0c"
]
],
"versions": [
"versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.03.0"
},
"timestamp": "2024-05-17T13:56:22.119853182"
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

withName: HOMER_MAKETAGDIRECTORY {
ext.args = '-format bed'
}

withName: HOMER_FINDPEAKS {
ext.args = '-style factor'
}

}
2 changes: 2 additions & 0 deletions modules/nf-core/homer/findpeaks/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
homer/findpeaks:
- "modules/nf-core/homer/findpeaks/**"
2 changes: 1 addition & 1 deletion modules/nf-core/homer/maketagdirectory/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dependencies:
- conda-forge::r-base=4.0.2
- bioconda::bioconductor-deseq2=1.30.0
- bioconda::bioconductor-edger=3.32.0
- anaconda::perl=5.26.2
- conda-forge::perl=5.26.2
3 changes: 3 additions & 0 deletions modules/nf-core/homer/maketagdirectory/tests/bed.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process {
ext.args = '-format bed'
}
97 changes: 97 additions & 0 deletions modules/nf-core/homer/maketagdirectory/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "homer"
tag "homer/maketagdirectory"

test("sarscov2 - [bed, bed], fasta") {

config "./bed.config"

when {
process {
"""
input[0] = [
[ id:'test' ],
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test2.bed', checkIfExists: true)
]
]
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
"""
}
}

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

}

test("sarscov2 - [bam, bam], fasta") {

config "./sam.config"

when {
process {
"""
input[0] = [
[ id:'test' ],
[
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)
]
]
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
"""
}
}

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

}

test("sarscov2 - [bed, bed], fasta - stub") {

config "./bed.config"
options "-stub"

when {
process {
"""
input[0] = [
[ id:'test' ],
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test2.bed', checkIfExists: true)
]
]
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
"""
}
}

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

}

}
Loading

0 comments on commit cf3ed07

Please sign in to comment.