Skip to content

Commit

Permalink
Merge branch 'master' into nf-test_phispy
Browse files Browse the repository at this point in the history
* master:
  Migrate meryl unionsum nftest (#5404)
  Adding Fast epistasis module  (#5389)
  corrected bug in asereadcounter (#5403)
  Meryl count and meryl histogram migration to nf-test (#5401)
  • Loading branch information
jvfe committed Mar 27, 2024
2 parents b4ee797 + b7f584e commit 251f94d
Show file tree
Hide file tree
Showing 41 changed files with 1,949 additions and 184 deletions.
11 changes: 5 additions & 6 deletions modules/nf-core/gatk4/asereadcounter/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ process GATK4_ASEREADCOUNTER {
'biocontainers/gatk4:4.5.0.0--py36hdfd78af_0' }"

input:
tuple val(meta), path(input), path(input_index)
tuple val(meta2), path(vcf), path(tbi)
tuple val(meta3), path(fasta)
tuple val(meta4), path(fai)
tuple val(meta5), path(dict)
tuple val(meta), path(bam), path(bai), path(vcf), path(tbi)
tuple val(meta2), path(fasta)
tuple val(meta3), path(fai)
tuple val(meta4), path(dict)
path intervals

output:
Expand All @@ -39,7 +38,7 @@ process GATK4_ASEREADCOUNTER {
gatk --java-options "-Xmx${avail_mem}M -XX:-UsePerfData" \\
ASEReadCounter \\
--output ${prefix}_ase.csv \\
--input ${input} \\
--input ${bam} \\
--variant ${vcf} \\
$reference_command \\
$intervals_command \\
Expand Down
13 changes: 5 additions & 8 deletions modules/nf-core/gatk4/asereadcounter/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,23 @@ nextflow_process {
input[0] = [
[ id:'test' ], // meta map
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.paired_end.sorted.bam.bai', checkIfExists: true)
]
input[1] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path +'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
file(params.modules_testdata_base_path +'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true),
file(params.modules_testdata_base_path +'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)
]
input[2] = [
input[1] = [
[ id:'reference' ], // meta map
file(params.modules_testdata_base_path +'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
input[3] = [
input[2] = [
[ id:'reference' ], // meta map
file(params.modules_testdata_base_path +'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
]
input[4] = [
input[3] = [
[ id:'reference' ], // meta map
file(params.modules_testdata_base_path +'genomics/sarscov2/genome/genome.dict', checkIfExists: true)
]
input[5] = [
input[4] = [
file(params.modules_testdata_base_path +'genomics/sarscov2/genome/picard/targets.interval_list', checkIfExists: true)
]
"""
Expand Down
11 changes: 3 additions & 8 deletions modules/nf-core/gatk4/asereadcounter/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ input:
type: file
description: index file for input file
pattern: "*.{bai,crai}"
- meta2:
type: map
description: |
Groovy Map containing reference information
e.g. `[ id:'reference' ]`
- vcf:
type: file
description: VCF file
Expand All @@ -42,7 +37,7 @@ input:
type: file
description: index file for VCF file
pattern: "*.{vcf.gz.tbi}"
- meta3:
- meta2:
type: map
description: |
Groovy Map containing reference information
Expand All @@ -51,7 +46,7 @@ input:
type: file
description: fasta file
pattern: "*.{fasta,fa}"
- meta4:
- meta3:
type: map
description: |
Groovy Map containing reference information
Expand All @@ -60,7 +55,7 @@ input:
type: file
description: fasta index file
pattern: "*.{fai}"
- meta5:
- meta4:
type: map
description: |
Groovy Map containing reference information
Expand Down
2 changes: 2 additions & 0 deletions modules/nf-core/genomescope2/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ nextflow_process {
[ id: 'test', single_end: true ], // meta map
file( params.modules_testdata_base_path + "/genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_1.fastq.gz", checkIfExists: true )
])
input[1] = Channel.value(21)
"""
}
}
Expand All @@ -28,6 +29,7 @@ nextflow_process {
process {
"""
input[0] = MERYL_COUNT.out.meryl_db
input[1] = Channel.value(21)
"""
}
}
Expand Down
3 changes: 0 additions & 3 deletions modules/nf-core/genomescope2/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
process {
withName: 'MERYL.*' {
ext.args = 'k=21'
}
withName: 'GENOMESCOPE2' {
ext.args = '-k 21 -p 1 --fitted_hist'
}
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/meryl/count/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- bioconda::meryl=1.3
- bioconda::meryl=1.4.1
20 changes: 18 additions & 2 deletions modules/nf-core/meryl/count/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ process MERYL_COUNT {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/meryl:1.3--h87f3376_1':
'biocontainers/meryl:1.3--h87f3376_1' }"
'https://depot.galaxyproject.org/singularity/meryl:1.4.1--h4ac6f70_0':
'biocontainers/meryl:1.4.1--h4ac6f70_0' }"

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

output:
tuple val(meta), path("*.meryldb"), emit: meryl_db
Expand All @@ -23,6 +24,7 @@ process MERYL_COUNT {
"""
for READ in $reads; do
meryl count \\
k=$kvalue \\
threads=$task.cpus \\
$args \\
$reads \\
Expand All @@ -34,4 +36,18 @@ process MERYL_COUNT {
meryl: \$( meryl --version |& sed 's/meryl //' )
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
for READ in $reads; do
touch read.\${READ%.f*}.meryldb
done
cat <<-END_VERSIONS > versions.yml
"${task.process}":
meryl: \$( meryl --version |& sed 's/meryl //' )
END_VERSIONS
"""
}
6 changes: 5 additions & 1 deletion modules/nf-core/meryl/count/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ description: A genomic k-mer counter (and sequence utility) with nice features.
keywords:
- k-mer
- count
- reference-free
tools:
- "meryl":
description: "A genomic k-mer counter (and sequence utility) with nice features. "
homepage: "https://github.com/marbl/meryl"
documentation: "https://meryl.readthedocs.io/en/latest/quick-start.html"
tool_dev_url: "https://github.com/marbl/meryl"
licence: "['GPL']"
licence: ["GPL"]
input:
- meta:
type: map
Expand All @@ -21,6 +22,9 @@ input:
description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively.
- kvalue:
type: integer
description: An integer value of k to use as the k-mer value.
output:
- meta:
type: map
Expand Down
60 changes: 60 additions & 0 deletions modules/nf-core/meryl/count/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "meryl"
tag "meryl/count"

test("bacteroides_fragilis - fastq") {

when {
process {
"""
input[0] = Channel.value([
[ id: 'test', single_end: true ], // meta map
file( params.modules_testdata_base_path + "/genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_1.fastq.gz", checkIfExists: true )
])
input[1] = Channel.value(21)
"""
}
}

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

}

test("bacteroides_fragilis - fastq - stub") {

options "-stub"

when {
process {
"""
input[0] = Channel.value([
[ id: 'test', single_end: true ], // meta map
file( params.modules_testdata_base_path + "/genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_1.fastq.gz", checkIfExists: true )
])
input[1] = Channel.value(21)
"""
}
}

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

}

}
Loading

0 comments on commit 251f94d

Please sign in to comment.