These are chat archives for nextflow-io/nextflow

18th
Oct 2018
Paolo Di Tommaso
@pditommaso
Oct 18 2018 08:37
@LukeGoodsell unfortunately NF does not provide any special feature to handle this use case. it may require a custom extension or a intermediate broker to handle the remote daemons
LukeGoodsell
@LukeGoodsell
Oct 18 2018 08:39
Thanks. It’s a bit of an unusual task, so I’m not surprised there’s no built-in support.
arontommi
@arontommi
Oct 18 2018 09:53
is there a way to spit out all params defined and their values when launching a workflow ?
Paolo Di Tommaso
@pditommaso
Oct 18 2018 09:53
what do you mean?
Maxime Garcia
@MaxUlysse
Oct 18 2018 09:55
something like println ${params} ?
arontommi
@arontommi
Oct 18 2018 09:57
i start a workflow and it puts out :
N E X T F L O W ~ version 0.32.0
Launching main.nf [mighty_brenner] - revision: f7c4c6fcb4
params :
params.someparam = value
param.nextparam = value2
[warm up] executor > slurm
thanks @MaxUlysse wil try
Paolo Di Tommaso
@pditommaso
Oct 18 2018 09:58
ah, yes as @MaxUlysse suggested
tho so much readable
you can also do
params.each { k,v -> println "$k=$v" }
Brad Langhorst
@bwlang
Oct 18 2018 10:09

@pditommaso :just to let you know

    publishDir "${outputDir}", mode: 'copyNoFollow', pattern: 'bams_for_import/*'
    ...
     output:
         ...
        file('bams_for_import/*')

produced the desired set of relative symlinks

THanks for your help with this unusual use case ;)
Paolo Di Tommaso
@pditommaso
Oct 18 2018 10:14
Oh, happy you have solved. Tho didn't help so much :grin:
Brad Langhorst
@bwlang
Oct 18 2018 10:20
key insight that I learned from this adventure was that you must have an output to make files available to publishDir. I was thinking about how to improve the docs. Maybe "The publishDir directive allows you to publish the process output files to a specified folder. For example:” -> "The publishDir directive allows you to publish the process output files mentioned in the “output:” section to a specified folder. For example:”?
Rad Suchecki
@rsuchecki
Oct 18 2018 10:30
A warning could be printed if publishDir directive is used without a declared output...
Brad Langhorst
@bwlang
Oct 18 2018 10:39
@rsuchecki : even better - who reads docs any way ;)
arontommi
@arontommi
Oct 18 2018 10:39
@pditommaso great thanks for that!
Rad Suchecki
@rsuchecki
Oct 18 2018 11:00
indeed @bwlang - or read and forget :stuck_out_tongue_winking_eye:
arontommi
@arontommi
Oct 18 2018 11:11
If i set a parameter when running that is already set in nextflow.config why does the nextflow.config one not get overwriten ?
for the run then i mean?
Félix C. Morency
@fmorency
Oct 18 2018 14:10
can you post your nextflow.config and your command-line?
Chris Fields
@cjfields
Oct 18 2018 18:44
I've run into an odd issue w/ Nextflow which I'm pretty sure is related to interpolation: HPCBio/16S-rDNA-dada2-pipeline#1
It's primarily an issue w/ calling R code with a boolean
My gut feeling is that we need a simple Groovy helper function to clean up a subset of the Nextflow parameters to make them R-friendly. There is a simple workaround for now (use 'T' or 'F'), but it's a little annoying
Rad Suchecki
@rsuchecki
Oct 18 2018 23:38

Can't expect syntax to always agree between programming languages or we'd only have one :wink:
Init params.pool to false in nextflow config and then in your RScript:

if("${params.pool}"=="pseudo"){
    pool <- "pseudo"
} else {
    eval(parse(text=${params.pool.toString().toUpperCase()}))
}

Or as you say, you could prep your params for R

paramsR =[:]
params.each {k,v ->
  paramsR.v = v instanceof Boolean ? v.toString().toUpperCase() : v
}