These are chat archives for nextflow-io/nextflow

Nov 2017
Tim Diels
Nov 06 2017 11:26
When I call error('msg'), the pipeline does not eventually exit. Is there some other function to abort?
Paolo Di Tommaso
Nov 06 2017 11:27
it should, how are you using it ?
Tim Diels
Nov 06 2017 11:30
// Parse species.txt
    .splitCsv(sep: "\t", header: true)
    .map {
        def specie = [
            proteome: Paths.get(it.proteome),
            longName: it.long_name,
            orthofinder: it.orthofinder.toBoolean(),
            phyml: it.phyml.toBoolean(),
            interproscan: it.interproscan.toBoolean(),
            blast2go: it.blast2go.toBoolean(),
            clime: it.clime.toBoolean(),

        // Assert proteome is an absolute path
        if (!specie.proteome.isAbsolute()) {
                "$'s proteome must be an absolute path, got: $specie.proteome"

        // Assert OrthoFinder is set when PhyML is set
        if (!specie.orthofinder && specie.phyml) {
                "$ has PhyML set, but not OrthoFinder. PhyML requires " +
                "OrthoFinder. Please set OrthoFinder as well or unset PhyML."

        // Assert PhyML is set when CLIME is set
        if (!specie.phyml && specie.clime) {
                "$ has CLIME set, but not PhyML. CLIME requires " +
                "PhyML. Please set PhyML as well or unset CLIME."

        return specie
    .set { species }
Paolo Di Tommaso
Nov 06 2017 11:31
yes, it should stop
any error message or something in the .nextflow.log file ?
Tim Diels
Nov 06 2017 11:47

Hmm, the case I'm referring to doesn't even reach the error actually,

$ ./ 
Picked up JAVA_TOOL_OPTIONS: -XX:ParallelGCThreads=1
N E X T F L O W  ~  version 0.24.2
Launching `/home/tidie/projects/cedalion/` [trusting_hypatia] - revision: ba99cac2c0
ERROR ~ Cannot invoke method toBoolean() on null object

 -- Check script '' at line: 115 or see '.nextflow.log' file for more details
[warm up] executor > local
[warm up] executor > sge

Perhaps that's intended?

Paolo Di Tommaso
Nov 06 2017 11:47
use the safe field navigator e.g. it?.orthofinder?.toBoolean()
however it should not hang
could you check in the .nextflow.log file the error stack trace and open an issue for that ?
Tim Diels
Nov 06 2017 11:56
done nextflow-io/nextflow#506
val value from manyValues
file f from oneFile
This only runs on the first value + f, doesn't it?
If I change val to each, it should repeat oneFile for each value, right?
Paolo Di Tommaso
Nov 06 2017 12:19
no, it can be executed as many times as manyValues provided oneFile is a value channel
the easiest way is to use oneFile.first()