From c1506cf9f3344253a967133d1aa4e5864f3c709d Mon Sep 17 00:00:00 2001 From: maxibor Date: Tue, 16 Apr 2019 12:13:03 +0200 Subject: [PATCH 1/9] add singularity fix for multiprocessing --- nextflow.config | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/nextflow.config b/nextflow.config index 8924f2256..7e4878118 100644 --- a/nextflow.config +++ b/nextflow.config @@ -6,7 +6,6 @@ */ // Global default params, used in configs params { - //Pipeline options aligner = 'bwa' @@ -21,17 +20,14 @@ params { outdir = './results' bwa_index = false - //More defaults complexity_filter = false complexity_filter_poly_g_min = 10 trim_bam = false - //Skipping adapterremoval, trimming or collapsing defaults skip_adapterremoval = false skip_trim = false skip_adapterremoval = false - // Boilerplate options name = false multiqc_config = "$baseDir/assets/multiqc_config.yaml" @@ -52,10 +48,9 @@ params { config_profile_contact = false config_profile_url = false } - // Container slug. Stable releases should specify release tag! // Developmental code should specify :dev -process.container = 'nfcore/eager:2.0.7' +process.container = 'nfcore/eager: 2.0.7' // Load base.config by default for all pipelines includeConfig 'conf/base.config' @@ -68,27 +63,33 @@ try { } profiles { - awsbatch { includeConfig 'conf/awsbatch.config' } - conda { process.conda = "$baseDir/environment.yml" } - debug { process.beforeScript = 'echo $HOSTNAME' } + awsbatch { includeConfig 'conf/awsbatch.config' + } + conda { process.conda = "$baseDir/environment.yml" + } + debug { process.beforeScript = 'echo $HOSTNAME' + } docker { docker.enabled = true } singularity { singularity.enabled = true + singularity.runOptions = '-B /run/shm:/run/shm' + } + test { includeConfig 'conf/test.config' + } + testbam { includeConfig 'conf/testbam.config' + } + test_fna { includeConfig 'conf/test_fna.config' } - test { includeConfig 'conf/test.config' } - testbam { includeConfig 'conf/testbam.config' } - test_fna { includeConfig 'conf/test_fna.config' } } - // Load igenomes.config if required if(!params.igenomesIgnore){ includeConfig 'conf/igenomes.config' } - // Capture exit codes from upstream processes when piping -process.shell = ['/bin/bash', '-euo', 'pipefail'] +process.shell = ['/bin/bash', '-euo', 'pipefail' +] timeline { enabled = true @@ -110,13 +111,12 @@ dag { manifest { name = 'nf-core/eager' author = 'Alexander Peltzer, Stephen Clayton, James A. Fellows Yates, Maxime Borry' - homePage = 'https://github.com/nf-core/eager' + homePage = 'https: //github.com/nf-core/eager' version = '2.0.7' description = 'A fully reproducible ancient and modern DNA pipeline in Nextflow and with cloud support.' mainScript = 'main.nf' nextflowVersion = '>=0.32.0' } - // Function to ensure that resource requirements don't go beyond // a maximum limit def check_max(obj, type) { @@ -148,4 +148,4 @@ def check_max(obj, type) { return obj } } -} +} \ No newline at end of file From 4c31eb92bd4ab28d2aecfdd3dec2add9fba55e97 Mon Sep 17 00:00:00 2001 From: maxibor Date: Tue, 16 Apr 2019 12:16:10 +0200 Subject: [PATCH 2/9] switch docker tag to dev --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 7e4878118..987af4391 100644 --- a/nextflow.config +++ b/nextflow.config @@ -50,7 +50,7 @@ params { } // Container slug. Stable releases should specify release tag! // Developmental code should specify :dev -process.container = 'nfcore/eager: 2.0.7' +process.container = 'nfcore/eager: dev' // Load base.config by default for all pipelines includeConfig 'conf/base.config' From 7efb13adcfc3b7d0df5048ababbb1872e2f9cdc4 Mon Sep 17 00:00:00 2001 From: maxibor Date: Tue, 16 Apr 2019 12:17:34 +0200 Subject: [PATCH 3/9] remove inserted space in container tag --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 987af4391..10784a7fa 100644 --- a/nextflow.config +++ b/nextflow.config @@ -50,7 +50,7 @@ params { } // Container slug. Stable releases should specify release tag! // Developmental code should specify :dev -process.container = 'nfcore/eager: dev' +process.container = 'nfcore/eager:dev' // Load base.config by default for all pipelines includeConfig 'conf/base.config' From 1ca4c4688bf1d96fb3f994b013e91922b80a0e00 Mon Sep 17 00:00:00 2001 From: maxibor Date: Mon, 29 Apr 2019 17:40:06 +0200 Subject: [PATCH 4/9] fix encoding for pmdtools --- main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.nf b/main.nf index 248e68e44..320eeec8c 100644 --- a/main.nf +++ b/main.nf @@ -1155,9 +1155,9 @@ process pmdtools { } """ #Run Filtering step - samtools fillmd -b $bam $fasta | pmdtools --threshold ${params.pmdtools_threshold} $treatment $snpcap --header | samtools view -@ ${task.cpus} -Sb - > "${bam.baseName}".pmd.bam + samtools calmd -b $bam $fasta | samtools view -h - | pmdtools --threshold ${params.pmdtools_threshold} $treatment $snpcap --header | samtools view -@ ${task.cpus} -Sb - > "${bam.baseName}".pmd.bam #Run Calc Range step - #samtools fillmd -b $bam $fasta | pmdtools --deamination --range ${params.pmdtools_range} $treatment $snpcap -n ${params.pmdtools_max_reads} > "${bam.baseName}".cpg.range."${params.pmdtools_range}".txt + samtools calmd -b $bam $fasta | samtools view -h - | pmdtools --deamination --range ${params.pmdtools_range} $treatment $snpcap -n ${params.pmdtools_max_reads} > "${bam.baseName}".cpg.range."${params.pmdtools_range}".txt """ } From 7fce8cb7d0469d8675576c833d3b1e27173609ad Mon Sep 17 00:00:00 2001 From: maxibor Date: Mon, 29 Apr 2019 17:45:47 +0200 Subject: [PATCH 5/9] testing pmdtools --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 324631779..3ef803feb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,6 +42,8 @@ script: - nf-core lint ${TRAVIS_BUILD_DIR} # Run the basic pipeline with the test profile - nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --saveReference + # Test using PMD tools + - nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --run_pmdtools --pairedEnd # Run the basic pipeline with single end data (pretending its single end actually) - nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --singleEnd --bwa_index results/reference_genome/bwa_index/BWAIndex/Mammoth_MT_Krause.fasta # Run the basic pipeline with paired end data without collapsing From 6ea755f45da2c5fc839900a6035714f0179b1c68 Mon Sep 17 00:00:00 2001 From: maxibor Date: Mon, 29 Apr 2019 17:52:58 +0200 Subject: [PATCH 6/9] remove autoformat change --- nextflow.config | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nextflow.config b/nextflow.config index a5e9f6620..8c8bc4314 100644 --- a/nextflow.config +++ b/nextflow.config @@ -88,8 +88,7 @@ if(!params.igenomesIgnore){ includeConfig 'conf/igenomes.config' } // Capture exit codes from upstream processes when piping -process.shell = ['/bin/bash', '-euo', 'pipefail' -] +process.shell = ['/bin/bash', '-euo', 'pipefail'] timeline { enabled = true @@ -111,7 +110,7 @@ dag { manifest { name = 'nf-core/eager' author = 'Alexander Peltzer, Stephen Clayton, James A. Fellows Yates, Maxime Borry' - homePage = 'https: //github.com/nf-core/eager' + homePage = 'https://github.com/nf-core/eager' version = '2.0.7dev' description = 'A fully reproducible ancient and modern DNA pipeline in Nextflow and with cloud support.' mainScript = 'main.nf' From c07e559424ae09eb9c9a2f7dd36766f703c89dca Mon Sep 17 00:00:00 2001 From: maxibor Date: Mon, 29 Apr 2019 17:55:53 +0200 Subject: [PATCH 7/9] remove unnecessary linebreaks --- nextflow.config | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/nextflow.config b/nextflow.config index 8c8bc4314..ddc556b40 100644 --- a/nextflow.config +++ b/nextflow.config @@ -63,12 +63,9 @@ try { } profiles { - awsbatch { includeConfig 'conf/awsbatch.config' - } - conda { process.conda = "$baseDir/environment.yml" - } - debug { process.beforeScript = 'echo $HOSTNAME' - } + awsbatch { includeConfig 'conf/awsbatch.config'} + conda { process.conda = "$baseDir/environment.yml"} + debug { process.beforeScript = 'echo $HOSTNAME'} docker { docker.enabled = true } @@ -76,12 +73,9 @@ profiles { singularity.enabled = true singularity.runOptions = '-B /run/shm:/run/shm' } - test { includeConfig 'conf/test.config' - } - testbam { includeConfig 'conf/testbam.config' - } - test_fna { includeConfig 'conf/test_fna.config' - } + test { includeConfig 'conf/test.config'} + testbam { includeConfig 'conf/testbam.config'} + test_fna { includeConfig 'conf/test_fna.config'} } // Load igenomes.config if required if(!params.igenomesIgnore){ From e29835bca3bba58d2cfff4491711c91ee1cc2a9b Mon Sep 17 00:00:00 2001 From: maxibor Date: Mon, 29 Apr 2019 18:00:23 +0200 Subject: [PATCH 8/9] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71b5db521..501fca5a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. * [#196](https://github.com/nf-core/eager/pull/196) - Fix reference [issues](https://github.com/nf-core/eager/issues/150) * [#196](https://github.com/nf-core/eager/pull/196) - Fix issues with PE data being mapped incompletely * [#200](https://github.com/nf-core/eager/pull/200) - Fix minor issue with some [typos](https://github.com/nf-core/eager/pull/196) +* [#210](https://github.com/nf-core/eager/pull/210) - Fix PMDTools [encoding issue](https://github.com/pontussk/PMDtools/issues/6) from `samtools calmd` generated files by running through `samtools view` first + ### `Dependencies` From 578d11c76db93ea8b088dcfbd06a953dd0dd96cc Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Tue, 30 Apr 2019 11:07:32 +0200 Subject: [PATCH 9/9] Update nextflow.config Co-Authored-By: maxibor --- nextflow.config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nextflow.config b/nextflow.config index ddc556b40..b1a22bfac 100644 --- a/nextflow.config +++ b/nextflow.config @@ -71,7 +71,6 @@ profiles { } singularity { singularity.enabled = true - singularity.runOptions = '-B /run/shm:/run/shm' } test { includeConfig 'conf/test.config'} testbam { includeConfig 'conf/testbam.config'} @@ -141,4 +140,4 @@ def check_max(obj, type) { return obj } } -} \ No newline at end of file +}