mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
bedToBigBed AutoSql option (#1981)
* Added missing "ucsc" tags (as per the convention) * Added support for the -as input file * Added a test
This commit is contained in:
parent
e97d4cd32b
commit
c736d26b7e
7 changed files with 35 additions and 3 deletions
|
@ -11,6 +11,7 @@ process UCSC_BEDTOBIGBED {
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bed)
|
tuple val(meta), path(bed)
|
||||||
path sizes
|
path sizes
|
||||||
|
path autosql
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.bigBed"), emit: bigbed
|
tuple val(meta), path("*.bigBed"), emit: bigbed
|
||||||
|
@ -22,11 +23,13 @@ process UCSC_BEDTOBIGBED {
|
||||||
script:
|
script:
|
||||||
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 as_option = autosql ? "-as=${autosql}" : ""
|
||||||
def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
|
def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
|
||||||
"""
|
"""
|
||||||
bedToBigBed \\
|
bedToBigBed \\
|
||||||
$bed \\
|
$bed \\
|
||||||
$sizes \\
|
$sizes \\
|
||||||
|
$as_option \\
|
||||||
$args \\
|
$args \\
|
||||||
${prefix}.bigBed
|
${prefix}.bigBed
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,10 @@ input:
|
||||||
type: file
|
type: file
|
||||||
description: chromosome sizes file
|
description: chromosome sizes file
|
||||||
pattern: "*.{sizes}"
|
pattern: "*.{sizes}"
|
||||||
|
- autosql:
|
||||||
|
type: file
|
||||||
|
description: autoSql file to describe the columns of the BED file
|
||||||
|
pattern: "*.{as}"
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- meta:
|
- meta:
|
||||||
|
|
|
@ -23,6 +23,7 @@ params {
|
||||||
test2_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test2.bed"
|
test2_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test2.bed"
|
||||||
test_bed12 = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed12"
|
test_bed12 = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed12"
|
||||||
baits_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/baits.bed"
|
baits_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/baits.bed"
|
||||||
|
bed_autosql = "${test_data_dir}/genomics/sarscov2/genome/bed/bed6alt.as"
|
||||||
|
|
||||||
reference_cnn = "${test_data_dir}/genomics/sarscov2/genome/cnn/reference.cnn"
|
reference_cnn = "${test_data_dir}/genomics/sarscov2/genome/cnn/reference.cnn"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
- name: ucsc bedgraphtobigwig
|
- name: ucsc bedgraphtobigwig
|
||||||
command: nextflow run ./tests/modules/ucsc/bedgraphtobigwig -entry test_ucsc_bedgraphtobigwig -c ./tests/config/nextflow.config -c ./tests/modules/ucsc/bedgraphtobigwig/nextflow.config
|
command: nextflow run ./tests/modules/ucsc/bedgraphtobigwig -entry test_ucsc_bedgraphtobigwig -c ./tests/config/nextflow.config -c ./tests/modules/ucsc/bedgraphtobigwig/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
|
- ucsc
|
||||||
- ucsc/bedgraphtobigwig
|
- ucsc/bedgraphtobigwig
|
||||||
files:
|
files:
|
||||||
- path: output/ucsc/test.bigWig
|
- path: output/ucsc/test.bigWig
|
||||||
|
|
|
@ -3,12 +3,23 @@
|
||||||
nextflow.enable.dsl = 2
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
include { UCSC_BEDTOBIGBED } from '../../../../modules/ucsc/bedtobigbed/main.nf'
|
include { UCSC_BEDTOBIGBED } from '../../../../modules/ucsc/bedtobigbed/main.nf'
|
||||||
|
include { UCSC_BEDTOBIGBED as UCSC_BEDTOBIGBED_AS } from '../../../../modules/ucsc/bedtobigbed/main.nf'
|
||||||
|
|
||||||
workflow test_ucsc_bedtobigbed {
|
workflow test_ucsc_bedtobigbed {
|
||||||
input = [ [ id: 'test' ], // meta map
|
input = [ [ id: 'test' ], // meta map
|
||||||
[ file(params.test_data['sarscov2']['genome']['test_bed12'], checkIfExists: true ) ]
|
[ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true ) ]
|
||||||
]
|
]
|
||||||
sizes = file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true)
|
sizes = file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true)
|
||||||
|
|
||||||
UCSC_BEDTOBIGBED ( input, sizes )
|
UCSC_BEDTOBIGBED ( input, sizes, [] )
|
||||||
|
}
|
||||||
|
|
||||||
|
workflow test_ucsc_bedtobigbed_autosql {
|
||||||
|
input = [ [ id: 'test' ], // meta map
|
||||||
|
[ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true ) ]
|
||||||
|
]
|
||||||
|
sizes = file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true)
|
||||||
|
autosql = file(params.test_data['sarscov2']['genome']['bed_autosql'], checkIfExists: true)
|
||||||
|
|
||||||
|
UCSC_BEDTOBIGBED_AS ( input, sizes, autosql )
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,4 +2,7 @@ process {
|
||||||
|
|
||||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
withName: UCSC_BEDTOBIGBED_AS {
|
||||||
|
ext.args = "-type=bed3+3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
- name: ucsc bedtobigbed
|
- name: ucsc bedtobigbed
|
||||||
command: nextflow run ./tests/modules/ucsc/bedtobigbed -entry test_ucsc_bedtobigbed -c ./tests/config/nextflow.config -c ./tests/modules/ucsc/bedtobigbed/nextflow.config
|
command: nextflow run ./tests/modules/ucsc/bedtobigbed -entry test_ucsc_bedtobigbed -c ./tests/config/nextflow.config -c ./tests/modules/ucsc/bedtobigbed/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
|
- ucsc
|
||||||
- ucsc/bedtobigbed
|
- ucsc/bedtobigbed
|
||||||
files:
|
files:
|
||||||
- path: output/ucsc/test.bigBed
|
- path: output/ucsc/test.bigBed
|
||||||
md5sum: 98cf0d0baa3ae5a330c80afbb8bc2b18
|
md5sum: 3c2400aab8f7a3ac333905c7484d9a24
|
||||||
|
- name: ucsc bedtobigbed autosql
|
||||||
|
command: nextflow run ./tests/modules/ucsc/bedtobigbed -entry test_ucsc_bedtobigbed_autosql -c ./tests/config/nextflow.config -c ./tests/modules/ucsc/bedtobigbed/nextflow.config
|
||||||
|
tags:
|
||||||
|
- ucsc
|
||||||
|
- ucsc/bedtobigbed
|
||||||
|
files:
|
||||||
|
- path: output/ucsc/test.bigBed
|
||||||
|
md5sum: 6dc69a14b95bcceee98e9e6b3c3def09
|
||||||
|
|
Loading…
Reference in a new issue