Allow to pass arguments to the phantompeakqualtools script itself (#1562)

* 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>
This commit is contained in:
Jose Espinosa-Carrasco 2022-04-25 19:07:43 +02:00 committed by GitHub
parent 569e07f0af
commit 6a46e7cf11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,10 +23,11 @@ process PHANTOMPEAKQUALTOOLS {
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"
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}":