diff --git a/modules/hmmcopy/gccounter/main.nf b/modules/hmmcopy/gccounter/main.nf index 36666095..a1de8b97 100644 --- a/modules/hmmcopy/gccounter/main.nf +++ b/modules/hmmcopy/gccounter/main.nf @@ -5,8 +5,8 @@ process HMMCOPY_GCCOUNTER { conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_5' : - 'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_5' }" + 'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_7' : + 'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_7' }" input: path fasta diff --git a/modules/hmmcopy/generatemap/main.nf b/modules/hmmcopy/generatemap/main.nf new file mode 100644 index 00000000..bedbffdb --- /dev/null +++ b/modules/hmmcopy/generatemap/main.nf @@ -0,0 +1,38 @@ +def VERSION = '0.1.1' + +process HMMCOPY_GENERATEMAP { + tag '$bam' + label 'process_long' + + conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_7': + 'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_7' }" + + input: + path fasta + + output: + path "*.map.bw" , emit: bigwig + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + + """ + # build required indexes + generateMap.pl -b \\ + $args \\ + $fasta + + # run + generateMap.pl \\ + $args \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hmmcopy: \$(echo $VERSION) + END_VERSIONS + """ +} diff --git a/modules/hmmcopy/generatemap/meta.yml b/modules/hmmcopy/generatemap/meta.yml new file mode 100644 index 00000000..ca43c6ce --- /dev/null +++ b/modules/hmmcopy/generatemap/meta.yml @@ -0,0 +1,32 @@ +name: hmmcopy_generatemap +description: Perl script (generateMap.pl) generates the mappability of a genome given a certain size of reads, for input to hmmcopy mapcounter. Takes a very long time on large genomes, is not parallelised at all. +keywords: + - hmmcopy + - mapcounter + - mappability +tools: + - hmmcopy: + description: C++ based programs for analyzing BAM files and preparing read counts -- used with bioconductor-hmmcopy + homepage: https://github.com/shahcompbio/hmmcopy_utils + documentation: https://github.com/shahcompbio/hmmcopy_utils + tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils + doi: "" + licence: ['GPL v3'] + +input: + - fasta: + type: file + description: Input genome fasta file + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - bigwig: + type: file + description: bigwig file containing the mappability of the genome + pattern: "*.{map.bw}" + +authors: + - "@sppearce" diff --git a/modules/hmmcopy/readcounter/main.nf b/modules/hmmcopy/readcounter/main.nf index 6399b1a2..a6e89f91 100644 --- a/modules/hmmcopy/readcounter/main.nf +++ b/modules/hmmcopy/readcounter/main.nf @@ -6,8 +6,8 @@ process HMMCOPY_READCOUNTER { conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_5' : - 'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_5' }" + 'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_7' : + 'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_7' }" input: tuple val(meta), path(bam), path(bai) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 7601671b..74719a30 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -685,6 +685,10 @@ hmmcopy/gccounter: - modules/hmmcopy/gccounter/** - tests/modules/hmmcopy/gccounter/** +hmmcopy/generatemap: + - modules/hmmcopy/generatemap/** + - tests/modules/hmmcopy/generatemap/** + hmmcopy/readcounter: - modules/hmmcopy/readcounter/** - tests/modules/hmmcopy/readcounter/** diff --git a/tests/modules/hmmcopy/generatemap/main.nf b/tests/modules/hmmcopy/generatemap/main.nf new file mode 100644 index 00000000..381420d3 --- /dev/null +++ b/tests/modules/hmmcopy/generatemap/main.nf @@ -0,0 +1,12 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HMMCOPY_GENERATEMAP } from '../../../../modules/hmmcopy/generatemap/main.nf' + +workflow test_hmmcopy_generatemap { + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + HMMCOPY_GENERATEMAP ( fasta ) +} diff --git a/tests/modules/hmmcopy/generatemap/nextflow.config b/tests/modules/hmmcopy/generatemap/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/hmmcopy/generatemap/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/hmmcopy/generatemap/test.yml b/tests/modules/hmmcopy/generatemap/test.yml new file mode 100644 index 00000000..274e5d0f --- /dev/null +++ b/tests/modules/hmmcopy/generatemap/test.yml @@ -0,0 +1,10 @@ +- name: hmmcopy generatemap test_hmmcopy_generatemap + command: nextflow run tests/modules/hmmcopy/generatemap -entry test_hmmcopy_generatemap -c tests/config/nextflow.config + tags: + - hmmcopy + - hmmcopy/generatemap + files: + - path: output/hmmcopy/genome.fasta.map.bw + md5sum: 7ad68224a1e40287978284c387e8eb70 + - path: output/hmmcopy/versions.yml + md5sum: f950580f94d8a2d88332c477972cb9f0 diff --git a/tests/modules/hmmcopy/readcounter/test.yml b/tests/modules/hmmcopy/readcounter/test.yml index a7e84f35..e13b0b8d 100644 --- a/tests/modules/hmmcopy/readcounter/test.yml +++ b/tests/modules/hmmcopy/readcounter/test.yml @@ -1,8 +1,10 @@ - name: hmmcopy readcounter test_hmmcopy_readcounter - command: nextflow run ./tests/modules/hmmcopy/readcounter -entry test_hmmcopy_readcounter -c ./tests/config/nextflow.config -c ./tests/modules/hmmcopy/readcounter/nextflow.config + command: nextflow run tests/modules/hmmcopy/readcounter -entry test_hmmcopy_readcounter -c tests/config/nextflow.config tags: - hmmcopy - hmmcopy/readcounter files: - path: output/hmmcopy/test.wig - md5sum: 3655d8325baea81b3b690791262c6b57 + md5sum: 4682778422b9a2510a3cb70bd13ccd08 + - path: output/hmmcopy/versions.yml + md5sum: 624a85e6a1bc61abc33cac03aea33a1e