mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
f469045a95
* fix: remove left-over unnecessary code * Adds --fakeroot option for singularity usage with DeepARG as workaround for broken conda dependency * Update modules/deeparg/downloaddata/main.nf Co-authored-by: Moritz E. Beber <midnighter@posteo.net> * Update modules/deeparg/predict/main.nf Co-authored-by: Moritz E. Beber <midnighter@posteo.net> * Apply suggestions from code review * Update main.nf * Update main.nf * Update main.nf * Update main.nf * Go back to original logic Co-authored-by: Moritz E. Beber <midnighter@posteo.net>
48 lines
1.6 KiB
Text
48 lines
1.6 KiB
Text
def VERSION="1.0.2"
|
|
|
|
process DEEPARG_PREDICT {
|
|
tag "$meta.id"
|
|
label 'process_medium'
|
|
|
|
conda (params.enable_conda ? "bioconda::deeparg=1.0.2" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity//deeparg:1.0.2--pyhdfd78af_1' :
|
|
'quay.io/biocontainers/deeparg:1.0.2--pyhdfd78af_1' }"
|
|
/*
|
|
We have to force singularity to run with --fakeroot to allow reading of a problematic file with borked read-write permissions in an upstream dependency (theanos).
|
|
This flag may not be available on all systems and may be considered a security problem. so please document and /or warn for this in your pipeline!
|
|
*/
|
|
containerOptions { "${workflow.containerEngine}" == 'singularity' ? '--fakeroot' : '' }
|
|
|
|
input:
|
|
tuple val(meta), path(fasta), val(model)
|
|
path(db)
|
|
|
|
output:
|
|
tuple val(meta), path("*.align.daa") , emit: daa
|
|
tuple val(meta), path("*.align.daa.tsv") , emit: daa_tsv
|
|
tuple val(meta), path("*.mapping.ARG") , emit: arg
|
|
tuple val(meta), path("*.mapping.potential.ARG"), emit: potential_arg
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
"""
|
|
deeparg \\
|
|
predict \\
|
|
$args \\
|
|
-i $fasta \\
|
|
-o ${prefix} \\
|
|
-d $db \\
|
|
--model $model
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
deeparg: $VERSION
|
|
END_VERSIONS
|
|
"""
|
|
}
|