TheJacksonLaboratory / splicing-pipelines-nf

Repository for the Anczukow-Lab splicing pipeline
14 stars 9 forks source link

Nextflow Update #325

Open angarb opened 2 years ago

angarb commented 2 years ago

Problem

Error when I try to run the pipeline on Sumner:

Check script '/projects/anczukow-lab/splicing_pipeline/splicing-pipelines-nf/main.nf' at line: 261 or see '.nextflow.log' file for more 
details
-------------------------------------------------------------
Apr-25 18:39:09.281 [main] DEBUG nextflow.Session - Session aborted -- Cause: The access of `config` object is deprecated
Apr-25 18:39:09.291 [main] ERROR nextflow.cli.Launcher - @unknown
groovy.lang.DeprecationException: The access of `config` object is deprecated
NOTE: Nextflow is not tested with Java 1.8.0_222 -- It's recommended the use of version 11 up to 18

NOTE: Nextflow is not tested with Java 1.8.0_222 -- It's recommended the use of version 11 up to 18' //

Solution

The Sumner pipeline automatically downloads the newest version of Nextflow. The newest versions of Nextflow complain that the config object is deprecated and the pipeline refuses to run because the newer versions of Nextflow make the DSL2 syntax the default. Also no longer works reliably with Java pre-version 11 (we used to run it w/ ver 8).

We haven't prepared the pipeline for this version, so there can be many surprises. For one - 'into' is deprecated, and we have it all over the place, both in v1.0 and v2.0+ https://www.nextflow.io/docs/latest/operator.html#into We would have to change the pipeline a lot in many places.

Quick Fix: To fix the DSL2 default, you can either add this line near the top of main.nf: 'nextflow.enable.dsl = 1' or in the bash script launching nextflow, add the line 'export NXF_DEFAULT_DSL=1' before calling nextflow. Or to specify the same version as on cloudos when you run, try adding export NXF_VER=20.04.1 before the nextflow run command.

cgpu commented 2 years ago

@angarb Brittany this is a very good point, we have to ping the version of Nextflow, similarly done here https://github.com/nf-core/sarek/blob/bcd7bf9cb98cddec27bb54fb47ee122c09388c02/nextflow.config#L279.

I will create a small PR to address this.