diff --git a/modules/ucsc/bedtobigbed/main.nf b/modules/ucsc/bedtobigbed/main.nf index 627315fd..1d523264 100644 --- a/modules/ucsc/bedtobigbed/main.nf +++ b/modules/ucsc/bedtobigbed/main.nf @@ -11,6 +11,7 @@ process UCSC_BEDTOBIGBED { input: tuple val(meta), path(bed) path sizes + path autosql output: tuple val(meta), path("*.bigBed"), emit: bigbed @@ -22,11 +23,13 @@ process UCSC_BEDTOBIGBED { script: def args = task.ext.args ?: '' 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. """ bedToBigBed \\ $bed \\ $sizes \\ + $as_option \\ $args \\ ${prefix}.bigBed diff --git a/modules/ucsc/bedtobigbed/meta.yml b/modules/ucsc/bedtobigbed/meta.yml index 1e0bc766..e8e08fa7 100755 --- a/modules/ucsc/bedtobigbed/meta.yml +++ b/modules/ucsc/bedtobigbed/meta.yml @@ -26,6 +26,10 @@ input: type: file description: chromosome sizes file pattern: "*.{sizes}" + - autosql: + type: file + description: autoSql file to describe the columns of the BED file + pattern: "*.{as}" output: - meta: diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 1039f7a0..3358baa5 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -23,6 +23,7 @@ params { test2_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test2.bed" test_bed12 = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed12" 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" diff --git a/tests/modules/ucsc/bedgraphtobigwig/test.yml b/tests/modules/ucsc/bedgraphtobigwig/test.yml index c00a0231..2a532a62 100644 --- a/tests/modules/ucsc/bedgraphtobigwig/test.yml +++ b/tests/modules/ucsc/bedgraphtobigwig/test.yml @@ -1,6 +1,7 @@ - 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 tags: + - ucsc - ucsc/bedgraphtobigwig files: - path: output/ucsc/test.bigWig diff --git a/tests/modules/ucsc/bedtobigbed/main.nf b/tests/modules/ucsc/bedtobigbed/main.nf index c7453bd5..36a9b423 100644 --- a/tests/modules/ucsc/bedtobigbed/main.nf +++ b/tests/modules/ucsc/bedtobigbed/main.nf @@ -3,12 +3,23 @@ nextflow.enable.dsl = 2 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 { 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) - 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 ) } diff --git a/tests/modules/ucsc/bedtobigbed/nextflow.config b/tests/modules/ucsc/bedtobigbed/nextflow.config index 8730f1c4..0eaabc43 100644 --- a/tests/modules/ucsc/bedtobigbed/nextflow.config +++ b/tests/modules/ucsc/bedtobigbed/nextflow.config @@ -2,4 +2,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: UCSC_BEDTOBIGBED_AS { + ext.args = "-type=bed3+3" + } } diff --git a/tests/modules/ucsc/bedtobigbed/test.yml b/tests/modules/ucsc/bedtobigbed/test.yml index dc00f73b..718b1864 100644 --- a/tests/modules/ucsc/bedtobigbed/test.yml +++ b/tests/modules/ucsc/bedtobigbed/test.yml @@ -1,7 +1,16 @@ - 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 tags: + - ucsc - ucsc/bedtobigbed files: - 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