Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index should be emitted as either tbi or csi #7385

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions modules/nf-core/deepvariant/rundeepvariant/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ process DEEPVARIANT_RUNDEEPVARIANT {
tuple val(meta5), path(par_bed)

output:
tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf
tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi
tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf
tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi
path "versions.yml" , emit: versions
tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf
tuple val(meta), path("${prefix}.vcf.gz.{tbi,csi}") , emit: vcf_index
tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf
tuple val(meta), path("${prefix}.g.vcf.gz.{tbi,csi}") , emit: gvcf_index
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand Down
12 changes: 6 additions & 6 deletions modules/nf-core/deepvariant/rundeepvariant/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ output:
type: file
description: Compressed VCF file
pattern: "*.vcf.gz"
- vcf_tbi:
- vcf_index:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- ${prefix}.vcf.gz.tbi:
- ${prefix}.vcf.gz.{tbi,csi}:
type: file
description: Tabix index file of compressed VCF
pattern: "*.vcf.gz.tbi"
pattern: "*.vcf.gz.{tbi,csi}"
- gvcf:
- meta:
type: map
Expand All @@ -99,16 +99,16 @@ output:
type: file
description: Compressed GVCF file
pattern: "*.g.vcf.gz"
- gvcf_tbi:
- gvcf_index:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- ${prefix}.g.vcf.gz.tbi:
- ${prefix}.g.vcf.gz.{tbi,csi}:
type: file
description: Tabix index file of compressed GVCF
pattern: "*.g.vcf.gz.tbi"
pattern: "*.g.vcf.gz.{tbi,csi}"
- versions:
- versions.yml:
type: file
Expand Down
106 changes: 100 additions & 6 deletions modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ nextflow_process {
tag "deepvariant"
tag "modules"
tag "modules_nfcore"
config "./nextflow.config"

test("homo_sapiens - [bam, bai] - fasta - fai") {
when {
config "./nextflow.config"

when {
params {
module_args = '--regions=\"chr22:0-40001\" --model_type=WGS'
}
process {
"""
input[0] = [
Expand Down Expand Up @@ -48,9 +51,11 @@ nextflow_process {
}

test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai") {
config "./nextflow-intervals.config"

when {
params {
module_args = '--model_type=WGS'
}
process {
"""
input[0] = [
Expand Down Expand Up @@ -86,9 +91,11 @@ nextflow_process {
}

test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed") {
config "./nextflow-non-autosomal-calling.config"
tag "test"

when {
params {
module_args = '--model_type=WGS --haploid_contigs chr22'
}
process {
"""
input[0] = [
Expand Down Expand Up @@ -125,9 +132,96 @@ nextflow_process {
}

test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai") {

when {
params {
module_args = ''
}
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
[]
]
input[1] = [
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true)
]
input[2] = [
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.fai', checkIfExists: true)
]
input[3] = [
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true)
]
input[4] = [
[],[]
]
"""
}
}

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

test("homo_sapiens - [bam, bai] - fasta - fai - stub") {

options "-stub"

when {
config "./nextflow.config"
params {
module_args = ''
}
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
[]
]
input[1] = [
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
]
input[2] = [
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
]
input[3] = [
[],[]
]
input[4] = [
[],[]
]
"""
}
}

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

test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai - stub") {

options "-stub"

when {
params {
module_args = ''
}
process {
"""
input[0] = [
Expand Down
Loading
Loading