mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
chores: replace bcftools/bgzip by tabix/bgzip cf #179
This commit is contained in:
parent
7d5ac60aa1
commit
6a147b8aaa
7 changed files with 33 additions and 32 deletions
8
.github/filters.yml
vendored
8
.github/filters.yml
vendored
|
@ -2,10 +2,6 @@ bandage_image:
|
||||||
- software/bandage/image/**
|
- software/bandage/image/**
|
||||||
- tests/software/bandage/image/**
|
- tests/software/bandage/image/**
|
||||||
|
|
||||||
bcftools_bgzip:
|
|
||||||
- software/bcftools/bgzip/**
|
|
||||||
- tests/software/bcftools/bgzip/**
|
|
||||||
|
|
||||||
bcftools_consensus:
|
bcftools_consensus:
|
||||||
- software/bcftools/consensus/**
|
- software/bcftools/consensus/**
|
||||||
- tests/software/bcftools/consensus/**
|
- tests/software/bcftools/consensus/**
|
||||||
|
@ -233,6 +229,10 @@ stringtie:
|
||||||
- software/stringtie/**
|
- software/stringtie/**
|
||||||
- tests/software/stringtie/**
|
- tests/software/stringtie/**
|
||||||
|
|
||||||
|
tabix_bgzip:
|
||||||
|
- software/tabix/bgzip/**
|
||||||
|
- tests/software/tabix/bgzip/**
|
||||||
|
|
||||||
tool_subtool:
|
tool_subtool:
|
||||||
- software/TOOL/SUBTOOL/**
|
- software/TOOL/SUBTOOL/**
|
||||||
- tests/software/TOOL/SUBTOOL/**
|
- tests/software/TOOL/SUBTOOL/**
|
||||||
|
|
|
@ -4,31 +4,31 @@ include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||||
params.options = [:]
|
params.options = [:]
|
||||||
def options = initOptions(params.options)
|
def options = initOptions(params.options)
|
||||||
|
|
||||||
process BCFTOOLS_BGZIP {
|
process TABIX_BGZIP {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
publishDir "${params.outdir}",
|
publishDir "${params.outdir}",
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
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) {
|
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 {
|
} else {
|
||||||
container "quay.io/biocontainers/bcftools:1.11--h7c999a4_0"
|
container "quay.io/biocontainers/tabix:0.2.6--ha92aebf_0"
|
||||||
}
|
}
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(vcf)
|
tuple val(meta), path(file)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.gz"), emit: vcf
|
tuple val(meta), path("*.gz"), emit: file
|
||||||
path "*.version.txt" , emit: version
|
path "*.version.txt" , emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||||
"""
|
"""
|
||||||
bgzip -c $options.args $vcf > ${prefix}.vcf.gz
|
bgzip -c $options.args $file > ${prefix}.${file.getExtension()}.gz
|
||||||
echo \$(bcftools --version 2>&1) | sed 's/^.*bcftools //; s/ .*\$//' > ${software}.version.txt
|
echo \$(bcftools --version 2>&1) | sed 's/^.*bcftools //; s/ .*\$//' > ${software}.version.txt
|
||||||
"""
|
"""
|
||||||
}
|
}
|
|
@ -1,14 +1,14 @@
|
||||||
name: bcftools_bgzip
|
name: tabix_bgzip
|
||||||
description: Compresses VCF files
|
description: Compresses files
|
||||||
keywords:
|
keywords:
|
||||||
- variant calling
|
|
||||||
- compress
|
- compress
|
||||||
- VCF
|
- bgzip
|
||||||
|
- tabix
|
||||||
tools:
|
tools:
|
||||||
- bgzip:
|
- bgzip:
|
||||||
description: |
|
description: |
|
||||||
Bgzip compresses files in a similar manner to, and compatible with, gzip.
|
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
|
documentation: http://www.htslib.org/doc/bgzip.html
|
||||||
doi: 10.1093/bioinformatics/btp352
|
doi: 10.1093/bioinformatics/btp352
|
||||||
params:
|
params:
|
||||||
|
@ -38,19 +38,19 @@ input:
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- vcf:
|
- file:
|
||||||
type: file
|
type: file
|
||||||
description: VCF text file
|
description: text file
|
||||||
output:
|
output:
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- vcf:
|
- file:
|
||||||
type: file
|
type: file
|
||||||
description: Output compressed VCF file
|
description: Output compressed file
|
||||||
pattern: "*.{vcf}"
|
pattern: "*.{gz}"
|
||||||
- version:
|
- version:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software version
|
description: File containing software version
|
||||||
|
@ -58,3 +58,4 @@ output:
|
||||||
authors:
|
authors:
|
||||||
- "@joseespinosa"
|
- "@joseespinosa"
|
||||||
- "@drpatelh"
|
- "@drpatelh"
|
||||||
|
- "@maxulysse"
|
|
@ -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
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
nextflow.enable.dsl = 2
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
include { BCFTOOLS_BGZIP } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] )
|
include { TABIX_BGZIP as BGZIP_VCF } from '../../../../software/tabix/bgzip/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
workflow test_bcftools_bgzip {
|
workflow test_tabix_bgzip_vcf {
|
||||||
|
|
||||||
def input = []
|
def input = []
|
||||||
input = [ [ id:'test' ], // meta map
|
input = [ [ id:'test' ], // meta map
|
||||||
[ file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]]
|
[ file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]]
|
||||||
|
|
||||||
BCFTOOLS_BGZIP ( input )
|
BGZIP_VCF ( input )
|
||||||
}
|
}
|
8
tests/software/tabix/bgzip/test.yml
Normal file
8
tests/software/tabix/bgzip/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- name: tabix bgzip
|
||||||
|
command: nextflow run ./tests/software/tabix/bgzip -entry test_tabix_bgzip_vcf -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- tabix
|
||||||
|
- tabix_bgzip
|
||||||
|
files:
|
||||||
|
- path: output/bgzip/test.vcf.gz
|
||||||
|
md5sum: 40419fb7562475d1c8ec4ab725796de2
|
Loading…
Reference in a new issue