mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-26 12:28:17 +00:00
292e8eceb9
* Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Add MALT with incomplete tests * Parameter typo fix * Clean up test yaml * Finish MALT module prior UNZIP and MALT_BUILD modiules * Add required modules for tests * Sync test out with malt-build * Fix input parameters in tests based on final build module * Update modules/malt/run/meta.yml Co-authored-by: Gregor Sturm <mail@gregor-sturm.de> Co-authored-by: Gregor Sturm <mail@gregor-sturm.de>
54 lines
1.7 KiB
Text
54 lines
1.7 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process MALT_RUN {
|
|
|
|
label 'process_high_memory'
|
|
publishDir "${params.outdir}",
|
|
mode: params.publish_dir_mode,
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) }
|
|
|
|
conda (params.enable_conda ? "bioconda::malt=0.5.2" : null)
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
container "https://depot.galaxyproject.org/singularity/malt:0.5.2--0"
|
|
} else {
|
|
container "quay.io/biocontainers/malt:0.5.2--0"
|
|
}
|
|
|
|
input:
|
|
path fastqs
|
|
val mode
|
|
path index
|
|
|
|
output:
|
|
path "*.rma6" , emit: rma6
|
|
path "*.{tab,text,sam}", optional:true, emit: alignments
|
|
path "*.log" , emit: log
|
|
path "*.version.txt" , emit: version
|
|
|
|
script:
|
|
def software = getSoftwareName(task.process)
|
|
def avail_mem = 6
|
|
if (!task.memory) {
|
|
log.info '[MALT_RUN] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.'
|
|
} else {
|
|
avail_mem = task.memory.giga
|
|
}
|
|
|
|
"""
|
|
malt-run \\
|
|
-J-Xmx${avail_mem}g \\
|
|
-t ${task.cpus} \\
|
|
-v \\
|
|
-o . \\
|
|
$options.args \\
|
|
--inFile ${fastqs.join(' ')} \\
|
|
-m $mode \\
|
|
--index $index/ |&tee malt-run.log
|
|
|
|
echo \$(malt-run --help 2>&1) | grep -o 'version.* ' | cut -f 1 -d ',' | cut -f2 -d ' ' > ${software}.version.txt
|
|
"""
|
|
}
|