From bbe486e442f64dc92ec155ccdc4b83435fc4afc6 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Tue, 26 Apr 2022 09:59:12 +0200 Subject: [PATCH 1/7] fix report aws --- modules/local/alakazam/alakazam_shazam_repertoires.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index 2afdb6fd..9184cd1a 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -10,7 +10,7 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { input: path(tab) // sequence tsv table in AIRR format path("Table_sequences.tsv") - path(repertoire_report) + tuple path(repertoire_report), path(references), path(css), path(logo) output: path("versions.yml"), emit: versions From 4a38c1ccb0a84e74fe5aaaa9e3106ffe9b0742f1 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Tue, 26 Apr 2022 13:33:23 +0200 Subject: [PATCH 2/7] test fix rmarkdown aws --- assets/repertoire_comparison.Rmd | 6 +++++- bin/execute_report.R | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/assets/repertoire_comparison.Rmd b/assets/repertoire_comparison.Rmd index f0d56be6..c373f706 100644 --- a/assets/repertoire_comparison.Rmd +++ b/assets/repertoire_comparison.Rmd @@ -12,7 +12,10 @@ output: pdf_document: true html_notebook: toc: yes -bibliography: ./references.bibtex +params: + path_css: "" + path_logo: "" + path_bibliography: "" --- @@ -21,6 +24,7 @@ title: "Repertoire analysis" subtitle: "Clonal abundance, diversity and V-family gene usage" date: '`r format(Sys.Date(), "%B %d, %Y")`' output: html_document +bibliography: '`r params$path_bibliography`' --- diff --git a/bin/execute_report.R b/bin/execute_report.R index 211f8f30..fbb4626b 100755 --- a/bin/execute_report.R +++ b/bin/execute_report.R @@ -1,9 +1,21 @@ #!/usr/bin/env Rscript library(rmarkdown) +library(optparse) -args = commandArgs(trailingOnly=TRUE) +option_list = list( + make_option(c("-r", "--report_file"), type="character", default=NULL, help="report rmarkdown file", metavar="character"), + make_option(c("-rf", "--references"), type="character", default=NULL, help="references bibtex file", metavar="character"), + make_option(c("-c","--css"), type ="character", default=NULL, help="css file for report formatting", metavar="character"), + make_option(c("-l","--logo"), type="character", default=NULL, help="logo for report", metavar="character") +) + +opt_parser = OptionParser(option_list=option_list) +opt = parse_args(opt_parser) wd=getwd() -rmarkdown::render(args[1], output_file = "Bcellmagic_report.html", knit_root_dir = wd, output_dir = wd) +rmarkdown::render(opt$report_file, output_file = "Bcellmagic_report.html", knit_root_dir = wd, output_dir = wd, + params = list(path_references = opt$references, + path_css = opt$css, + path_logo = opt$logo)) From cc18998ffe90dbdd70eec2f7656e5aaff2b64ce6 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Wed, 27 Apr 2022 09:00:23 +0200 Subject: [PATCH 3/7] add optparse container --- modules/local/alakazam/alakazam_shazam_repertoires.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index 9184cd1a..ce802582 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -2,10 +2,10 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { tag "report" label 'process_high' - conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda::r-alakazam=1.2.0 bioconda::r-shazam=1.1.0 conda-forge::r-kableextra=1.3.4 conda-forge::r-knitr=1.33 conda-forge::r-stringr=1.4.0 conda-forge::r-dplyr=1.0.6" : null) // Conda package + conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda::r-alakazam=1.2.0 bioconda::r-shazam=1.1.0 conda-forge::r-kableextra=1.3.4 conda-forge::r-knitr=1.33 conda-forge::r-stringr=1.4.0 conda-forge::r-dplyr=1.0.6 conda-forge::r-optparse=1.7.1" : null) // Conda package container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-3c44411d6bed445c86c3f3bb91b5464377669d0f:37d81bcb128d0d1b27c8746e089087e19ddfe3fb-0' : - 'quay.io/biocontainers/mulled-v2-3c44411d6bed445c86c3f3bb91b5464377669d0f:37d81bcb128d0d1b27c8746e089087e19ddfe3fb-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-7da73314bcc47157b442d16c3dcfbe81e75a404f:9bb35f8114dffcd97b3afb5de8587355aca16b66-0' : + 'quay.io/biocontainers/mulled-v2-7da73314bcc47157b442d16c3dcfbe81e75a404f:9bb35f8114dffcd97b3afb5de8587355aca16b66-0' }" input: path(tab) // sequence tsv table in AIRR format From 91282c2f201774768ac195867a2c870021fc2162 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Wed, 27 Apr 2022 09:09:38 +0200 Subject: [PATCH 4/7] fix aws report render --- bin/execute_report.R | 4 ++-- modules/local/alakazam/alakazam_shazam_repertoires.nf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/execute_report.R b/bin/execute_report.R index fbb4626b..44b1cf44 100755 --- a/bin/execute_report.R +++ b/bin/execute_report.R @@ -5,7 +5,7 @@ library(optparse) option_list = list( make_option(c("-r", "--report_file"), type="character", default=NULL, help="report rmarkdown file", metavar="character"), - make_option(c("-rf", "--references"), type="character", default=NULL, help="references bibtex file", metavar="character"), + make_option(c("-b", "--references"), type="character", default=NULL, help="references bibtex file", metavar="character"), make_option(c("-c","--css"), type ="character", default=NULL, help="css file for report formatting", metavar="character"), make_option(c("-l","--logo"), type="character", default=NULL, help="logo for report", metavar="character") ) @@ -16,6 +16,6 @@ opt = parse_args(opt_parser) wd=getwd() rmarkdown::render(opt$report_file, output_file = "Bcellmagic_report.html", knit_root_dir = wd, output_dir = wd, - params = list(path_references = opt$references, + params = list(path_bibliography = opt$references, path_css = opt$css, path_logo = opt$logo)) diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index ce802582..5ea3a2ec 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -19,7 +19,7 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { script: """ - execute_report.R ${repertoire_report} + execute_report.R --report_file ${repertoire_report} cat <<-END_VERSIONS > versions.yml "${task.process}": From 1c0ddfe1601f138d054108971fa1da8b7924b656 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Wed, 27 Apr 2022 10:22:43 +0200 Subject: [PATCH 5/7] still fix aws test --- assets/repertoire_comparison.Rmd | 2 +- modules/local/alakazam/alakazam_shazam_repertoires.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/repertoire_comparison.Rmd b/assets/repertoire_comparison.Rmd index c373f706..06471339 100644 --- a/assets/repertoire_comparison.Rmd +++ b/assets/repertoire_comparison.Rmd @@ -16,6 +16,7 @@ params: path_css: "" path_logo: "" path_bibliography: "" +bibliography: '`r params$path_bibliography`' --- @@ -24,7 +25,6 @@ title: "Repertoire analysis" subtitle: "Clonal abundance, diversity and V-family gene usage" date: '`r format(Sys.Date(), "%B %d, %Y")`' output: html_document -bibliography: '`r params$path_bibliography`' --- diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index 5ea3a2ec..26350085 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -19,7 +19,7 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { script: """ - execute_report.R --report_file ${repertoire_report} + execute_report.R --report_file ${repertoire_report} --references ${references} cat <<-END_VERSIONS > versions.yml "${task.process}": From 73fa3df33f5f8dce0dceebd79c143bbab31af126 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Wed, 27 Apr 2022 11:36:29 +0200 Subject: [PATCH 6/7] rm references bibtex --- assets/references.bibtex | 74 ------------------- assets/repertoire_comparison.Rmd | 59 ++++++++++++--- bin/execute_report.R | 10 +-- .../alakazam/alakazam_shazam_repertoires.nf | 4 +- workflows/bcellmagic.nf | 1 - 5 files changed, 51 insertions(+), 97 deletions(-) delete mode 100644 assets/references.bibtex diff --git a/assets/references.bibtex b/assets/references.bibtex deleted file mode 100644 index b3133147..00000000 --- a/assets/references.bibtex +++ /dev/null @@ -1,74 +0,0 @@ -@article{ewels2016, - title={MultiQC: summarize analysis results for multiple tools and samples in a single report}, - author={Ewels, Philip and Magnusson, M{\aa}ns and Lundin, Sverker and K{\"a}ller, Max}, - journal={Bioinformatics}, - volume={32}, - number={19}, - pages={3047--3048}, - year={2016}, - publisher={Oxford University Press} -} -@article{VanderHeiden2014, - title={pRESTO: a toolkit for processing high-throughput sequencing raw reads of lymphocyte receptor repertoires}, - volume={30}, - ISSN={1460-2059}, - DOI={10.1093/bioinformatics/btu138}, - note={Citation Key: VanderHeiden2014}, number={13}, journal={Bioinformatics}, - publisher={Narnia}, - author={Vander Heiden, Jason A. and Yaari, Gur and Uduman, Mohamed and Stern, Joel N.H. and O’Connor, Kevin C. and Hafler, David A. and Vigneault, Francois and Kleinstein, Steven H.}, - year={2014}, - month={Jul}, - pages={1930–1932} -} -@article{Gupta2015, - title={Change-O: a toolkit for analyzing large-scale B cell immunoglobulin repertoire sequencing data.}, - volume={31}, - ISSN={1367-4803}, - DOI={10.1093/bioinformatics/btv359}, - note={Citation Key: Gupta2015}, - number={20}, - journal={Bioinformatics}, - publisher={Oxford University Press}, - author={Gupta, Namita T. and Vander Heiden, Jason A. and Uduman, Mohamed and Gadala-Maria, Daniel and Yaari, Gur and Kleinstein, Steven H.}, - year={2015}, - month={Oct}, - pages={3356–3358} -} -@article{Stern2014, - title={B cells populating the multiple sclerosis brain mature in the draining cervical lymph nodes}, - volume={6}, ISSN={19466242}, url={https://pubmed.ncbi.nlm.nih.gov/25100741/}, - DOI={10.1126/scitranslmed.3008879}, - number={248}, - journal={Science Translational Medicine}, - publisher={American Association for the Advancement of Science}, - author={Stern, Joel N.H. and Yaari, Gur and Vander Heiden, Jason A. and Church, George and Donahue, William F. and Hintzen, Rogier Q. and Huttner, Anita J. and Laman, Jon D. and Nagra, Rashed M. and Nylander, Alyssa and et al.}, - year={2014}, - month={Aug} -} -@article{Gadala-Maria2015, - title={Automated analysis of high-throughput B-cell sequencing data reveals a high frequency of novel immunoglobulin V gene segment alleles}, - volume={112}, - ISSN={1091-6490}, - DOI={10.1073/pnas.1417683112}, - number={8}, - journal={Proceedings of the National Academy of Sciences of the United States of America}, - author={Gadala-Maria, Daniel and Yaari, Gur and Uduman, Mohamed and Kleinstein, Steven H.}, - year={2015}, - month={Feb}, - pages={E862-870} -} -@misc{andrews2010, - title={FastQC: a quality control tool for high throughput sequence data}, - author={Andrews, Simon and others}, - year={2010} -} -@article{ewels2020, - title={The nf-core framework for community-curated bioinformatics pipelines}, - volume={38}, ISSN={15461696}, DOI={10.1038/s41587-020-0439-x}, - number={3}, journal={Nature Biotechnology}, - publisher={Nature Research}, - author={Ewels, Philip A. and Peltzer, Alexander and Fillinger, Sven and Patel, Harshil and Alneberg, Johannes and Wilm, Andreas and Garcia, Maxime Ulysse and Di Tommaso, Paolo and Nahnsen, Sven}, - year={2020}, - month={Mar}, - pages={276–278} -} diff --git a/assets/repertoire_comparison.Rmd b/assets/repertoire_comparison.Rmd index 06471339..d279f0c9 100644 --- a/assets/repertoire_comparison.Rmd +++ b/assets/repertoire_comparison.Rmd @@ -12,11 +12,6 @@ output: pdf_document: true html_notebook: toc: yes -params: - path_css: "" - path_logo: "" - path_bibliography: "" -bibliography: '`r params$path_bibliography`' --- @@ -501,13 +496,53 @@ write.table(family, file = paste0(vfamily_dir, "/V_gene_distribution_by_sequence If you use nf-core/airrflow for your analysis, please cite it using the following DOI: [10.5281/zenodo.3607408](https://doi.org/10.5281/zenodo.3607408) -Please also cite the `nf-core` publication [@ewels2020]. +Please also cite the `nf-core` and `Nextflow` publications: + +- [nf-core](https://pubmed.ncbi.nlm.nih.gov/32055031/) + + > Ewels PA, Peltzer A, Fillinger S, Patel H, Alneberg J, Wilm A, Garcia MU, Di Tommaso P, Nahnsen S. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Mar;38(3):276-278. doi: 10.1038/s41587-020-0439-x. PubMed PMID: 32055031. + +- [Nextflow](https://pubmed.ncbi.nlm.nih.gov/28398311/) + + > Di Tommaso P, Chatzou M, Floden EW, Barja PP, Palumbo E, Notredame C. Nextflow enables reproducible computational workflows. Nat Biotechnol. 2017 Apr 11;35(4):316-319. doi: 10.1038/nbt.3820. PubMed PMID: 28398311. In addition, citations for the tools and data used in this pipeline are as follows: -* **pRESTO** [@VanderHeiden2014] -* **SHazaM, Change-O** [@Gupta2015] -* **Alakazam** [@Stern2014] -* **TIgGER** [@Gadala-Maria2015] -* **FastQC** [@andrews2010] -* **MultiQC** [@ewels2016] +- [pRESTO](https://doi.org/10.1093/bioinformatics/btu138) + + > Vander Heiden, J. A., Yaari, G., Uduman, M., Stern, J. N. H., O’Connor, K. C., Hafler, D. A., … Kleinstein, S. H. (2014). pRESTO: a toolkit for processing high-throughput sequencing raw reads of lymphocyte receptor repertoires. Bioinformatics, 30(13), 1930–1932. + +- [SHazaM, Change-O](https://doi.org/10.1093/bioinformatics/btv359) + + > Gupta, N. T., Vander Heiden, J. A., Uduman, M., Gadala-Maria, D., Yaari, G., & Kleinstein, S. H. (2015). Change-O: a toolkit for analyzing large-scale B cell immunoglobulin repertoire sequencing data: Table 1. Bioinformatics, 31(20), 3356–3358. + +- [Alakazam](https://doi.org/10.1126/scitranslmed.3008879) + + > Stern, J. N. H., Yaari, G., Vander Heiden, J. A., Church, G., Donahue, W. F., Hintzen, R. Q., … O’Connor, K. C. (2014). B cells populating the multiple sclerosis brain mature in the draining cervical lymph nodes. Science Translational Medicine, 6(248). + +- [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) + +- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) + + > Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924. + +## Software packaging/containerisation tools + +- [Anaconda](https://anaconda.com) + + > Anaconda Software Distribution. Computer software. Vers. 2-2.4.0. Anaconda, Nov. 2016. Web. + +- [Bioconda](https://pubmed.ncbi.nlm.nih.gov/29967506/) + + > Grüning B, Dale R, Sjödin A, Chapman BA, Rowe J, Tomkins-Tinch CH, Valieris R, Köster J; Bioconda Team. Bioconda: sustainable and comprehensive software distribution for the life sciences. Nat Methods. 2018 Jul;15(7):475-476. doi: 10.1038/s41592-018-0046-7. PubMed PMID: 29967506. + +- [BioContainers](https://pubmed.ncbi.nlm.nih.gov/28379341/) + + > da Veiga Leprevost F, Grüning B, Aflitos SA, Röst HL, Uszkoreit J, Barsnes H, Vaudel M, Moreno P, Gatto L, Weber J, Bai M, Jimenez RC, Sachsenberg T, Pfeuffer J, Alvarez RV, Griss J, Nesvizhskii AI, Perez-Riverol Y. BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics. 2017 Aug 15;33(16):2580-2582. doi: 10.1093/bioinformatics/btx192. PubMed PMID: 28379341; PubMed Central PMCID: PMC5870671. + +- [Docker](https://dl.acm.org/doi/10.5555/2600239.2600241) + +- [Singularity](https://pubmed.ncbi.nlm.nih.gov/28494014/) + + > Kurtzer GM, Sochat V, Bauer MW. Singularity: Scientific containers for mobility of compute. PLoS One. 2017 May 11;12(5):e0177459. doi: 10.1371/journal.pone.0177459. eCollection 2017. PubMed PMID: 28494014; PubMed Central PMCID: PMC5426675. + diff --git a/bin/execute_report.R b/bin/execute_report.R index 44b1cf44..8c80823a 100755 --- a/bin/execute_report.R +++ b/bin/execute_report.R @@ -4,10 +4,7 @@ library(rmarkdown) library(optparse) option_list = list( - make_option(c("-r", "--report_file"), type="character", default=NULL, help="report rmarkdown file", metavar="character"), - make_option(c("-b", "--references"), type="character", default=NULL, help="references bibtex file", metavar="character"), - make_option(c("-c","--css"), type ="character", default=NULL, help="css file for report formatting", metavar="character"), - make_option(c("-l","--logo"), type="character", default=NULL, help="logo for report", metavar="character") + make_option(c("-r", "--report_file"), type="character", default=NULL, help="report rmarkdown file", metavar="character") ) opt_parser = OptionParser(option_list=option_list) @@ -15,7 +12,4 @@ opt = parse_args(opt_parser) wd=getwd() -rmarkdown::render(opt$report_file, output_file = "Bcellmagic_report.html", knit_root_dir = wd, output_dir = wd, - params = list(path_bibliography = opt$references, - path_css = opt$css, - path_logo = opt$logo)) +rmarkdown::render(opt$report_file, output_file = "Bcellmagic_report.html", knit_root_dir = wd, output_dir = wd) diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index 26350085..14505167 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -10,7 +10,7 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { input: path(tab) // sequence tsv table in AIRR format path("Table_sequences.tsv") - tuple path(repertoire_report), path(references), path(css), path(logo) + tuple path(repertoire_report), path(css), path(logo) output: path("versions.yml"), emit: versions @@ -19,7 +19,7 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { script: """ - execute_report.R --report_file ${repertoire_report} --references ${references} + execute_report.R --report_file ${repertoire_report} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/workflows/bcellmagic.nf b/workflows/bcellmagic.nf index 41792902..ec61e32b 100644 --- a/workflows/bcellmagic.nf +++ b/workflows/bcellmagic.nf @@ -131,7 +131,6 @@ ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multi // Rmarkdown report file ch_rmarkdown_report = Channel.fromPath( ["$projectDir/assets/repertoire_comparison.Rmd", - "$projectDir/assets/references.bibtex", "$projectDir/assets/nf-core_style.css", "$projectDir/assets/nf-core-airrflow_logo_light.png"], checkIfExists: true).dump(tag: 'report files') From 0a8c82cb5d84bb610c1f4e497e1df0c3e0e6b5c3 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Wed, 27 Apr 2022 12:49:52 +0200 Subject: [PATCH 7/7] edit changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf89528..c3c7cab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [#150](https://github.com/nf-core/airrflow/pull/150): Fixed cprimer start position, when cprimer in R2 reads. - Remove need for a plot when Hamming threshold cannot be generated. - The shazam threshold process is not executed when the hamming threshold is provided. +- [#164](https://github.com/nf-core/airrflow/pull/150): Fixed AWS tests when running on fusion mounts, solving [#137](https://github.com/nf-core/airrflow/issues/137). ### `Dependencies`