From 13f0f3e342b70c4b049fc2123e841368ad4f68ff Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Wed, 17 Aug 2022 15:37:42 +0200 Subject: [PATCH 1/9] Update citations as suggested in review --- CITATIONS.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/CITATIONS.md b/CITATIONS.md index f432375d..63188ca8 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -26,6 +26,10 @@ > Langmead, B. and Salzberg, S. L. 2012 Fast gapped-read alignment with Bowtie 2. Nature methods, 9(4), p. 357–359. doi: 10.1038/nmeth.1923. +- [Chromap](https://doi.org/10.1038/s41467-021-26865-w) + + > Zhang H, Song L, Wang X, Cheng H, Wang C, Meyer CA, Liu T, Tang M, Aluru S, Yue F, Liu XS and Li H. Fast alignment and preprocessing of chromatin profiles with Chromap. Nature communications. 2021, 12(1), 1-6. doi: 10.1038/s41467-021-26865-w + - [deepTools](https://www.ncbi.nlm.nih.gov/pubmed/27079975/) > Ramírez F, Ryan DP, Grüning B, Bhardwaj V, Kilpert F, Richter AS, Heyne S, Dündar F, Manke T. deepTools2: a next generation web server for deep-sequencing data analysis. Nucleic Acids Res. 2016 Jul 8;44(W1):W160-5. doi: 10.1093/nar/gkw257. Epub 2016 Apr 13. PubMed PMID: 27079975; PubMed Central PMCID: PMC4987876. @@ -83,10 +87,6 @@ > Love MI, Huber W, Anders S. Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biol. 2014;15(12):550. PubMed PMID: 25516281; PubMed Central PMCID: PMC4302049. -- [vsn](https://bioconductor.org/packages/release/bioc/html/vsn.html) - - > Wolfgang Huber, Anja von Heydebreck, Holger Sueltmann, Annemarie Poustka and Martin Vingron. Variance Stabilization Applied to Microarray Data Calibration and to the Quantification of Differential Expression. Bioinformatics 18, S96-S104 (2002). - - [UpSetR](https://CRAN.R-project.org/package=UpSetR) > Nils Gehlenborg (2017). UpSetR: A More Scalable Alternative to Venn and Euler Diagrams for Visualizing Intersecting Sets. @@ -107,10 +107,6 @@ > Raivo Kolde (2018). pheatmap: Pretty Heatmaps. -- [lattice](https://cran.r-project.org/web/packages/lattice/index.html) - - > Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization with R. Springer, New York. ISBN 978-0-387-75968-5. - - [RColorBrewer](https://CRAN.R-project.org/package=RColorBrewer) > Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes. @@ -119,9 +115,6 @@ > Trevor L Davis (2018). optparse: Command Line Option Parser. -- [xfun](https://CRAN.R-project.org/package=xfun) - > Yihui Xie (2018). xfun: Miscellaneous Functions by 'Yihui Xie'. - ## Software packaging/containerisation tools - [Anaconda](https://anaconda.com) From 676ea1871a603c9e49fed4d7816ddea82f87824a Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Wed, 17 Aug 2022 16:02:01 +0200 Subject: [PATCH 2/9] Fix nf-core lint after accepted suggestion --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1dcfbdcd..5124c9ac 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ work/ data/ results/ .DS_Store +testing/ testing* *.pyc From 5239e9860283036e5957d1d33dd0cce32dacc497 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Wed, 17 Aug 2022 16:34:01 +0200 Subject: [PATCH 3/9] Remove differential analysis options --- nextflow_schema.json | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index ed9cf200..6d26d959 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -323,25 +323,6 @@ } } }, - "deseq_qc_options": { - "title": "Differential analysis options", - "type": "object", - "fa_icon": "fas fa-not-equal", - "description": "Options to adjust differential analysis criteria.", - "properties": { - "deseq2_vst": { - "type": "boolean", - "description": "Use vst transformation instead of rlog with DESeq2.", - "help_text": "See [DESeq2 docs](http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#data-transformations-and-visualization).", - "fa_icon": "fas fa-dolly" - }, - "skip_deseq2_qc": { - "type": "boolean", - "fa_icon": "fas fa-fast-forward", - "description": "Skip DESeq2 PCA and heatmap plotting." - } - } - }, "process_skipping_options": { "title": "Process skipping options", "type": "object", @@ -363,6 +344,12 @@ "description": "Skip Preseq.", "fa_icon": "fas fa-fast-forward" }, + "deseq2_vst": { + "type": "boolean", + "description": "Use vst transformation instead of rlog with DESeq2.", + "help_text": "See [DESeq2 docs](http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#data-transformations-and-visualization).", + "fa_icon": "fas fa-dolly" + }, "skip_plot_profile": { "type": "boolean", "description": "Skip deepTools plotProfile.", @@ -378,6 +365,11 @@ "description": "Skip Phantompeakqualtools.", "fa_icon": "fas fa-fast-forward" }, + "skip_deseq2_qc": { + "type": "boolean", + "fa_icon": "fas fa-fast-forward", + "description": "Skip DESeq2 PCA and heatmap plotting." + }, "skip_igv": { "type": "boolean", "description": "Skip IGV.", From c31ac79853e71c9e18368f74c72a6c7d5db336cc Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Wed, 17 Aug 2022 23:30:31 +0200 Subject: [PATCH 4/9] Remove deseq_qc_options key from schema --- nextflow_schema.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 6d26d959..ea0721e1 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -579,9 +579,6 @@ { "$ref": "#/definitions/peak_calling_options" }, - { - "$ref": "#/definitions/deseq_qc_options" - }, { "$ref": "#/definitions/process_skipping_options" }, From dd105182f5cbca8fa61e2faa1c6f16d7b2855bf6 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Wed, 17 Aug 2022 23:40:56 +0200 Subject: [PATCH 5/9] Remove samplesheet.csv --- assets/samplesheet.csv | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 assets/samplesheet.csv diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv deleted file mode 100644 index 5f653ab7..00000000 --- a/assets/samplesheet.csv +++ /dev/null @@ -1,3 +0,0 @@ -sample,fastq_1,fastq_2 -SAMPLE_PAIRED_END,/path/to/fastq/files/AEG588A1_S1_L002_R1_001.fastq.gz,/path/to/fastq/files/AEG588A1_S1_L002_R2_001.fastq.gz -SAMPLE_SINGLE_END,/path/to/fastq/files/AEG588A4_S4_L003_R1_001.fastq.gz, From c31c2a934d58f415757e4d6a169b779c967873fd Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Fri, 26 Aug 2022 19:34:34 +0200 Subject: [PATCH 6/9] Add deseq and fix homer annotate peaks in multiqc --- modules/local/multiqc.nf | 3 +++ workflows/chipseq.nf | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/local/multiqc.nf b/modules/local/multiqc.nf index 9d57e22c..92824f01 100644 --- a/modules/local/multiqc.nf +++ b/modules/local/multiqc.nf @@ -44,6 +44,9 @@ process MULTIQC { path ('featurecounts/*') + path ('deseq2/*') + path ('deseq2/*') + output: path "*multiqc_report.html", emit: report path "*_data" , emit: data diff --git a/workflows/chipseq.nf b/workflows/chipseq.nf index 658a8b94..d2246739 100644 --- a/workflows/chipseq.nf +++ b/workflows/chipseq.nf @@ -582,6 +582,8 @@ workflow CHIPSEQ { ch_deseq2_pca_header, ch_deseq2_clustering_header ) + ch_deseq2_pca_multiqc = DESEQ2_QC.out.pca_multiqc + ch_deseq2_clustering_multiqc = DESEQ2_QC.out.dists_multiqc } } @@ -654,9 +656,10 @@ workflow CHIPSEQ { ch_custompeaks_frip_multiqc.collect{it[1]}.ifEmpty([]), ch_custompeaks_count_multiqc.collect{it[1]}.ifEmpty([]), - ch_plothomerannotatepeaks_multiqc.collect{it[1]}.ifEmpty([]), - ch_subreadfeaturecounts_multiqc.collect{it[1]}.ifEmpty([])//, - // path ('macs/consensus/*') from ch_macs_consensus_deseq_mqc.collect().ifEmpty([]) + ch_plothomerannotatepeaks_multiqc.collect().ifEmpty([]), + ch_subreadfeaturecounts_multiqc.collect{it[1]}.ifEmpty([]), + ch_deseq2_pca_multiqc.collect().ifEmpty([]), + ch_deseq2_clustering_multiqc.collect().ifEmpty([]) ) multiqc_report = MULTIQC.out.report.toList() } From f2eabfd563cb2de8a66bd96a360698ba43bb2e97 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Fri, 26 Aug 2022 19:39:22 +0200 Subject: [PATCH 7/9] Fix channel declaration --- workflows/chipseq.nf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workflows/chipseq.nf b/workflows/chipseq.nf index d2246739..da6a58e6 100644 --- a/workflows/chipseq.nf +++ b/workflows/chipseq.nf @@ -576,6 +576,8 @@ workflow CHIPSEQ { ch_subreadfeaturecounts_multiqc = SUBREAD_FEATURECOUNTS.out.summary ch_versions = ch_versions.mix(SUBREAD_FEATURECOUNTS.out.versions.first()) + ch_deseq2_pca_multiqc = Channel.empty() + ch_deseq2_clustering_multiqc = Channel.empty() if (!params.skip_deseq2_qc) { DESEQ2_QC ( SUBREAD_FEATURECOUNTS.out.counts, From 20a25bfbc8ba491b4273a0b01fe62d941c653d9f Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Fri, 26 Aug 2022 19:52:15 +0200 Subject: [PATCH 8/9] Declare channel before skip to avoid error --- workflows/chipseq.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflows/chipseq.nf b/workflows/chipseq.nf index da6a58e6..eedccc5d 100644 --- a/workflows/chipseq.nf +++ b/workflows/chipseq.nf @@ -506,7 +506,9 @@ workflow CHIPSEQ { // // Consensus peaks analysis // - ch_macs2_consensus_bed_lib = Channel.empty() + ch_macs2_consensus_bed_lib = Channel.empty() + ch_deseq2_pca_multiqc = Channel.empty() + ch_deseq2_clustering_multiqc = Channel.empty() if (!params.skip_consensus_peaks) { // Create channel: [ meta , [ peaks ] ] // Where meta = [ id:antibody, multiple_groups:true/false, replicates_exist:true/false ] @@ -576,8 +578,6 @@ workflow CHIPSEQ { ch_subreadfeaturecounts_multiqc = SUBREAD_FEATURECOUNTS.out.summary ch_versions = ch_versions.mix(SUBREAD_FEATURECOUNTS.out.versions.first()) - ch_deseq2_pca_multiqc = Channel.empty() - ch_deseq2_clustering_multiqc = Channel.empty() if (!params.skip_deseq2_qc) { DESEQ2_QC ( SUBREAD_FEATURECOUNTS.out.counts, From 4760fc77fa6bfa6b1429fb1df9cfebb6d87d7695 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Tue, 30 Aug 2022 09:54:45 +0200 Subject: [PATCH 9/9] Fix labels for deeptools plotfingerprint --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 7acf69e2..47784e03 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -510,7 +510,7 @@ if (!params.skip_plot_fingerprint) { ext.args = { [ '--skipZeros', "--numberOfSamples $params.fingerprint_bins", - "--labels $meta.ip $meta.control" + "--labels $meta.id $meta.control" ].join(' ').trim() } ext.prefix = { "${meta.id}.mLb.clN" } publishDir = [