From 3b950359630b9455ded5be5e8758fc457f819359 Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Thu, 18 Jul 2024 13:10:10 -0400 Subject: [PATCH 1/9] only make bin depths plots for cases w >2 samples and >2 bins --- subworkflows/local/depths.nf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/subworkflows/local/depths.nf b/subworkflows/local/depths.nf index 87fc21cc..ffe89daa 100644 --- a/subworkflows/local/depths.nf +++ b/subworkflows/local/depths.nf @@ -10,6 +10,14 @@ def getColNo(filename) { return lines[0].split('\t').size() } +/* + * Get number of rows in a file + */ +def getRowNo(filename) { + lines = file(filename).readLines() + return lines.size() +} + workflow DEPTHS { take: bins_unbins //channel: val(meta), [ path(bins) ] @@ -53,9 +61,10 @@ workflow DEPTHS { .collectFile(name:'sample_groups.tsv'){ meta, reads -> meta.id + '\t' + meta.group + '\n' } // Filter MAG depth files: use only those for plotting that contain depths for > 2 samples + // as well as > 2 bins ch_mag_depths_plot = MAG_DEPTHS.out.depths .map { meta, bin_depths_file -> - if (getColNo(bin_depths_file) > 2) [ meta, bin_depths_file ] + if (getColNo(bin_depths_file) > 2 && getRowNo(bin_depths_file) > 2) [ meta, bin_depths_file ] } MAG_DEPTHS_PLOT ( ch_mag_depths_plot, ch_sample_groups.collect() ) From 66a0af4a4922c1b23dcea63037a86feb7db337e0 Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 9 Aug 2024 13:52:06 -0400 Subject: [PATCH 2/9] clarify when clustered heatmaps will be produced as outputs --- docs/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/output.md b/docs/output.md index d044e544..96d2f82c 100644 --- a/docs/output.md +++ b/docs/output.md @@ -454,7 +454,7 @@ For each bin or refined bin the median sequencing depth is computed based on the - `GenomeBinning/depths/bins/` - `bin_depths_summary.tsv`: Summary of bin sequencing depths for all samples. Depths are available for samples mapped against the corresponding assembly, i.e. according to the mapping strategy specified with `--binning_map_mode`. Only for short reads. - `bin_refined_depths_summary.tsv`: Summary of sequencing depths for refined bins for all samples, if refinement was performed. Depths are available for samples mapped against the corresponding assembly, i.e. according to the mapping strategy specified with `--binning_map_mode`. Only for short reads. - - `[assembler]-[binner]-[sample/group]-binDepths.heatmap.png`: Clustered heatmap showing bin abundances of the assembly across samples. Bin depths are transformed to centered log-ratios and bins as well as samples are clustered by Euclidean distance. Again, sample depths are available according to the mapping strategy specified with `--binning_map_mode`. + - `[assembler]-[binner]-[sample/group]-binDepths.heatmap.png`: Clustered heatmap showing bin abundances of the assembly across samples. Bin depths are transformed to centered log-ratios and bins as well as samples are clustered by Euclidean distance. Again, sample depths are available according to the mapping strategy specified with `--binning_map_mode`. If a sample produces only a single bin, a heatmap will not be provided. From f7c8acae66a94cb91a2dcc7f7615c2bd8d3bfb86 Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 9 Aug 2024 13:52:20 -0400 Subject: [PATCH 3/9] add bug fix 639 to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93022c43..04a1b2ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Changed` ### `Fixed` +- [#639](https://github.com/nf-core/mag/pull/639) - Fix pipeline failure when a sample produces only a single bin (fix by @d-callan) ### `Dependencies` From bd3e81309ef18976adf72862bd24114279982c9b Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Sat, 10 Aug 2024 11:02:22 +0000 Subject: [PATCH 4/9] [automated] Fix code linting --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04a1b2ba..aefb1372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Changed` ### `Fixed` + - [#639](https://github.com/nf-core/mag/pull/639) - Fix pipeline failure when a sample produces only a single bin (fix by @d-callan) ### `Dependencies` From 83f1fe79ad8e0e08a131c889438b1f4785c0a7d6 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 15 Aug 2024 16:23:48 +0200 Subject: [PATCH 5/9] Add @d-callan and other recent code contributors --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b2a723eb..f92e844f 100644 --- a/README.md +++ b/README.md @@ -77,14 +77,25 @@ When group-wise co-assembly is enabled, `SPAdes` is run on accordingly pooled re ## Credits -nf-core/mag was written by [Hadrien Gourlé](https://hadriengourle.com) at [SLU](https://slu.se), [Daniel Straub](https://github.com/d4straub) and [Sabrina Krakau](https://github.com/skrakau) at the [Quantitative Biology Center (QBiC)](http://qbic.life). [James A. Fellows Yates](https://github.com/jfy133) and [Maxime Borry](https://github.com/maxibor) at the [Max Planck Institute for Evolutionary Anthropology](https://www.eva.mpg.de) joined in version 2.2.0. More recent contributors include [Jim Downie](https://github.com/prototaxites) and [Carson Miller](https://github.com/CarsonJM). +nf-core/mag was written by [Hadrien Gourlé](https://hadriengourle.com) at [SLU](https://slu.se), [Daniel Straub](https://github.com/d4straub) and [Sabrina Krakau](https://github.com/skrakau) at the [Quantitative Biology Center (QBiC)](http://qbic.life). [James A. Fellows Yates](https://github.com/jfy133) and [Maxime Borry](https://github.com/maxibor) at the [Max Planck Institute for Evolutionary Anthropology](https://www.eva.mpg.de) joined in version 2.2.0. + +Other code contributors include: + +- [Antonia Schuster](https://github.com/AntoniaSchuster) +- [Alexander Ramos](https://github.com/alxndrdiaz) +- [Carson Miller](https://github.com/CarsonJM) +- [Daniel Lundin](https://github.com/erikrikarddaniel) +- [Danielle Callan](https://github.com/d-callan) +- [Gregory Sprenger](https://github.com/gregorysprenger) +- [Jim Downie](https://github.com/prototaxites) +- [Phil Palmer](https://github.com/PhilPalmer) +- [@willros](https://github.com/willros) Long read processing was inspired by [caspargross/HybridAssembly](https://github.com/caspargross/HybridAssembly) written by Caspar Gross [@caspargross](https://github.com/caspargross) We thank the following people for their extensive assistance in the development of this pipeline: - [Alexander Peltzer](https://github.com/apeltzer) -- [Antonia Schuster](https://github.com/antoniaschuster) - [Phil Ewels](https://github.com/ewels) - [Gisela Gabernet](https://github.com/ggabernet) - [Harshil Patel](https://github.com/drpatelh) From f79135caa96f424e667ee33af30e68d436bc525f Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 15 Aug 2024 16:24:40 +0200 Subject: [PATCH 6/9] Add other third wave of developer leads to authors --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index c03b0c49..9d2b2f44 100644 --- a/nextflow.config +++ b/nextflow.config @@ -385,7 +385,7 @@ dag { manifest { name = 'nf-core/mag' - author = """Hadrien Gourlé, Daniel Straub, Sabrina Krakau""" + author = """Hadrien Gourlé, Daniel Straub, Sabrina Krakau, James A. Fellows Yates, Maxime Borry""" homePage = 'https://github.com/nf-core/mag' description = """Assembly, binning and annotation of metagenomes""" mainScript = 'main.nf' From b708160407d569b19ad387d60cc5b1be3a02b53d Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Thu, 15 Aug 2024 14:25:34 +0000 Subject: [PATCH 7/9] [automated] Fix code linting --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f92e844f..405e298a 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,12 @@ When group-wise co-assembly is enabled, `SPAdes` is run on accordingly pooled re ## Credits -nf-core/mag was written by [Hadrien Gourlé](https://hadriengourle.com) at [SLU](https://slu.se), [Daniel Straub](https://github.com/d4straub) and [Sabrina Krakau](https://github.com/skrakau) at the [Quantitative Biology Center (QBiC)](http://qbic.life). [James A. Fellows Yates](https://github.com/jfy133) and [Maxime Borry](https://github.com/maxibor) at the [Max Planck Institute for Evolutionary Anthropology](https://www.eva.mpg.de) joined in version 2.2.0. +nf-core/mag was written by [Hadrien Gourlé](https://hadriengourle.com) at [SLU](https://slu.se), [Daniel Straub](https://github.com/d4straub) and [Sabrina Krakau](https://github.com/skrakau) at the [Quantitative Biology Center (QBiC)](http://qbic.life). [James A. Fellows Yates](https://github.com/jfy133) and [Maxime Borry](https://github.com/maxibor) at the [Max Planck Institute for Evolutionary Anthropology](https://www.eva.mpg.de) joined in version 2.2.0. Other code contributors include: - [Antonia Schuster](https://github.com/AntoniaSchuster) -- [Alexander Ramos](https://github.com/alxndrdiaz) +- [Alexander Ramos](https://github.com/alxndrdiaz) - [Carson Miller](https://github.com/CarsonJM) - [Daniel Lundin](https://github.com/erikrikarddaniel) - [Danielle Callan](https://github.com/d-callan) From e7ebbfabfb1972fd5b4ec4ab6123bb7e62213216 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 15 Aug 2024 21:29:48 +0200 Subject: [PATCH 8/9] Update subworkflows/local/depths.nf --- subworkflows/local/depths.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/depths.nf b/subworkflows/local/depths.nf index ffe89daa..a2b69c95 100644 --- a/subworkflows/local/depths.nf +++ b/subworkflows/local/depths.nf @@ -10,7 +10,7 @@ def getColNo(filename) { return lines[0].split('\t').size() } -/* +/* * Get number of rows in a file */ def getRowNo(filename) { From 36cfd422de071513b576086f87564a286113ecef Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 15 Aug 2024 21:30:46 +0200 Subject: [PATCH 9/9] Update LICENSE to include more recent contributors --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index fa60ad5d..d90d555c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Hadrien Gourlé, Daniel Straub, Sabrina Krakau +Copyright (c) Hadrien Gourlé, Daniel Straub, Sabrina Krakau, James A. Fellows Yates, Maxime Borry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal