nf-core_modules/modules/kronatools/ktimporttaxonomy/main.nf

40 lines
1.3 KiB
Text
Raw Normal View History

add Kronatools KTImportTaxonomy (#928) * created and initialised krona module * Added kronatools/ktimporttaxonomy module * removing previous redundant work * added contains info for html * edited contains in test.yml * Update get versions Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> * remove old syntax Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> * rewording module description Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> * added detailed keywords Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> * update syntax and tool version * fixed meta.yml issues * remove contains line from test.yml * re-wrote module after nf-core/tools update - should work now * removed md5 * Update modules/kronatools/ktimporttaxonomy/main.nf Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> * update meta save * removed typo * double quotes to single quotes around html * re-ran test, which updated md5 * removed md5 * 'classifier' removed to fix linting * update version * removed erroneous ktimporttaxonomy2 * Updated input to include meta and database * fixed tab issues in yaml * added `contains` to test.yml * edited `contains` in test.yml * trying another `contains` * retrying `contains` * contains with extra line * removed classifier from tag * Apply suggestions from code review * Update meta.yml Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
2021-11-15 17:40:46 +00:00
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
params.options = [:]
options = initOptions(params.options)
process KRONATOOLS_KTIMPORTTAXONOMY {
tag "${meta.id}"
label 'process_high'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
conda (params.enable_conda ? "bioconda::krona=2.8" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/krona:2.8--pl5262hdfd78af_2"
} else {
container "quay.io/biocontainers/krona:2.8--pl5262hdfd78af_2"
}
input:
tuple val(meta), path(report)
path "taxonomy/taxonomy.tab"
output:
tuple val(meta), path ('*.html'), emit: html
path "versions.yml" , emit: versions
script:
def VERSION='2.8'
"""
ktImportTaxonomy "$report" -tax taxonomy
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: $VERSION
END_VERSIONS
"""
}