mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
6a46e7cf11
* Allow to pass arguments to the script itself * Place args2 correctly * Define args2 aaaaarrrrgggg * Testing locally before commiting is a good practice * Update modules/phantompeakqualtools/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
37 lines
1.2 KiB
Text
37 lines
1.2 KiB
Text
def VERSION = '1.2.2' // Version information not provided by tool on CLI
|
|
|
|
process PHANTOMPEAKQUALTOOLS {
|
|
tag "$meta.id"
|
|
label 'process_medium'
|
|
|
|
conda (params.enable_conda ? "bioconda::phantompeakqualtools=1.2.2" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/phantompeakqualtools:1.2.2--0' :
|
|
'quay.io/biocontainers/phantompeakqualtools:1.2.2--0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(bam)
|
|
|
|
output:
|
|
tuple val(meta), path("*.out") , emit: spp
|
|
tuple val(meta), path("*.pdf") , emit: pdf
|
|
tuple val(meta), path("*.Rdata"), emit: rdata
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def args2 = task.ext.args2 ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
"""
|
|
RUN_SPP=`which run_spp.R`
|
|
Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" $args2
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
phantompeakqualtools: $VERSION
|
|
END_VERSIONS
|
|
"""
|
|
}
|