Skip to content

Commit

Permalink
gatk4_asereadcounter add updated meta and nf-tests (#5164)
Browse files Browse the repository at this point in the history
* feat updated meta

* feat add nf-tests

* Update modules/nf-core/gatk4/asereadcounter/meta.yml

Co-authored-by: Matthias Hörtenhuber <[email protected]>

* Update modules/nf-core/gatk4/asereadcounter/meta.yml

Co-authored-by: Matthias Hörtenhuber <[email protected]>

* applyed reviewers suggestions

* modified pytest_modules.yml

---------

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Matthias Hörtenhuber <[email protected]>
  • Loading branch information
3 people authored Mar 20, 2024
1 parent 653218e commit 89cf292
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 52 deletions.
8 changes: 4 additions & 4 deletions modules/nf-core/gatk4/asereadcounter/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ process GATK4_ASEREADCOUNTER {

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

output:
Expand Down
54 changes: 54 additions & 0 deletions modules/nf-core/gatk4/asereadcounter/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
nextflow_process {

name "Test Process GATK4_ASEREADCOUNTER"
tag "modules_nfcore"
tag "modules"
tag "gatk4"
tag "gatk4/asereadcounter"
script "modules/nf-core/gatk4/asereadcounter/main.nf"
process "GATK4_ASEREADCOUNTER"

test("Should run without failures") {

when {
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/vcf/test.vcf.gz', checkIfExists: true),
file(params.modules_testdata_base_path +'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)
]
input[2] = [
[ id:'reference' ], // meta map
file(params.modules_testdata_base_path +'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
input[3] = [
[ id:'reference' ], // meta map
file(params.modules_testdata_base_path +'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
]
input[4] = [
[ id:'reference' ], // meta map
file(params.modules_testdata_base_path +'genomics/sarscov2/genome/genome.dict', checkIfExists: true)
]
input[5] = [
file(params.modules_testdata_base_path +'genomics/sarscov2/genome/picard/targets.interval_list', checkIfExists: true)
]
"""
}
}

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

}

}
35 changes: 35 additions & 0 deletions modules/nf-core/gatk4/asereadcounter/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions modules/nf-core/gatk4/asereadcounter/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,46 @@ input:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
- input_index:
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
pattern: "*.{vcf.gz}"
- tbi:
type: file
description: index file for VCF file
pattern: "*.{vcf.gz.tbi}"
- meta3:
type: map
description: |
Groovy Map containing reference information
e.g. `[ id:'reference' ]`
- fasta:
type: file
description: fasta file
pattern: "*.{fasta,fa}"
- meta4:
type: map
description: |
Groovy Map containing reference information
e.g. `[ id:'reference' ]`
- fai:
type: file
description: fasta index file
pattern: "*.{fai}"
- meta5:
type: map
description: |
Groovy Map containing reference information
e.g. `[ id:'reference' ]`
- dict:
type: file
description: dictionary file
Expand Down
6 changes: 3 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,9 @@ gatk/unifiedgenotyper:
gatk4/applyvqsr:
- modules/nf-core/gatk4/applyvqsr/**
- tests/modules/nf-core/gatk4/applyvqsr/**
gatk4/asereadcounter:
- modules/nf-core/gatk4/asereadcounter/**
- tests/modules/nf-core/gatk4/asereadcounter/**
gatk4/bedtointervallist:
- modules/nf-core/gatk4/bedtointervallist/**
- tests/modules/nf-core/gatk4/bedtointervallist/**
gatk4/calculatecontamination:
- modules/nf-core/gatk4/calculatecontamination/**
- tests/modules/nf-core/gatk4/calculatecontamination/**
Expand Down
23 changes: 0 additions & 23 deletions tests/modules/nf-core/gatk4/asereadcounter/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/gatk4/asereadcounter/nextflow.config

This file was deleted.

17 changes: 0 additions & 17 deletions tests/modules/nf-core/gatk4/asereadcounter/test.yml

This file was deleted.

0 comments on commit 89cf292

Please sign in to comment.