Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0570f28
Start updating FastK modules to allow conda
prototaxites Mar 18, 2025
8201768
Migrate all Merquryfk modules to nf-test
prototaxites Mar 18, 2025
a3682e5
Update to container with explicit R
prototaxites Mar 18, 2025
40efb3f
Merge branch 'nf-core:master' into merquryfk
prototaxites Mar 18, 2025
7fafd8c
Fix container for FastK
prototaxites Mar 18, 2025
3375956
Start fixing fastk modules
prototaxites Mar 18, 2025
e5fd9dc
Fix FastK tests, add merquryfk/hapmaker module
prototaxites Mar 19, 2025
81ebf7d
Fix linting for some merquryFK modules
prototaxites Mar 19, 2025
14fe121
Fix merquryfk/merquryfk linting
prototaxites Mar 19, 2025
a7357aa
Fix linting for everything except hapmaker
prototaxites Mar 19, 2025
e40d01c
Merge branch 'master' into merquryfk
prototaxites Mar 19, 2025
d0d668f
Fix snapshots?
prototaxites Mar 19, 2025
4e9d130
Update tests
prototaxites Mar 19, 2025
9c5cb46
Fix tests pt 1000
prototaxites Mar 19, 2025
8ad6b4b
Sort fastk/merge test inputs to try and ensure repeatability
prototaxites Mar 19, 2025
ad573f4
Rename output channels to avoid linting error
prototaxites Mar 19, 2025
7a3af97
Fix hapmaker snapshot
prototaxites Mar 19, 2025
771847e
Harshill alignment
prototaxites Mar 20, 2025
49eb228
Stub output format determined by args; add details to meta.yml files …
prototaxites Mar 20, 2025
c78bbc5
Merge branch 'master' into merquryfk
prototaxites Mar 20, 2025
fa59e18
Remove def again from variables - causes error otherwise
prototaxites Mar 20, 2025
0b9db11
Fix Fastk/merge stub
prototaxites Mar 20, 2025
5433a3e
Update snapshot
prototaxites Mar 20, 2025
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/fastk/fastk/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::false_flag
- bioconda::fastk=1.1.0
20 changes: 7 additions & 13 deletions modules/nf-core/fastk/fastk/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ process FASTK_FASTK {
label 'process_medium'

// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
container 'ghcr.io/nbisweden/fastk_genescopefk_merquryfk:1.2'
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9f/9f0bee9bfacd05665a9b1a11dd087dbf1be41ac3e640931c38c914a2390642cf/data' :
'community.wave.seqera.io/library/fastk_merquryfk_r-cowplot_r-ggplot2_r-viridis:f9994edc2270683c' }"

input:
tuple val(meta), path(reads)
Expand All @@ -18,13 +21,9 @@ process FASTK_FASTK {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "FASTK_FASTK module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FASTK_VERSION = 'f18a4e6d2207539f7b84461daebc54530a9559b0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def FASTK_VERSION = '1.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
FastK \\
$args \\
Expand All @@ -33,8 +32,7 @@ process FASTK_FASTK {
-N${prefix}_fk \\
$reads

find . -name '*.ktab*' \\
| xargs chmod a+r
find . -name '*.ktab*' -exec chmod a+r {} \\;

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -43,13 +41,9 @@ process FASTK_FASTK {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "FASTK_FASTK module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FASTK_VERSION = 'f18a4e6d2207539f7b84461daebc54530a9559b0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def FASTK_VERSION = '1.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.

def touch_ktab = args.contains('-t') ? "touch ${prefix}_fk.ktab .${prefix}_fk.ktab.1" : ''
def touch_prof = args.contains('-p') ? "touch ${prefix}_fk.prof .${prefix}_fk.pidx.1" : ''
Expand Down
40 changes: 20 additions & 20 deletions modules/nf-core/fastk/fastk/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
],
"3": [
"versions.yml:md5,c216a1608924d1662d2086e1de1d5abd"
"versions.yml:md5,daf09d9a1bb60ca0f25555f973d5c0c6"
],
"hist": [
[
Expand Down Expand Up @@ -72,15 +72,15 @@
]
],
"versions": [
"versions.yml:md5,c216a1608924d1662d2086e1de1d5abd"
"versions.yml:md5,daf09d9a1bb60ca0f25555f973d5c0c6"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2024-05-18T19:39:28.510263"
"timestamp": "2025-03-18T17:01:17.068843951"
},
"test_fastk_fastk_single_end": {
"content": [
Expand Down Expand Up @@ -121,7 +121,7 @@
]
],
"3": [
"versions.yml:md5,c216a1608924d1662d2086e1de1d5abd"
"versions.yml:md5,daf09d9a1bb60ca0f25555f973d5c0c6"
],
"hist": [
[
Expand Down Expand Up @@ -159,15 +159,15 @@
]
],
"versions": [
"versions.yml:md5,c216a1608924d1662d2086e1de1d5abd"
"versions.yml:md5,daf09d9a1bb60ca0f25555f973d5c0c6"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2024-05-18T19:31:31.128388"
"timestamp": "2025-03-18T17:00:45.285904182"
},
"test_fastk_fastk_paired_end": {
"content": [
Expand Down Expand Up @@ -210,7 +210,7 @@
]
],
"3": [
"versions.yml:md5,c216a1608924d1662d2086e1de1d5abd"
"versions.yml:md5,daf09d9a1bb60ca0f25555f973d5c0c6"
],
"hist": [
[
Expand Down Expand Up @@ -250,15 +250,15 @@
]
],
"versions": [
"versions.yml:md5,c216a1608924d1662d2086e1de1d5abd"
"versions.yml:md5,daf09d9a1bb60ca0f25555f973d5c0c6"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2024-05-18T19:31:35.565502"
"timestamp": "2025-03-18T17:00:56.994942898"
},
"test_fastk_fastk_paired_end_stub": {
"content": [
Expand Down Expand Up @@ -297,7 +297,7 @@
]
],
"3": [
"versions.yml:md5,c216a1608924d1662d2086e1de1d5abd"
"versions.yml:md5,daf09d9a1bb60ca0f25555f973d5c0c6"
],
"hist": [
[
Expand Down Expand Up @@ -333,14 +333,14 @@
]
],
"versions": [
"versions.yml:md5,c216a1608924d1662d2086e1de1d5abd"
"versions.yml:md5,daf09d9a1bb60ca0f25555f973d5c0c6"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2024-05-18T19:39:32.570957"
"timestamp": "2025-03-18T17:01:29.548661612"
}
}
7 changes: 7 additions & 0 deletions modules/nf-core/fastk/histex/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::fastk=1.1.0
23 changes: 17 additions & 6 deletions modules/nf-core/fastk/histex/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ process FASTK_HISTEX {
label 'process_low'

// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
container 'ghcr.io/nbisweden/fastk_genescopefk_merquryfk:1.2'
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9f/9f0bee9bfacd05665a9b1a11dd087dbf1be41ac3e640931c38c914a2390642cf/data' :
'community.wave.seqera.io/library/fastk_merquryfk_r-cowplot_r-ggplot2_r-viridis:f9994edc2270683c' }"

input:
tuple val(meta), path(histogram)
Expand All @@ -16,13 +19,9 @@ process FASTK_HISTEX {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "FASTK_HISTEX module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FASTK_VERSION = 'f18a4e6d2207539f7b84461daebc54530a9559b0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def FASTK_VERSION = '1.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
Histex \\
$args \\
Expand All @@ -34,4 +33,16 @@ process FASTK_HISTEX {
fastk: $FASTK_VERSION
END_VERSIONS
"""

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

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

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

tag "modules"
tag "modules_nfcore"
tag "fastk"
tag "fastk/fastk"
tag "fastk/histex"

setup {
run("FASTK_FASTK") {
script "../../fastk/"
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
]
"""
}
}
}

test("homo_sapiens - Illumina") {

when {
process {
"""
input[0] = FASTK_FASTK.out.hist
"""
}
}

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

}

test("homo_sapiens - Illumina - stub") {

options '-stub'

when {

process {
"""
input[0] = FASTK_FASTK.out.hist
"""
}
}

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

}

}
72 changes: 72 additions & 0 deletions modules/nf-core/fastk/histex/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"homo_sapiens - Illumina - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.hist:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,c341f76b03e55e3eaaadc0bad07674e0"
],
"hist": [
[
{
"id": "test",
"single_end": false
},
"test.hist:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,c341f76b03e55e3eaaadc0bad07674e0"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-18T17:03:13.01032408"
},
"homo_sapiens - Illumina": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.hist:md5,afd7d60759c76f23d80b3b75b1ceed7f"
]
],
"1": [
"versions.yml:md5,c341f76b03e55e3eaaadc0bad07674e0"
],
"hist": [
[
{
"id": "test",
"single_end": false
},
"test.hist:md5,afd7d60759c76f23d80b3b75b1ceed7f"
]
],
"versions": [
"versions.yml:md5,c341f76b03e55e3eaaadc0bad07674e0"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-19T08:55:19.961441005"
}
}
7 changes: 7 additions & 0 deletions modules/nf-core/fastk/merge/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::fastk=1.1.0
Loading
Loading