Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

update Nextflow to 0.32.0 and fix bugs #659

Merged
merged 4 commits into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion annotate.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions buildContainers.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion buildReferences.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions germlineVC.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions lib/SarekUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def checkUppmaxProject() {
}

def checkExactlyOne(list) {
final n = 0
def n = 0
list.each{n += it ? 1 : 0}
return n == 1
}
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 3 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions runMultiQC.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions scripts/do_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
45 changes: 0 additions & 45 deletions scripts/install.sh

This file was deleted.

4 changes: 2 additions & 2 deletions somaticVC.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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() {
Expand Down