diff --git a/.travis.yml b/.travis.yml index 56ffee9308..b05868916b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,22 +9,23 @@ addons: env: global: - - NXF_VER=0.31.0 SGT_VER=2.5.1 + - NXF_VER=0.32.0 matrix: - - CE=docker TEST=SOMATIC - - CE=docker TEST=ANNOTATEVEP - - CE=docker TEST=ANNOTATESNPEFF - - CE=docker TEST=GERMLINE - + - TEST=SOMATIC + - TEST=ANNOTATEVEP + - TEST=ANNOTATESNPEFF + - TEST=GERMLINE install: - # Install Nextflow (and Singularity if needed) - - "./scripts/install.sh --engine $CE" + # Install Nextflow + - curl -fsSL get.nextflow.io | bash + - chmod +x nextflow + - sudo mv nextflow /usr/local/bin/ # Donwload big containers for ANNOTATEVEP and ANNOTATESNPEF tests) - - "travis_retry ./scripts/containers.sh --profile $CE --test $TEST" + - "travis_retry ./scripts/containers.sh --profile docker --test $TEST" # Build references when needed -before_script: "./scripts/test.sh --profile $CE --test $TEST --build" +before_script: "./scripts/test.sh --profile docker --test $TEST --build" # Actual tests -script: "./scripts/test.sh --profile $CE --test $TEST" +script: "./scripts/test.sh --profile docker --test $TEST" diff --git a/CHANGELOG.md b/CHANGELOG.md index e226106c9e..aa4b2012c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### `Changed` - [#646](https://github.com/SciLifeLab/Sarek/pull/646) - Update [`pathfindr`](https://github.com/NBISweden/pathfindr) submodule +- [#659](https://github.com/SciLifeLab/Sarek/pull/659) - Update Nextflow to `0.32.0` - [#660](https://github.com/SciLifeLab/Sarek/pull/660) - Update docs ### `Fixed` - [#657](https://github.com/SciLifeLab/Sarek/pull/657) - Fix `RunMultiQC.nf` bug +- [#659](https://github.com/SciLifeLab/Sarek/pull/659) - Fix bugs due to updating Nextflow ## [2.2.0] - Skårki - 2018-09-21 diff --git a/annotate.nf b/annotate.nf index 493d63fa5a..d8a1bd9d2b 100644 --- a/annotate.nf +++ b/annotate.nf @@ -372,7 +372,7 @@ def nextflowMessage() { def sarekMessage() { // Display Sarek message - log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${params.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") + log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${workflow.manifest.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") } def startMessage() { diff --git a/buildContainers.nf b/buildContainers.nf index 69e869d646..c5706dc981 100644 --- a/buildContainers.nf +++ b/buildContainers.nf @@ -200,7 +200,7 @@ def helpMessage() { log.info " --containerPath: Select where to download images" log.info " Default: \$PWD" log.info " --tag`: Choose the tag for the containers" - log.info " Default (version number): " + params.version + log.info " Default (version number): " + workflow.manifest.version } def minimalInformationMessage() { @@ -222,7 +222,7 @@ def nextflowMessage() { def sarekMessage() { // Display Sarek message - log.info "Sarek ~ ${params.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") + log.info "Sarek ~ ${workflow.manifest.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") } def startMessage() { diff --git a/buildReferences.nf b/buildReferences.nf index 0a19ac3bcb..52a34af469 100644 --- a/buildReferences.nf +++ b/buildReferences.nf @@ -274,7 +274,7 @@ def nextflowMessage() { def sarekMessage() { // Display Sarek message - log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${params.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") + log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${workflow.manifest.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") } def startMessage() { diff --git a/conf/base.config b/conf/base.config index 1d20a8ad7f..02e12faa23 100644 --- a/conf/base.config +++ b/conf/base.config @@ -36,7 +36,6 @@ params { targetBED = false // no targets by default test = false // Not testing by default verbose = false // Enable for more verbose information - version = '2.2.0' // Workflow version } process { diff --git a/germlineVC.nf b/germlineVC.nf index ef9481832a..1cc9f39ddc 100644 --- a/germlineVC.nf +++ b/germlineVC.nf @@ -223,7 +223,7 @@ process CreateIntervalBeds { bedIntervals = bedIntervals .map { intervalFile -> - final duration = 0.0 + def duration = 0.0 for (line in intervalFile.readLines()) { final fields = line.split('\t') if (fields.size() >= 5) duration += fields[4].toFloat() @@ -673,7 +673,7 @@ def nextflowMessage() { def sarekMessage() { // Display Sarek message - log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${params.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") + log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${workflow.manifest.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") } def startMessage() { diff --git a/lib/SarekUtils.groovy b/lib/SarekUtils.groovy index 3c921be757..7b3f33df35 100644 --- a/lib/SarekUtils.groovy +++ b/lib/SarekUtils.groovy @@ -114,7 +114,7 @@ class SarekUtils { def f = file(fileToCheck) // this is an expanded wildcard: we can assume all files exist if (f instanceof List && f.size() > 0) return true - else if (!f.exists()) { + else if (!f.exists()) { println "Missing references: ${referenceFile} ${fileToCheck}" return false } @@ -184,7 +184,7 @@ class SarekUtils { // Compare params to list of verified params static def isAllowedParams(params) { - final test = true + def test = true params.each{ if (!checkParams(it.toString().split('=')[0])) { println "params ${it.toString().split('=')[0]} is unknown" diff --git a/main.nf b/main.nf index 4a6d6a3436..f130b42e9d 100644 --- a/main.nf +++ b/main.nf @@ -454,7 +454,7 @@ def checkUppmaxProject() { } def checkExactlyOne(list) { - final n = 0 + def n = 0 list.each{n += it ? 1 : 0} return n == 1 } @@ -668,7 +668,7 @@ def nextflowMessage() { def sarekMessage() { // Display Sarek message - log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${params.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") + log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${workflow.manifest.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") } def startMessage() { diff --git a/nextflow.config b/nextflow.config index 449e5a4001..bbfdf1d3a2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -9,11 +9,13 @@ */ manifest { + author = 'Szilvester Juhos, Maxime Garcia' description = 'Sarek - Workflow For Somatic And Germline Variations' homePage = 'http://sarek.scilifelab.se' mainScript = 'main.nf' name = 'Sarek' - nextflowVersion = '>=0.31.0' + nextflowVersion = '>=0.32.0' + version = '2.2.0' } env { diff --git a/runMultiQC.nf b/runMultiQC.nf index c83571e734..497e1f7505 100644 --- a/runMultiQC.nf +++ b/runMultiQC.nf @@ -63,7 +63,7 @@ process GetVersionAll { bwa &> v_bwa.txt 2>&1 || true configManta.py --version > v_manta.txt 2>&1 || true configureStrelkaGermlineWorkflow.py --version > v_strelka.txt 2>&1 || true - echo "${params.version}" &> v_sarek.txt 2>&1 || true + echo "${workflow.manifest.version}" &> v_sarek.txt 2>&1 || true echo "${workflow.nextflow.version}" &> v_nextflow.txt 2>&1 || true fastqc -v > v_fastqc.txt 2>&1 || true freebayes --version > v_freebayes.txt 2>&1 || true @@ -132,7 +132,7 @@ def checkUppmaxProject() { def createMultiQCconfig() { def file = workDir.resolve('multiqc_config.yaml') file.text = """ - custom_logo: ${baseDir}/doc/images/Sarek_no_Border.png + custom_logo: ${baseDir}/docs/images/Sarek_no_Border.png custom_logo_url: http://opensource.scilifelab.se/projects/sarek custom_logo_title: 'Sarek' report_header_info: @@ -191,7 +191,7 @@ def nextflowMessage() { def sarekMessage() { // Display Sarek message - log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${params.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") + log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${workflow.manifest.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") } def startMessage() { diff --git a/scripts/do_release.sh b/scripts/do_release.sh index 23f59e21c4..64f0220bcd 100755 --- a/scripts/do_release.sh +++ b/scripts/do_release.sh @@ -39,6 +39,6 @@ sed -i "s/\[Unreleased\]/[$RELEASE] - $CODENAME - $(date +'%Y-%m-%d')/g" CHANGEL sed -i "s/sarek-[0-9\.]\+/sarek-$RELEASE/g" Dockerfile sed -i "s/sarek-[0-9\.]\+/sarek-$RELEASE/g" environment.yml sed -i "s/sarek-[0-9\.]\+/sarek-$RELEASE/g" Singularity -sed -i "s/version = '[0-9\.]\+'/version = '$RELEASE'/g" conf/base.config +sed -i "s/version = '[0-9\.]\+'/version = '$RELEASE'/g" nextflow.config -git commit CHANGELOG.md Dockerfile environment.yml Singularity conf/base.config -m "preparing release $RELEASE [skip ci]" +git commit CHANGELOG.md Dockerfile environment.yml Singularity nextflow.config -m "preparing release $RELEASE [skip ci]" diff --git a/scripts/install.sh b/scripts/install.sh deleted file mode 100755 index cd466415dd..0000000000 --- a/scripts/install.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -set -euo pipefail - -CONTAINER_ENGINE="singularity" - -while [[ $# -gt 0 ]] -do - key="$1" - case $key in - -e|--engine) - CONTAINER_ENGINE="$2" - shift # past argument - shift # past value - ;; - *) # unknown option - shift # past argument - ;; - esac -done - -# Install Nextflow -mkdir /tmp/nextflow -cd /tmp/nextflow -wget -qO- get.nextflow.io | bash -sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow - -# Install Singularity -if [[ "$CONTAINER_ENGINE" = singularity ]] -then - if [[ "$SGT_VER" = '' ]] - then - SGT_VER=$(curl --silent "https://api.github.com/repos/Singularityware/Singularity/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') - fi - sudo apt-get install libarchive-dev squashfs-tools - mkdir /tmp/singularity - cd /tmp/singularity - wget https://github.com/singularityware/singularity/releases/download/$SGT_VER/singularity-$SGT_VER.tar.gz - tar xvf singularity-$SGT_VER.tar.gz - cd singularity-$SGT_VER - ./configure --prefix=/usr/local - make - sudo make install - cd ${TRAVIS_BUILD_DIR} - rm -rf /tmp/singularity -fi diff --git a/somaticVC.nf b/somaticVC.nf index 8ef338217d..ab77e879b4 100644 --- a/somaticVC.nf +++ b/somaticVC.nf @@ -233,7 +233,7 @@ process CreateIntervalBeds { bedIntervals = bedIntervals .map { intervalFile -> - final duration = 0.0 + def duration = 0.0 for (line in intervalFile.readLines()) { final fields = line.split('\t') if (fields.size() >= 5) duration += fields[4].toFloat() @@ -955,7 +955,7 @@ def returnStatus(it) { def sarekMessage() { // Display Sarek message - log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${params.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") + log.info "Sarek - Workflow For Somatic And Germline Variations ~ ${workflow.manifest.version} - " + this.grabRevision() + (workflow.commitId ? " [${workflow.commitId}]" : "") } def startMessage() {