From b8dda67338cfe2deac074c3ce7c085ccde825f37 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 23 Jan 2020 11:35:49 +0100 Subject: [PATCH] add htslib tabix to index bgzipped vcf files --- tools/htslib/tabix/main.nf | 16 +++++++++++++++ tools/htslib/tabix/meta.yml | 26 +++++++++++++++++++++++++ tools/htslib/tabix/test/main.nf | 13 +++++++++++++ tools/htslib/tabix/test/nextflow.config | 2 ++ 4 files changed, 57 insertions(+) create mode 100644 tools/htslib/tabix/main.nf create mode 100644 tools/htslib/tabix/meta.yml create mode 100644 tools/htslib/tabix/test/main.nf create mode 100644 tools/htslib/tabix/test/nextflow.config diff --git a/tools/htslib/tabix/main.nf b/tools/htslib/tabix/main.nf new file mode 100644 index 00000000..e228bb02 --- /dev/null +++ b/tools/htslib/tabix/main.nf @@ -0,0 +1,16 @@ +process htslib_tabix { + tag {vcf} + + container 'quay.io/biocontainers/tabix:0.2.6--ha92aebf_0' + + input: + path(vcf) + + output: + path("${vcf}.tbi") + + script: + """ + tabix -p vcf ${vcf} + """ +} diff --git a/tools/htslib/tabix/meta.yml b/tools/htslib/tabix/meta.yml new file mode 100644 index 00000000..027780c3 --- /dev/null +++ b/tools/htslib/tabix/meta.yml @@ -0,0 +1,26 @@ +name: htslib tabix +description: create tabix index from a bgzip vcf file +keywords: + - index + - tabix +tools: + - bwa: + description: | + Generic indexer for TAB-delimited genome position files. + homepage: https://www.htslib.org/ + documentation: https://www.htslib.org/doc/tabix.1.html + doi: 10.1093/bioinformatics/btq671 +input: + - + - input: + type: file + description: Input vcf.gz file + pattern: *.{vcf.gz} +output: + - + - index: + type: file + description: tabix index file + pattern: *.{vcf.gz.tbi} +authors: + - @maxulysse \ No newline at end of file diff --git a/tools/htslib/tabix/test/main.nf b/tools/htslib/tabix/test/main.nf new file mode 100644 index 00000000..6fd80089 --- /dev/null +++ b/tools/htslib/tabix/test/main.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow +nextflow.preview.dsl = 2 +include '../../../nf-core/module_testing/check_process_outputs.nf' params(params) +include '../main.nf' params(params) + +// Define input channels +input = '../../../test-datasets/tools/file.vcf.gz' + +// Run the workflow +workflow { + tabix_index(ch_read_files) + // .check_output() +} diff --git a/tools/htslib/tabix/test/nextflow.config b/tools/htslib/tabix/test/nextflow.config new file mode 100644 index 00000000..c137a138 --- /dev/null +++ b/tools/htslib/tabix/test/nextflow.config @@ -0,0 +1,2 @@ +docker.enabled = true +params.outdir = './results'