mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
fix: make HTSLIB_TABIX more modular
This commit is contained in:
parent
fa34f806d2
commit
5e71dc94d6
4 changed files with 43 additions and 14 deletions
|
@ -5,7 +5,7 @@ params.options = [:]
|
||||||
def options = initOptions(params.options)
|
def options = initOptions(params.options)
|
||||||
|
|
||||||
process HTSLIB_TABIX {
|
process HTSLIB_TABIX {
|
||||||
tag "$vcf"
|
tag "$tab"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
publishDir "${params.outdir}",
|
publishDir "${params.outdir}",
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
|
@ -19,7 +19,7 @@ process HTSLIB_TABIX {
|
||||||
}
|
}
|
||||||
|
|
||||||
input:
|
input:
|
||||||
path vcf
|
path tab
|
||||||
|
|
||||||
output:
|
output:
|
||||||
path("*.tbi") , emit: tbi
|
path("*.tbi") , emit: tbi
|
||||||
|
@ -28,8 +28,8 @@ process HTSLIB_TABIX {
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
"""
|
"""
|
||||||
tabix -p vcf $vcf
|
tabix $options.args $tab
|
||||||
|
|
||||||
echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/(.*\$//' > ${software}.version.txt
|
echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/(.*\$//' > ${software}.version.txt
|
||||||
"""
|
"""
|
||||||
}
|
}
|
|
@ -32,10 +32,10 @@ params:
|
||||||
Instead of directly downloading Singularity images for use with Singularity,
|
Instead of directly downloading Singularity images for use with Singularity,
|
||||||
force the workflow to pull and convert Docker containers instead.
|
force the workflow to pull and convert Docker containers instead.
|
||||||
input:
|
input:
|
||||||
- vcf:
|
- tab:
|
||||||
type: file
|
type: file
|
||||||
description: vcf.gz file
|
description: TAB-delimited genome file
|
||||||
pattern: "*.{vcf.gz}"
|
pattern: "*"
|
||||||
output:
|
output:
|
||||||
- tbi:
|
- tbi:
|
||||||
type: file
|
type: file
|
||||||
|
|
|
@ -2,8 +2,18 @@
|
||||||
|
|
||||||
nextflow.enable.dsl = 2
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
include { HTSLIB_TABIX } from '../../../../software/htslib/tabix/main.nf' addParams( options: [:] )
|
include { HTSLIB_TABIX as TABIX_BED } from '../../../../software/htslib/tabix/main.nf' addParams( options: ['args': '-p bed'] )
|
||||||
|
include { HTSLIB_TABIX as TABIX_GFF } from '../../../../software/htslib/tabix/main.nf' addParams( options: ['args': '-p gff'] )
|
||||||
|
include { HTSLIB_TABIX as TABIX_VCF } from '../../../../software/htslib/tabix/main.nf' addParams( options: ['args': '-p vcf'] )
|
||||||
|
|
||||||
workflow test_htslib_tabix {
|
workflow test_htslib_tabix_bed {
|
||||||
HTSLIB_TABIX ( file("${launchDir}/tests/data/vcf/test.vcf.gz", checkIfExists: true) )
|
TABIX_BED ( file("${launchDir}/tests/data/bed/B.bed.gz", checkIfExists: true) )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workflow test_htslib_tabix_gff {
|
||||||
|
TABIX_GFF ( file("${launchDir}/tests/data/gff/a.gff3.gz", checkIfExists: true) )
|
||||||
|
}
|
||||||
|
|
||||||
|
workflow test_htslib_tabix_vcf {
|
||||||
|
TABIX_VCF ( file("${launchDir}/tests/data/vcf/test.vcf.gz", checkIfExists: true) )
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,27 @@
|
||||||
- name: htslib tabix
|
- name: htslib tabix bed
|
||||||
command: nextflow run ./tests/software/htslib/tabix -entry test_htslib_tabix -c tests/config/nextflow.config
|
command: nextflow run ./tests/software/htslib/tabix -entry test_htslib_tabix_bed -c tests/config/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- htslib
|
- htslib
|
||||||
- htslib_tabix
|
- htslib_tabix
|
||||||
|
- bed
|
||||||
files:
|
files:
|
||||||
- path: output/htslib/test.vcf.gz.tbi
|
- path: output/tabix/B.bed.gz.tbi
|
||||||
|
md5sum: 6d657159c283200109f2ed082296f853
|
||||||
|
- name: htslib tabix gff
|
||||||
|
command: nextflow run ./tests/software/htslib/tabix -entry test_htslib_tabix_gff -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- htslib
|
||||||
|
- htslib_tabix
|
||||||
|
- gff
|
||||||
|
files:
|
||||||
|
- path: output/tabix/a.gff3.gz.tbi
|
||||||
|
md5sum: 77f666b63da45c6af8a394ab5642602e
|
||||||
|
- name: htslib tabix vcf
|
||||||
|
command: nextflow run ./tests/software/htslib/tabix -entry test_htslib_tabix_vcf -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- htslib
|
||||||
|
- htslib_tabix
|
||||||
|
- vcf
|
||||||
|
files:
|
||||||
|
- path: output/tabix/test.vcf.gz.tbi
|
||||||
md5sum: a03f56d3e968f32256ffb9f6b7d01812
|
md5sum: a03f56d3e968f32256ffb9f6b7d01812
|
||||||
|
|
Loading…
Reference in a new issue