These are chat archives for nextflow-io/nextflow

8th
Nov 2018
Alexander Peltzer
@apeltzer
Nov 08 2018 08:08
I looked at the singularity scope documentation in the nextflow docs, but couldn't find that part. There is a user with a cluster installation that sets the SINGULARITY_BINDPATH variable manually to the directory he runs jobs in... Can I propagate that somehow?
Alexander Peltzer
@apeltzer
Nov 08 2018 08:48

Other small issue: A process (QIIME2) needs to write a couple of files to $TMPDIR apparently, thus i set the docker scope to use this

temp = 'auto'
runOptions = 'TMPDIR=$PWD/tmp'

However, this is somehow not set and/or the incorrect way of doing this...

Paolo Di Tommaso
@pditommaso
Nov 08 2018 09:00
I think envWhitelist does that
Alexander Peltzer
@apeltzer
Nov 08 2018 09:06
I'll test it :-)
Alexander Peltzer
@apeltzer
Nov 08 2018 14:26
Second problem seems to stay weird. The required temp variables are all present and there but running the same (!) container with singularity seems to simply work
Riccardo Giannico
@giannicorik_twitter
Nov 08 2018 15:56
Hi guys, how can a process print a "file" collected channel list into a file (one element per line)?
If I use echo, elements are separated by space, how can I separate by newline?
Example:
Channel.from('first','second','third').set{ ch_a }

process myproc{
   input: 
   file (elem) from ch_a.collect()
   """
   echo "${elem}" > file.txt       # this produces "first second third"
   """
}
Tobias Neumann
@t-neumann
Nov 08 2018 16:10
I would like to set a container directive in a process if a variable is set. Struggling a bit - can anyone point me to why this is not working? if( params.legacy ) { container = 'zuberlab/crispr-nf:0.5.5' }
Maxime Garcia
@MaxUlysse
Nov 08 2018 16:14
you want to do that in a process or outside the process ?
Tobias Neumann
@t-neumann
Nov 08 2018 16:14
in a process - I know it's not the way how would do that properly, but I need it for certain reasons
probably cannot access parameters in the config right?
Maxime Garcia
@MaxUlysse
Nov 08 2018 16:16
yes you can
In your case you would want one container if your variable is set and what if it's not set?
Riccardo Giannico
@giannicorik_twitter
Nov 08 2018 16:20
@giannicorik_twitter I reply to myself..
I decided to go with this suboptimal full-bash solution :
echo "${elem}" | sed -e "s/\\s/\\n/g" > file.txt
Riccardo Giannico
@giannicorik_twitter
Nov 08 2018 16:47
or even better ls -1 ${elem} > file.txt
Tobias Neumann
@t-neumann
Nov 08 2018 17:08
@MaxUlysse Awesome - that already solves my question. I would have stuck to the default container if the variable is not set - but the solution you pointed to is much more elgant. thanks
Shawn Rynearson
@srynobio
Nov 08 2018 18:53

I just have a question to clarify: is this the proper way to use selectors?

config file

process {
    withLabel: big_mem {
        cpus = 16
        memory = 64.GB
        queue = 'long'
    }
}

nf script

process doWork {
    withLabel: 'big_mem'

    shell:
    do stuff
}
Max Hargreaves
@DiDeoxy
Nov 08 2018 21:45
does anyone have experience with publishDir and fastqc? SO far its publishes symlinks (expected) that lead to zip archives that don't work. When I go to the temp directory storing the data the zip archives there also do not work. I am on Ubuntu 18.04 using nextflow with docker. WHen I say the don't work archive manager says "error occured while loading the archive" and using unzip in the console give an error of "End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive."
Thanks in advanced!
my docker containers are built with alpine linux
Max Hargreaves
@DiDeoxy
Nov 08 2018 21:57
there are symlinks in the temp directory to my input files that function properly
Alexander Peltzer
@apeltzer
Nov 08 2018 22:11
Have a look in the main.nf https://github.com/nf-core/rnaseq