mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-15 06:03:10 +00:00
977d96ed0b
* add racon * add racon * add racon * add racon module * add racon module * edit racon module * edit racon module * edit racon module * edit racon module Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> Co-authored-by: Chris Cheshire <chris.j.cheshire@gmail.com>
45 lines
1.5 KiB
Text
45 lines
1.5 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process RACON {
|
|
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::racon=1.4.20" : null)
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
container "https://depot.galaxyproject.org/singularity/racon:1.4.20--h9a82719_1"
|
|
} else {
|
|
container "quay.io/biocontainers/racon:1.4.20--h9a82719_1"
|
|
}
|
|
|
|
input:
|
|
tuple val(meta), path(reads), path(assembly), path(paf)
|
|
|
|
output:
|
|
tuple val(meta), path('*_assembly_consensus.fasta.gz') , emit: improved_assembly
|
|
path "versions.yml" , emit: versions
|
|
|
|
script:
|
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
|
"""
|
|
racon -t "${task.cpus}" \\
|
|
"${reads}" \\
|
|
"${paf}" \\
|
|
$options.args \\
|
|
"${assembly}" > \\
|
|
${prefix}_assembly_consensus.fasta
|
|
|
|
gzip -n ${prefix}_assembly_consensus.fasta
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
${getProcessName(task.process)}:
|
|
${getSoftwareName(task.process)}: \$( racon --version 2>&1 | sed 's/^.*v//' )
|
|
END_VERSIONS
|
|
"""
|
|
}
|