Skip to content

Commit

Permalink
added an optional vcf index to bcftools/norm (#1821)
Browse files Browse the repository at this point in the history
* added an optional vcf index to bcftools/norm

* updated test.yml for failing conda tests
  • Loading branch information
nvnieuwk authored Jun 28, 2022
1 parent 98ffb09 commit d596571
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/bcftools/norm/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process BCFTOOLS_NORM {
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"

input:
tuple val(meta), path(vcf)
tuple val(meta), path(vcf), path(tbi)
path(fasta)

output:
Expand Down
8 changes: 7 additions & 1 deletion modules/bcftools/norm/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ input:
description: |
The vcf file to be normalized
e.g. 'file1.vcf'
pattern: "*.{vcf,vcf.gz}"
- tbi:
type: file
description: |
An optional index of the VCF file (for when the VCF is compressed)
pattern: "*.vcf.gz.tbi"
- fasta:
type: file
description: FASTA reference file
Expand All @@ -37,7 +43,7 @@ output:
- vcf:
type: file
description: VCF normalized output file
pattern: "*.{vcf.gz}"
pattern: "*.vcf.gz"
- versions:
type: file
description: File containing software versions
Expand Down
18 changes: 16 additions & 2 deletions tests/modules/bcftools/norm/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,24 @@ nextflow.enable.dsl = 2

include { BCFTOOLS_NORM } from '../../../../modules/bcftools/norm/main.nf'

workflow test_bcftools_norm {
workflow test_bcftools_norm_no_tbi {

input = [ [ id:'test2', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true)]
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true),
[]
]

fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)

BCFTOOLS_NORM ( input, fasta )
}

workflow test_bcftools_norm_tbi {

input = [ [ id:'test2', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)
]

fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)

Expand Down
13 changes: 10 additions & 3 deletions tests/modules/bcftools/norm/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
- name: bcftools norm
command: nextflow run ./tests/modules/bcftools/norm -entry test_bcftools_norm -c ./tests/config/nextflow.config -c ./tests/modules/bcftools/norm/nextflow.config
- name: bcftools norm test_bcftools_norm_no_tbi
command: nextflow run ./tests/modules/bcftools/norm -entry test_bcftools_norm_no_tbi -c ./tests/config/nextflow.config -c ./tests/modules/bcftools/norm/nextflow.config
tags:
- bcftools
- bcftools/norm
files:
- path: output/bcftools/test2.vcf.gz

- name: bcftools norm test_bcftools_norm_tbi
command: nextflow run ./tests/modules/bcftools/norm -entry test_bcftools_norm_tbi -c ./tests/config/nextflow.config -c ./tests/modules/bcftools/norm/nextflow.config
tags:
- bcftools
- bcftools/norm
files:
- path: output/bcftools/test2.vcf.gz
md5sum: 2b1cac07d1875b8adcd7a85346890f07

0 comments on commit d596571

Please sign in to comment.