bcftools/annotate follow up corrections (#1359)

* bcf annotate ready2go

* edited output name

* fixed output

* updated bcftools ver

* changed contain output string

* removed contain key entirely

* fixed md5sum for test.yml

* using match instead of find

* bcftools/annotate refactored with complete test

* rm trailing white space

Co-authored-by: Robert A. Petit III <robbie.petit@gmail.com>
This commit is contained in:
Mei Wu 2022-02-28 16:16:29 +01:00 committed by GitHub
parent ef811d952b
commit 38ffbfdb63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 9 deletions

View file

@ -22,7 +22,7 @@ process BCFTOOLS_ANNOTATE {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def matcher = input =~ /vcf/
def matcher = input ==~ /\S+\.*vcf\.\S*/
def output_suffix = matcher ? "vcf.gz" : "bcf"
def output_type_compressed = matcher ? "z" : "b"
"""
@ -36,7 +36,7 @@ process BCFTOOLS_ANNOTATE {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
bcftools: \$( bcftools --version |& sed '1!d; s/^.*bcftools //' )
END_VERSIONS
"""
}

View file

@ -67,6 +67,8 @@ params {
test_computematrix_mat_gz = "${test_data_dir}/genomics/sarscov2/illumina/deeptools/test.computeMatrix.mat.gz"
test_bcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.bcf"
test_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf"
test_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz"
test_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi"

View file

@ -4,11 +4,20 @@ nextflow.enable.dsl = 2
include { BCFTOOLS_ANNOTATE } from '../../../../modules/bcftools/annotate/main.nf'
workflow test_bcftools_annotate {
workflow test_bcftools_annotate_out_vcf {
input = [
[ id:'test_compressed', single_end:false ], // meta map
[ id:'test_compressed_vcf', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ]
BCFTOOLS_ANNOTATE ( input )
}
workflow test_bcftools_annotate_out_bcf {
input = [
[ id:'test_compressed_bcf', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_bcf'], checkIfExists: true) ]
BCFTOOLS_ANNOTATE ( input )
}

View file

@ -1,9 +1,19 @@
- name: bcftools annotate test_bcftools_annotate
command: nextflow run tests/modules/bcftools/annotate -entry test_bcftools_annotate -c tests/config/nextflow.config
- name: bcftools annotate test_bcftools_annotate_out_vcf
command: nextflow run tests/modules/bcftools/annotate -entry test_bcftools_annotate_out_vcf -c tests/config/nextflow.config
tags:
- bcftools/annotate
- bcftools
files:
- path: output/bcftools/test_compressed_annotated.vcf.gz
- path: output/bcftools/test_compressed_vcf_annotated.vcf.gz
- path: output/bcftools/versions.yml
md5sum: b647b465acc221f6fe6fbcc319724eed
md5sum: de86d4d411baef1aaee0e72f519dbe1f
- name: bcftools annotate test_bcftools_annotate_out_bcf
command: nextflow run tests/modules/bcftools/annotate -entry test_bcftools_annotate_out_bcf -c tests/config/nextflow.config
tags:
- bcftools/annotate
- bcftools
files:
- path: output/bcftools/test_compressed_bcf_annotated.bcf
- path: output/bcftools/versions.yml
md5sum: a57e62a5a189fe85aabd52c010d88ca6