Merge pull request #180 from MaxUlysse/master_tabix_bgzip

Replace bcftools/bgzip by tabix/bgzip
This commit is contained in:
Harshil Patel 2021-02-16 23:32:23 +00:00 committed by GitHub
commit 412172cda6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 32 deletions

8
.github/filters.yml vendored
View file

@ -2,10 +2,6 @@ bandage_image:
- software/bandage/image/**
- tests/software/bandage/image/**
bcftools_bgzip:
- software/bcftools/bgzip/**
- tests/software/bcftools/bgzip/**
bcftools_consensus:
- software/bcftools/consensus/**
- tests/software/bcftools/consensus/**
@ -241,6 +237,10 @@ stringtie:
- software/stringtie/**
- tests/software/stringtie/**
tabix_bgzip:
- software/tabix/bgzip/**
- tests/software/tabix/bgzip/**
tool_subtool:
- software/TOOL/SUBTOOL/**
- tests/software/TOOL/SUBTOOL/**

View file

@ -4,31 +4,31 @@ include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process BCFTOOLS_BGZIP {
process TABIX_BGZIP {
tag "$meta.id"
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
conda (params.enable_conda ? "bioconda::bcftools=1.11=h7c999a4_0" : null)
conda (params.enable_conda ? "bioconda::tabix=0.2.6" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
container "https://depot.galaxyproject.org/singularity/tabix:0.2.6--ha92aebf_0"
} else {
container "quay.io/biocontainers/bcftools:1.11--h7c999a4_0"
container "quay.io/biocontainers/tabix:0.2.6--ha92aebf_0"
}
input:
tuple val(meta), path(vcf)
tuple val(meta), path(input)
output:
tuple val(meta), path("*.gz"), emit: vcf
tuple val(meta), path("*.gz"), emit: gz
path "*.version.txt" , emit: version
script:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
bgzip -c $options.args $vcf > ${prefix}.vcf.gz
bgzip -c $options.args $input > ${prefix}.${input.getExtension()}.gz
echo \$(bcftools --version 2>&1) | sed 's/^.*bcftools //; s/ .*\$//' > ${software}.version.txt
"""
}

View file

@ -1,14 +1,14 @@
name: bcftools_bgzip
description: Compresses VCF files
name: tabix_bgzip
description: Compresses files
keywords:
- variant calling
- compress
- VCF
- bgzip
- tabix
tools:
- bgzip:
description: |
Bgzip compresses files in a similar manner to, and compatible with, gzip.
homepage: http://samtools.github.io/bcftools/bcftools.html
homepage: https://www.htslib.org/doc/tabix.html
documentation: http://www.htslib.org/doc/bgzip.html
doi: 10.1093/bioinformatics/btp352
params:
@ -38,19 +38,19 @@ input:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
- file:
type: file
description: VCF text file
description: text file
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
- file:
type: file
description: Output compressed VCF file
pattern: "*.{vcf}"
description: Output compressed file
pattern: "*.{gz}"
- version:
type: file
description: File containing software version
@ -58,3 +58,4 @@ output:
authors:
- "@joseespinosa"
- "@drpatelh"
- "@maxulysse"

View file

@ -1,8 +0,0 @@
- name: bcftools bgzip
command: nextflow run ./tests/software/bcftools/bgzip -entry test_bcftools_bgzip -c tests/config/nextflow.config
tags:
- bcftools
- bcftools_bgzip
files:
- path: output/bcftools/test.vcf.gz
md5sum: eb75ae1f08a1884f8edc59ed423471a2

View file

@ -2,13 +2,13 @@
nextflow.enable.dsl = 2
include { BCFTOOLS_BGZIP } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] )
include { TABIX_BGZIP } from '../../../../software/tabix/bgzip/main.nf' addParams( options: [:] )
workflow test_bcftools_bgzip {
workflow test_tabix_bgzip {
def input = []
input = [ [ id:'test' ], // meta map
[ file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]]
BCFTOOLS_BGZIP ( input )
TABIX_BGZIP ( input )
}

View file

@ -0,0 +1,8 @@
- name: tabix bgzip
command: nextflow run ./tests/software/tabix/bgzip -entry test_tabix_bgzip -c tests/config/nextflow.config
tags:
- tabix
- tabix_bgzip
files:
- path: output/tabix/test.vcf.gz
md5sum: 40419fb7562475d1c8ec4ab725796de2