Skip to content

Commit

Permalink
Merge branch 'master' into star-update-module
Browse files Browse the repository at this point in the history
  • Loading branch information
rannick authored Oct 7, 2024
2 parents b506e13 + f8ee14d commit 20757b2
Show file tree
Hide file tree
Showing 21 changed files with 304 additions and 1,136 deletions.
1,116 changes: 13 additions & 1,103 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/nf-core/genmod/annotate/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::genmod=3.8.2
- bioconda::genmod=3.8.3
4 changes: 2 additions & 2 deletions modules/nf-core/genmod/annotate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GENMOD_ANNOTATE {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/genmod:3.8.2--pyhdfd78af_0':
'biocontainers/genmod:3.8.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/genmod:3.8.3--pyhdfd78af_0':
'biocontainers/genmod:3.8.3--pyhdfd78af_0' }"

input:
tuple val(meta), path(input_vcf)
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/genmod/compound/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::genmod=3.8.2
- bioconda::genmod=3.8.3
4 changes: 2 additions & 2 deletions modules/nf-core/genmod/compound/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GENMOD_COMPOUND {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/genmod:3.8.2--pyhdfd78af_0':
'biocontainers/genmod:3.8.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/genmod:3.8.3--pyhdfd78af_0':
'biocontainers/genmod:3.8.3--pyhdfd78af_0' }"

input:
tuple val(meta), path(input_vcf)
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/genmod/models/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::genmod=3.8.2
- bioconda::genmod=3.8.3
4 changes: 2 additions & 2 deletions modules/nf-core/genmod/models/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GENMOD_MODELS {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/genmod:3.8.2--pyhdfd78af_0':
'biocontainers/genmod:3.8.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/genmod:3.8.3--pyhdfd78af_0':
'biocontainers/genmod:3.8.3--pyhdfd78af_0' }"

input:
tuple val(meta), path(input_vcf)
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/genmod/score/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::genmod=3.8.2
- bioconda::genmod=3.8.3
4 changes: 2 additions & 2 deletions modules/nf-core/genmod/score/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GENMOD_SCORE {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/genmod:3.8.2--pyhdfd78af_0':
'biocontainers/genmod:3.8.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/genmod:3.8.3--pyhdfd78af_0':
'biocontainers/genmod:3.8.3--pyhdfd78af_0' }"

input:
tuple val(meta), path(input_vcf)
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/longphase/haplotag/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ process LONGPHASE_HAPLOTAG {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def sv_file = params.svs ? "--sv-file ${svs}" : ""
def mod_file = params.mods ? "--mod-file ${mods}" : ""
def sv_file = svs ? "--sv-file ${svs}" : ""
def mod_file = mods ? "--mod-file ${mods}" : ""

"""
longphase \\
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/longphase/haplotag/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@
"@RG\tID:test\tSM:test",
"@PG\tID:minimap2\tPN:minimap2\tVN:2.28-r1209\tCL:minimap2 -y -x map-ont --secondary=no -R @RG\\tID:test\\tSM:test -t 30 -a genome.mmi test.bam_other.fastq.gz",
"@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.19.2\tCL:samtools sort -@ 29 -o test.bam_other.fastq.gz.bam --write-index",
"@PG\tID:longphase\tPN:longphase\tPP:samtools\tVN:1.7.3\tCL:longphase haplotag --threads 2 -o test --reference genome.fasta --snp-file test.genome.vcf.gz --bam test.sorted.bam "
"@PG\tID:longphase\tPN:longphase\tPP:samtools\tVN:1.7.3\tCL:longphase haplotag --threads 2 -o test --reference genome.fasta --snp-file test.genome.vcf.gz --bam test.sorted.bam --sv-file NA24385_sv.vcf.gz "
],
"721264eb2824a3146b331f2532d10180"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-07-25T09:13:39.901419316"
"timestamp": "2024-10-04T13:39:33.50395694"
},
"[ bam, bai, snps, [], [] ], fasta, fai - log & cram": {
"content": [
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/longphase/phase/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ process LONGPHASE_PHASE {
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def sv_file = params.svs ? "--sv-file ${svs}" : ""
def mod_file = params.mods ? "--mod-file ${mods}" : ""
def sv_file = svs ? "--sv-file ${svs}" : ""
def mod_file = mods ? "--mod-file ${mods}" : ""

def bamList = []
for (file in bam) {
Expand Down
20 changes: 10 additions & 10 deletions modules/nf-core/longphase/phase/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{
"id": "test"
},
"test.vcf.gz:md5,fd2d21056b2de4722f12d5e883d9cb0a"
"test.vcf.gz:md5,b0a3effd6e076edbe7e2f1f7cfff547c"
]
],
"1": [
Expand All @@ -51,7 +51,7 @@
{
"id": "test"
},
"test.vcf.gz:md5,fd2d21056b2de4722f12d5e883d9cb0a"
"test.vcf.gz:md5,b0a3effd6e076edbe7e2f1f7cfff547c"
]
],
"versions": [
Expand All @@ -60,10 +60,10 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-07-22T12:14:39.961315592"
"timestamp": "2024-10-04T13:37:16.921910004"
},
"[ bam x2, bai x2, snps, svs, [] ], fasta, fai": {
"content": [
Expand All @@ -73,7 +73,7 @@
{
"id": "test"
},
"test.vcf.gz:md5,3ced25dc8c1ec0a7c64481c8a163d687"
"test.vcf.gz:md5,04905b6042998e592c9f3b887ae9e09c"
]
],
"1": [
Expand All @@ -84,7 +84,7 @@
{
"id": "test"
},
"test.vcf.gz:md5,3ced25dc8c1ec0a7c64481c8a163d687"
"test.vcf.gz:md5,04905b6042998e592c9f3b887ae9e09c"
]
],
"versions": [
Expand All @@ -93,10 +93,10 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-07-22T12:15:07.970597495"
"timestamp": "2024-10-04T13:37:23.41768963"
},
"[ bam, bai, snps, [], [] ], fasta, fai - stub": {
"content": [
Expand Down
5 changes: 5 additions & 0 deletions modules/nf-core/motus/preplong/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::motus=3.1.0
53 changes: 53 additions & 0 deletions modules/nf-core/motus/preplong/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
process MOTUS_PREPLONG {
tag "$meta.id"
label 'process_single'

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

input:
tuple val(meta), path(reads)
path db

output:
tuple val(meta), path("*.gz"), emit: out
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def refdb = db ? "-db ${db}" : ""

"""
motus \\
prep_long \\
$args \\
-i $reads \\
$refdb \\
-t $task.cpus \\
-o ${prefix}.gz \\
2> >(tee ${prefix}.log >&2)
cat <<-END_VERSIONS > versions.yml
"${task.process}":
motus: \$(motus --version 2>&1 | sed 's/.* \\([0-9]*\\.[0-9]*\\.[0-9]*\\) .*/\\1/')
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo '' | gzip > ${prefix}.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
motus: \$(motus --version 2>&1 | sed 's/.* \\([0-9]*\\.[0-9]*\\.[0-9]*\\) .*/\\1/')
END_VERSIONS
"""
}
52 changes: 52 additions & 0 deletions modules/nf-core/motus/preplong/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "motus_preplong"
description: Taxonomic meta-omics profiling using universal marker genes
keywords:
- classify
- metagenomics
- fastq
- taxonomic profiling
tools:
- "motus":
description: "Marker gene-based operational taxonomic unit (mOTU) profiling"
homepage: "https://motu-tool.org/"
documentation: "https://github.com/motu-tool/mOTUs/wiki"
tool_dev_url: "https://github.com/motu-tool/mOTUs"
doi: "10.1186/s40168-022-01410-z"
licence: ["GPL v3"]

input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- reads:
type: file
description: Long read file to convert, can be fasta(.gz) or fastq(.gz)
pattern: "*.{gz}"
- - db:
type: directory
description: |
mOTUs database downloaded by `motus downloadDB`
pattern: "db_mOTU/"
output:
- out:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- "*.gz":
type: file
description: converted file (gzipped), ready to be used by motus profile
pattern: "*.gz"
- versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"

authors:
- "@sofstam"
maintainers:
- "@sofstam"
75 changes: 75 additions & 0 deletions modules/nf-core/motus/preplong/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "motus"
tag "motus/downloaddb"
tag "motus/preplong"

setup {
run("MOTUS_DOWNLOADDB") {
script "modules/nf-core/motus/downloaddb/main.nf"
process {
"""
input[0] = Channel.of([
file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py')
])
"""
}
}
}

test("sarscov2 - fasta") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test_2.fastq.gz', checkIfExists: true)
]
input[1] = MOTUS_DOWNLOADDB.out.db
"""
}
}

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

}

test("sarscov2 - fasta - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test_2.fastq.gz', checkIfExists: true)
]
input[1] = MOTUS_DOWNLOADDB.out.db
"""
}
}

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


}

}
Loading

0 comments on commit 20757b2

Please sign in to comment.