mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 05:43:08 +00:00
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:
parent
ef811d952b
commit
38ffbfdb63
4 changed files with 30 additions and 9 deletions
|
@ -22,7 +22,7 @@ process BCFTOOLS_ANNOTATE {
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
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_suffix = matcher ? "vcf.gz" : "bcf"
|
||||||
def output_type_compressed = matcher ? "z" : "b"
|
def output_type_compressed = matcher ? "z" : "b"
|
||||||
"""
|
"""
|
||||||
|
@ -36,7 +36,7 @@ process BCFTOOLS_ANNOTATE {
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
|
bcftools: \$( bcftools --version |& sed '1!d; s/^.*bcftools //' )
|
||||||
END_VERSIONS
|
END_VERSIONS
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,8 @@ params {
|
||||||
|
|
||||||
test_computematrix_mat_gz = "${test_data_dir}/genomics/sarscov2/illumina/deeptools/test.computeMatrix.mat.gz"
|
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 = "${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 = "${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"
|
test_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi"
|
||||||
|
|
|
@ -4,11 +4,20 @@ nextflow.enable.dsl = 2
|
||||||
|
|
||||||
include { BCFTOOLS_ANNOTATE } from '../../../../modules/bcftools/annotate/main.nf'
|
include { BCFTOOLS_ANNOTATE } from '../../../../modules/bcftools/annotate/main.nf'
|
||||||
|
|
||||||
workflow test_bcftools_annotate {
|
workflow test_bcftools_annotate_out_vcf {
|
||||||
|
|
||||||
input = [
|
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) ]
|
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ]
|
||||||
|
|
||||||
BCFTOOLS_ANNOTATE ( input )
|
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 )
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,19 @@
|
||||||
- name: bcftools annotate test_bcftools_annotate
|
- name: bcftools annotate test_bcftools_annotate_out_vcf
|
||||||
command: nextflow run tests/modules/bcftools/annotate -entry test_bcftools_annotate -c tests/config/nextflow.config
|
command: nextflow run tests/modules/bcftools/annotate -entry test_bcftools_annotate_out_vcf -c tests/config/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- bcftools/annotate
|
- bcftools/annotate
|
||||||
- bcftools
|
- bcftools
|
||||||
files:
|
files:
|
||||||
- path: output/bcftools/test_compressed_annotated.vcf.gz
|
- path: output/bcftools/test_compressed_vcf_annotated.vcf.gz
|
||||||
- path: output/bcftools/versions.yml
|
- 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
|
||||||
|
|
Loading…
Reference in a new issue