From 6d26b45601556adb0e168c650103d33ee568d19b Mon Sep 17 00:00:00 2001 From: WackerO Date: Mon, 5 Feb 2024 10:03:13 +0100 Subject: [PATCH 01/16] This should fix the too many devices error --- .devcontainer/devcontainer.json | 0 .editorconfig | 0 .gitattributes | 0 .github/.dockstore.yml | 0 .github/CONTRIBUTING.md | 0 .github/ISSUE_TEMPLATE/bug_report.yml | 0 .github/ISSUE_TEMPLATE/feature_request.yml | 0 .github/PULL_REQUEST_TEMPLATE.md | 0 .github/workflows/awsfulltest.yml | 0 .github/workflows/awstest.yml | 0 .github/workflows/branch.yml | 0 .github/workflows/ci.yml | 0 .github/workflows/clean-up.yml | 0 .github/workflows/fix-linting.yml | 0 .github/workflows/linting.yml | 0 .github/workflows/linting_comment.yml | 0 .github/workflows/push_github_container_reg.yml | 0 .gitignore | 0 .gitpod.yml | 0 .nf-core.yml | 0 .pre-commit-config.yaml | 0 .prettierignore | 0 .prettierrc.yml | 0 CHANGELOG.md | 0 CITATIONS.md | 0 CODE_OF_CONDUCT.md | 0 Dockerfile | 0 LICENSE | 0 README.md | 0 assets/RNAseq_report.Rmd | 9 ++++++--- assets/adaptivecard.json | 0 assets/email_template.html | 0 assets/email_template.txt | 0 assets/methods_description_template.yml | 0 assets/multiqc_config.yml | 0 assets/nf-core-rnadeseq_logo_light.png | Bin assets/references.bibtex | 0 assets/schema_input.json | 0 assets/sendmail_template.txt | 0 assets/slackreport.json | 0 conf/base.config | 0 conf/igenomes.config | 0 conf/modules.config | 0 conf/test.config | 0 conf/test_batcheffect.config | 0 conf/test_contrast_list.config | 0 conf/test_contrast_matrix.config | 0 conf/test_custom_gmt.config | 0 conf/test_full.config | 0 conf/test_no_multiqc.config | 0 conf/test_relevel.config | 0 conf/test_smrnaseq.config | 0 conf/test_star_rsem.config | 0 conf/test_star_salmon.config | 0 conf/test_use_vst.config | 0 docs/README.md | 0 docs/images/nf-core-rnadeseq_logo_dark.png | Bin docs/images/nf-core-rnadeseq_logo_light.png | Bin docs/output.md | 0 docs/usage.md | 0 environment.yml | 0 lib/nfcore_external_java_deps.jar | Bin main.nf | 0 modules.json | 0 modules/local/report.nf | 0 modules/local/samplesheet_check.nf | 0 modules/nf-core/custom/dumpsoftwareversions/main.nf | 0 .../nf-core/custom/dumpsoftwareversions/meta.yml | 0 nextflow.config | 0 nextflow_schema.json | 0 pyproject.toml | 0 subworkflows/local/input_check.nf | 0 testdata/MultiQC.zip | Bin testdata/QDESQ/QDESQ_Sample_preparations.tsv | 0 testdata/QDESQ/QDESQ_design.txt | 0 testdata/QDESQ/star_rsem/QDESQ081AU.genes.results | 0 testdata/QDESQ/star_rsem/QDESQ082A4.genes.results | 0 testdata/QDESQ/star_rsem/QDESQ083AC.genes.results | 0 testdata/QDESQ/star_rsem/QDESQ084AK.genes.results | 0 testdata/QDESQ/star_rsem/QDESQ085AS.genes.results | 0 testdata/QDESQ/star_rsem/QDESQ086A2.genes.results | 0 testdata/QDESQ/star_rsem/QDESQ087AA.genes.results | 0 testdata/QDESQ/star_rsem/QDESQ088AI.genes.results | 0 testdata/QDESQ/star_salmon/QDESQ081AU/quant.sf | 0 testdata/QDESQ/star_salmon/QDESQ082A4/quant.sf | 0 testdata/QDESQ/star_salmon/QDESQ083AC/quant.sf | 0 testdata/QDESQ/star_salmon/QDESQ084AK/quant.sf | 0 testdata/QDESQ/star_salmon/QDESQ085AS/quant.sf | 0 testdata/QDESQ/star_salmon/QDESQ086A2/quant.sf | 0 testdata/QDESQ/star_salmon/QDESQ087AA/quant.sf | 0 testdata/QDESQ/star_salmon/QDESQ088AI/quant.sf | 0 testdata/Sample_preparations.tsv | 0 testdata/contrast_list.tsv | 0 testdata/contrast_matrix.tsv | 0 testdata/design.txt | 0 testdata/design_batcheffect.txt | 0 testdata/gprofiler_full_mmusculus.ENSG.gmt | 0 testdata/merged_gene_counts.txt | 0 testdata/offer_example.pdf | Bin testdata/relevel.tsv | 0 testdata/report_options.yml | 0 testdata/requested_genes.txt | 0 .../counts/QABCD00001_mature.sorted.idxstats | 0 .../QABCD00001_mature_hairpin.sorted.idxstats | 0 .../counts/QABCD00002_mature.sorted.idxstats | 0 .../QABCD00002_mature_hairpin.sorted.idxstats | 0 .../counts/QABCD00003_mature.sorted.idxstats | 0 .../QABCD00003_mature_hairpin.sorted.idxstats | 0 .../counts/QABCD00004_mature.sorted.idxstats | 0 .../QABCD00004_mature_hairpin.sorted.idxstats | 0 .../counts/QABCD00005_mature.sorted.idxstats | 0 .../QABCD00005_mature_hairpin.sorted.idxstats | 0 .../counts/QABCD00006_mature.sorted.idxstats | 0 .../QABCD00006_mature_hairpin.sorted.idxstats | 0 .../counts/QABCD00007_mature.sorted.idxstats | 0 .../QABCD00007_mature_hairpin.sorted.idxstats | 0 .../counts/QABCD00008_mature.sorted.idxstats | 0 .../QABCD00008_mature_hairpin.sorted.idxstats | 0 testdata/smrnaseq/design.txt | 0 testdata/smrnaseq/requested_genes.txt | 0 testdata/smrnaseq/samplesheet.tsv | 0 testdata/software_versions.csv | 0 testdata/software_versions_rsem.yml | 0 testdata/software_versions_salmon.yml | 0 testdata/software_versions_smrnaseq.yml | 0 testdata/summary.tsv | 0 tests/test.yml | 0 tests/test_batcheffect.yml | 0 tests/test_contrast_list.yml | 0 tests/test_contrast_matrix.yml | 0 tests/test_custom_gmt.yml | 0 tests/test_full.yml | 0 tests/test_no_multiqc.yml | 0 tests/test_relevel.yml | 0 tests/test_smrnaseq.yml | 0 tests/test_star_rsem.yml | 0 tests/test_star_salmon.yml | 0 tests/test_use_vst.yml | 0 tower.yml | 0 workflows/rnadeseq.nf | 0 140 files changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 .devcontainer/devcontainer.json mode change 100644 => 100755 .editorconfig mode change 100644 => 100755 .gitattributes mode change 100644 => 100755 .github/.dockstore.yml mode change 100644 => 100755 .github/CONTRIBUTING.md mode change 100644 => 100755 .github/ISSUE_TEMPLATE/bug_report.yml mode change 100644 => 100755 .github/ISSUE_TEMPLATE/feature_request.yml mode change 100644 => 100755 .github/PULL_REQUEST_TEMPLATE.md mode change 100644 => 100755 .github/workflows/awsfulltest.yml mode change 100644 => 100755 .github/workflows/awstest.yml mode change 100644 => 100755 .github/workflows/branch.yml mode change 100644 => 100755 .github/workflows/ci.yml mode change 100644 => 100755 .github/workflows/clean-up.yml mode change 100644 => 100755 .github/workflows/fix-linting.yml mode change 100644 => 100755 .github/workflows/linting.yml mode change 100644 => 100755 .github/workflows/linting_comment.yml mode change 100644 => 100755 .github/workflows/push_github_container_reg.yml mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .gitpod.yml mode change 100644 => 100755 .nf-core.yml mode change 100644 => 100755 .pre-commit-config.yaml mode change 100644 => 100755 .prettierignore mode change 100644 => 100755 .prettierrc.yml mode change 100644 => 100755 CHANGELOG.md mode change 100644 => 100755 CITATIONS.md mode change 100644 => 100755 CODE_OF_CONDUCT.md mode change 100644 => 100755 Dockerfile mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 assets/RNAseq_report.Rmd mode change 100644 => 100755 assets/adaptivecard.json mode change 100644 => 100755 assets/email_template.html mode change 100644 => 100755 assets/email_template.txt mode change 100644 => 100755 assets/methods_description_template.yml mode change 100644 => 100755 assets/multiqc_config.yml mode change 100644 => 100755 assets/nf-core-rnadeseq_logo_light.png mode change 100644 => 100755 assets/references.bibtex mode change 100644 => 100755 assets/schema_input.json mode change 100644 => 100755 assets/sendmail_template.txt mode change 100644 => 100755 assets/slackreport.json mode change 100644 => 100755 conf/base.config mode change 100644 => 100755 conf/igenomes.config mode change 100644 => 100755 conf/modules.config mode change 100644 => 100755 conf/test.config mode change 100644 => 100755 conf/test_batcheffect.config mode change 100644 => 100755 conf/test_contrast_list.config mode change 100644 => 100755 conf/test_contrast_matrix.config mode change 100644 => 100755 conf/test_custom_gmt.config mode change 100644 => 100755 conf/test_full.config mode change 100644 => 100755 conf/test_no_multiqc.config mode change 100644 => 100755 conf/test_relevel.config mode change 100644 => 100755 conf/test_smrnaseq.config mode change 100644 => 100755 conf/test_star_rsem.config mode change 100644 => 100755 conf/test_star_salmon.config mode change 100644 => 100755 conf/test_use_vst.config mode change 100644 => 100755 docs/README.md mode change 100644 => 100755 docs/images/nf-core-rnadeseq_logo_dark.png mode change 100644 => 100755 docs/images/nf-core-rnadeseq_logo_light.png mode change 100644 => 100755 docs/output.md mode change 100644 => 100755 docs/usage.md mode change 100644 => 100755 environment.yml mode change 100644 => 100755 lib/nfcore_external_java_deps.jar mode change 100644 => 100755 main.nf mode change 100644 => 100755 modules.json mode change 100644 => 100755 modules/local/report.nf mode change 100644 => 100755 modules/local/samplesheet_check.nf mode change 100644 => 100755 modules/nf-core/custom/dumpsoftwareversions/main.nf mode change 100644 => 100755 modules/nf-core/custom/dumpsoftwareversions/meta.yml mode change 100644 => 100755 nextflow.config mode change 100644 => 100755 nextflow_schema.json mode change 100644 => 100755 pyproject.toml mode change 100644 => 100755 subworkflows/local/input_check.nf mode change 100644 => 100755 testdata/MultiQC.zip mode change 100644 => 100755 testdata/QDESQ/QDESQ_Sample_preparations.tsv mode change 100644 => 100755 testdata/QDESQ/QDESQ_design.txt mode change 100644 => 100755 testdata/QDESQ/star_rsem/QDESQ081AU.genes.results mode change 100644 => 100755 testdata/QDESQ/star_rsem/QDESQ082A4.genes.results mode change 100644 => 100755 testdata/QDESQ/star_rsem/QDESQ083AC.genes.results mode change 100644 => 100755 testdata/QDESQ/star_rsem/QDESQ084AK.genes.results mode change 100644 => 100755 testdata/QDESQ/star_rsem/QDESQ085AS.genes.results mode change 100644 => 100755 testdata/QDESQ/star_rsem/QDESQ086A2.genes.results mode change 100644 => 100755 testdata/QDESQ/star_rsem/QDESQ087AA.genes.results mode change 100644 => 100755 testdata/QDESQ/star_rsem/QDESQ088AI.genes.results mode change 100644 => 100755 testdata/QDESQ/star_salmon/QDESQ081AU/quant.sf mode change 100644 => 100755 testdata/QDESQ/star_salmon/QDESQ082A4/quant.sf mode change 100644 => 100755 testdata/QDESQ/star_salmon/QDESQ083AC/quant.sf mode change 100644 => 100755 testdata/QDESQ/star_salmon/QDESQ084AK/quant.sf mode change 100644 => 100755 testdata/QDESQ/star_salmon/QDESQ085AS/quant.sf mode change 100644 => 100755 testdata/QDESQ/star_salmon/QDESQ086A2/quant.sf mode change 100644 => 100755 testdata/QDESQ/star_salmon/QDESQ087AA/quant.sf mode change 100644 => 100755 testdata/QDESQ/star_salmon/QDESQ088AI/quant.sf mode change 100644 => 100755 testdata/Sample_preparations.tsv mode change 100644 => 100755 testdata/contrast_list.tsv mode change 100644 => 100755 testdata/contrast_matrix.tsv mode change 100644 => 100755 testdata/design.txt mode change 100644 => 100755 testdata/design_batcheffect.txt mode change 100644 => 100755 testdata/gprofiler_full_mmusculus.ENSG.gmt mode change 100644 => 100755 testdata/merged_gene_counts.txt mode change 100644 => 100755 testdata/offer_example.pdf mode change 100644 => 100755 testdata/relevel.tsv mode change 100644 => 100755 testdata/report_options.yml mode change 100644 => 100755 testdata/requested_genes.txt mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00001_mature.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00001_mature_hairpin.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00002_mature.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00002_mature_hairpin.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00003_mature.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00003_mature_hairpin.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00004_mature.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00004_mature_hairpin.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00005_mature.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00005_mature_hairpin.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00006_mature.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00006_mature_hairpin.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00007_mature.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00007_mature_hairpin.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00008_mature.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/counts/QABCD00008_mature_hairpin.sorted.idxstats mode change 100644 => 100755 testdata/smrnaseq/design.txt mode change 100644 => 100755 testdata/smrnaseq/requested_genes.txt mode change 100644 => 100755 testdata/smrnaseq/samplesheet.tsv mode change 100644 => 100755 testdata/software_versions.csv mode change 100644 => 100755 testdata/software_versions_rsem.yml mode change 100644 => 100755 testdata/software_versions_salmon.yml mode change 100644 => 100755 testdata/software_versions_smrnaseq.yml mode change 100644 => 100755 testdata/summary.tsv mode change 100644 => 100755 tests/test.yml mode change 100644 => 100755 tests/test_batcheffect.yml mode change 100644 => 100755 tests/test_contrast_list.yml mode change 100644 => 100755 tests/test_contrast_matrix.yml mode change 100644 => 100755 tests/test_custom_gmt.yml mode change 100644 => 100755 tests/test_full.yml mode change 100644 => 100755 tests/test_no_multiqc.yml mode change 100644 => 100755 tests/test_relevel.yml mode change 100644 => 100755 tests/test_smrnaseq.yml mode change 100644 => 100755 tests/test_star_rsem.yml mode change 100644 => 100755 tests/test_star_salmon.yml mode change 100644 => 100755 tests/test_use_vst.yml mode change 100644 => 100755 tower.yml mode change 100644 => 100755 workflows/rnadeseq.nf diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json old mode 100644 new mode 100755 diff --git a/.editorconfig b/.editorconfig old mode 100644 new mode 100755 diff --git a/.gitattributes b/.gitattributes old mode 100644 new mode 100755 diff --git a/.github/.dockstore.yml b/.github/.dockstore.yml old mode 100644 new mode 100755 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml old mode 100644 new mode 100755 diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml old mode 100644 new mode 100755 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md old mode 100644 new mode 100755 diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/push_github_container_reg.yml b/.github/workflows/push_github_container_reg.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitpod.yml b/.gitpod.yml old mode 100644 new mode 100755 diff --git a/.nf-core.yml b/.nf-core.yml old mode 100644 new mode 100755 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml old mode 100644 new mode 100755 diff --git a/.prettierignore b/.prettierignore old mode 100644 new mode 100755 diff --git a/.prettierrc.yml b/.prettierrc.yml old mode 100644 new mode 100755 diff --git a/CHANGELOG.md b/CHANGELOG.md old mode 100644 new mode 100755 diff --git a/CITATIONS.md b/CITATIONS.md old mode 100644 new mode 100755 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md old mode 100644 new mode 100755 diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd old mode 100644 new mode 100755 index b1aa99b8..3f764a9b --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -2032,30 +2032,33 @@ for (file in contrast_files){ tryCatch( { png(filename = paste0("pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_",fname, ".png"), width = ifelse(nrow(mat)<=20, 200, 125)+ncol(mat)*40, height = 50+nrow(mat)*50) - pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) dev.off() + pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { + dev.off() print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_",fname, ".png because of the following error:\n", e)) } ) tryCatch( { pdf(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".pdf"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) - pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) dev.off() + pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { + dev.off() print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".pdf because of the following error:\n", e)) } ) tryCatch( { svg(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".svg"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) - pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) dev.off() + pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { + dev.off() print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".svg because of the following error:\n", e)) } ) diff --git a/assets/adaptivecard.json b/assets/adaptivecard.json old mode 100644 new mode 100755 diff --git a/assets/email_template.html b/assets/email_template.html old mode 100644 new mode 100755 diff --git a/assets/email_template.txt b/assets/email_template.txt old mode 100644 new mode 100755 diff --git a/assets/methods_description_template.yml b/assets/methods_description_template.yml old mode 100644 new mode 100755 diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml old mode 100644 new mode 100755 diff --git a/assets/nf-core-rnadeseq_logo_light.png b/assets/nf-core-rnadeseq_logo_light.png old mode 100644 new mode 100755 diff --git a/assets/references.bibtex b/assets/references.bibtex old mode 100644 new mode 100755 diff --git a/assets/schema_input.json b/assets/schema_input.json old mode 100644 new mode 100755 diff --git a/assets/sendmail_template.txt b/assets/sendmail_template.txt old mode 100644 new mode 100755 diff --git a/assets/slackreport.json b/assets/slackreport.json old mode 100644 new mode 100755 diff --git a/conf/base.config b/conf/base.config old mode 100644 new mode 100755 diff --git a/conf/igenomes.config b/conf/igenomes.config old mode 100644 new mode 100755 diff --git a/conf/modules.config b/conf/modules.config old mode 100644 new mode 100755 diff --git a/conf/test.config b/conf/test.config old mode 100644 new mode 100755 diff --git a/conf/test_batcheffect.config b/conf/test_batcheffect.config old mode 100644 new mode 100755 diff --git a/conf/test_contrast_list.config b/conf/test_contrast_list.config old mode 100644 new mode 100755 diff --git a/conf/test_contrast_matrix.config b/conf/test_contrast_matrix.config old mode 100644 new mode 100755 diff --git a/conf/test_custom_gmt.config b/conf/test_custom_gmt.config old mode 100644 new mode 100755 diff --git a/conf/test_full.config b/conf/test_full.config old mode 100644 new mode 100755 diff --git a/conf/test_no_multiqc.config b/conf/test_no_multiqc.config old mode 100644 new mode 100755 diff --git a/conf/test_relevel.config b/conf/test_relevel.config old mode 100644 new mode 100755 diff --git a/conf/test_smrnaseq.config b/conf/test_smrnaseq.config old mode 100644 new mode 100755 diff --git a/conf/test_star_rsem.config b/conf/test_star_rsem.config old mode 100644 new mode 100755 diff --git a/conf/test_star_salmon.config b/conf/test_star_salmon.config old mode 100644 new mode 100755 diff --git a/conf/test_use_vst.config b/conf/test_use_vst.config old mode 100644 new mode 100755 diff --git a/docs/README.md b/docs/README.md old mode 100644 new mode 100755 diff --git a/docs/images/nf-core-rnadeseq_logo_dark.png b/docs/images/nf-core-rnadeseq_logo_dark.png old mode 100644 new mode 100755 diff --git a/docs/images/nf-core-rnadeseq_logo_light.png b/docs/images/nf-core-rnadeseq_logo_light.png old mode 100644 new mode 100755 diff --git a/docs/output.md b/docs/output.md old mode 100644 new mode 100755 diff --git a/docs/usage.md b/docs/usage.md old mode 100644 new mode 100755 diff --git a/environment.yml b/environment.yml old mode 100644 new mode 100755 diff --git a/lib/nfcore_external_java_deps.jar b/lib/nfcore_external_java_deps.jar old mode 100644 new mode 100755 diff --git a/main.nf b/main.nf old mode 100644 new mode 100755 diff --git a/modules.json b/modules.json old mode 100644 new mode 100755 diff --git a/modules/local/report.nf b/modules/local/report.nf old mode 100644 new mode 100755 diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf old mode 100644 new mode 100755 diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf old mode 100644 new mode 100755 diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml old mode 100644 new mode 100755 diff --git a/nextflow.config b/nextflow.config old mode 100644 new mode 100755 diff --git a/nextflow_schema.json b/nextflow_schema.json old mode 100644 new mode 100755 diff --git a/pyproject.toml b/pyproject.toml old mode 100644 new mode 100755 diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf old mode 100644 new mode 100755 diff --git a/testdata/MultiQC.zip b/testdata/MultiQC.zip old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/QDESQ_Sample_preparations.tsv b/testdata/QDESQ/QDESQ_Sample_preparations.tsv old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/QDESQ_design.txt b/testdata/QDESQ/QDESQ_design.txt old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_rsem/QDESQ081AU.genes.results b/testdata/QDESQ/star_rsem/QDESQ081AU.genes.results old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_rsem/QDESQ082A4.genes.results b/testdata/QDESQ/star_rsem/QDESQ082A4.genes.results old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_rsem/QDESQ083AC.genes.results b/testdata/QDESQ/star_rsem/QDESQ083AC.genes.results old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_rsem/QDESQ084AK.genes.results b/testdata/QDESQ/star_rsem/QDESQ084AK.genes.results old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_rsem/QDESQ085AS.genes.results b/testdata/QDESQ/star_rsem/QDESQ085AS.genes.results old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_rsem/QDESQ086A2.genes.results b/testdata/QDESQ/star_rsem/QDESQ086A2.genes.results old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_rsem/QDESQ087AA.genes.results b/testdata/QDESQ/star_rsem/QDESQ087AA.genes.results old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_rsem/QDESQ088AI.genes.results b/testdata/QDESQ/star_rsem/QDESQ088AI.genes.results old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_salmon/QDESQ081AU/quant.sf b/testdata/QDESQ/star_salmon/QDESQ081AU/quant.sf old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_salmon/QDESQ082A4/quant.sf b/testdata/QDESQ/star_salmon/QDESQ082A4/quant.sf old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_salmon/QDESQ083AC/quant.sf b/testdata/QDESQ/star_salmon/QDESQ083AC/quant.sf old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_salmon/QDESQ084AK/quant.sf b/testdata/QDESQ/star_salmon/QDESQ084AK/quant.sf old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_salmon/QDESQ085AS/quant.sf b/testdata/QDESQ/star_salmon/QDESQ085AS/quant.sf old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_salmon/QDESQ086A2/quant.sf b/testdata/QDESQ/star_salmon/QDESQ086A2/quant.sf old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_salmon/QDESQ087AA/quant.sf b/testdata/QDESQ/star_salmon/QDESQ087AA/quant.sf old mode 100644 new mode 100755 diff --git a/testdata/QDESQ/star_salmon/QDESQ088AI/quant.sf b/testdata/QDESQ/star_salmon/QDESQ088AI/quant.sf old mode 100644 new mode 100755 diff --git a/testdata/Sample_preparations.tsv b/testdata/Sample_preparations.tsv old mode 100644 new mode 100755 diff --git a/testdata/contrast_list.tsv b/testdata/contrast_list.tsv old mode 100644 new mode 100755 diff --git a/testdata/contrast_matrix.tsv b/testdata/contrast_matrix.tsv old mode 100644 new mode 100755 diff --git a/testdata/design.txt b/testdata/design.txt old mode 100644 new mode 100755 diff --git a/testdata/design_batcheffect.txt b/testdata/design_batcheffect.txt old mode 100644 new mode 100755 diff --git a/testdata/gprofiler_full_mmusculus.ENSG.gmt b/testdata/gprofiler_full_mmusculus.ENSG.gmt old mode 100644 new mode 100755 diff --git a/testdata/merged_gene_counts.txt b/testdata/merged_gene_counts.txt old mode 100644 new mode 100755 diff --git a/testdata/offer_example.pdf b/testdata/offer_example.pdf old mode 100644 new mode 100755 diff --git a/testdata/relevel.tsv b/testdata/relevel.tsv old mode 100644 new mode 100755 diff --git a/testdata/report_options.yml b/testdata/report_options.yml old mode 100644 new mode 100755 diff --git a/testdata/requested_genes.txt b/testdata/requested_genes.txt old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00001_mature.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00001_mature.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00001_mature_hairpin.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00001_mature_hairpin.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00002_mature.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00002_mature.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00002_mature_hairpin.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00002_mature_hairpin.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00003_mature.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00003_mature.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00003_mature_hairpin.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00003_mature_hairpin.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00004_mature.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00004_mature.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00004_mature_hairpin.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00004_mature_hairpin.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00005_mature.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00005_mature.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00005_mature_hairpin.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00005_mature_hairpin.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00006_mature.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00006_mature.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00006_mature_hairpin.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00006_mature_hairpin.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00007_mature.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00007_mature.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00007_mature_hairpin.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00007_mature_hairpin.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00008_mature.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00008_mature.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/counts/QABCD00008_mature_hairpin.sorted.idxstats b/testdata/smrnaseq/counts/QABCD00008_mature_hairpin.sorted.idxstats old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/design.txt b/testdata/smrnaseq/design.txt old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/requested_genes.txt b/testdata/smrnaseq/requested_genes.txt old mode 100644 new mode 100755 diff --git a/testdata/smrnaseq/samplesheet.tsv b/testdata/smrnaseq/samplesheet.tsv old mode 100644 new mode 100755 diff --git a/testdata/software_versions.csv b/testdata/software_versions.csv old mode 100644 new mode 100755 diff --git a/testdata/software_versions_rsem.yml b/testdata/software_versions_rsem.yml old mode 100644 new mode 100755 diff --git a/testdata/software_versions_salmon.yml b/testdata/software_versions_salmon.yml old mode 100644 new mode 100755 diff --git a/testdata/software_versions_smrnaseq.yml b/testdata/software_versions_smrnaseq.yml old mode 100644 new mode 100755 diff --git a/testdata/summary.tsv b/testdata/summary.tsv old mode 100644 new mode 100755 diff --git a/tests/test.yml b/tests/test.yml old mode 100644 new mode 100755 diff --git a/tests/test_batcheffect.yml b/tests/test_batcheffect.yml old mode 100644 new mode 100755 diff --git a/tests/test_contrast_list.yml b/tests/test_contrast_list.yml old mode 100644 new mode 100755 diff --git a/tests/test_contrast_matrix.yml b/tests/test_contrast_matrix.yml old mode 100644 new mode 100755 diff --git a/tests/test_custom_gmt.yml b/tests/test_custom_gmt.yml old mode 100644 new mode 100755 diff --git a/tests/test_full.yml b/tests/test_full.yml old mode 100644 new mode 100755 diff --git a/tests/test_no_multiqc.yml b/tests/test_no_multiqc.yml old mode 100644 new mode 100755 diff --git a/tests/test_relevel.yml b/tests/test_relevel.yml old mode 100644 new mode 100755 diff --git a/tests/test_smrnaseq.yml b/tests/test_smrnaseq.yml old mode 100644 new mode 100755 diff --git a/tests/test_star_rsem.yml b/tests/test_star_rsem.yml old mode 100644 new mode 100755 diff --git a/tests/test_star_salmon.yml b/tests/test_star_salmon.yml old mode 100644 new mode 100755 diff --git a/tests/test_use_vst.yml b/tests/test_use_vst.yml old mode 100644 new mode 100755 diff --git a/tower.yml b/tower.yml old mode 100644 new mode 100755 diff --git a/workflows/rnadeseq.nf b/workflows/rnadeseq.nf old mode 100644 new mode 100755 From 9dcd79c813e1589ab4a74d792d84cf4d1c3ef718 Mon Sep 17 00:00:00 2001 From: WackerO Date: Mon, 5 Feb 2024 12:42:52 +0100 Subject: [PATCH 02/16] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56d1d982..7ada1e03 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- [#222](https://github.com/qbic-pipelines/rnadeseq/pull/222) Fixed too many devices error from tryCatch around normalized heatmaps - [#212](https://github.com/qbic-pipelines/rnadeseq/pull/212) Fixed movability of interactive gostplots - [#208](https://github.com/qbic-pipelines/rnadeseq/pull/208) Fixed relevel bug, the function should now finally work! - [#207](https://github.com/qbic-pipelines/rnadeseq/pull/207) Fixed check of samples in counts vs metadata From 58865a862055f02e9132db0acc54cc3d3510bc6c Mon Sep 17 00:00:00 2001 From: WackerO Date: Mon, 12 Feb 2024 14:48:02 +0100 Subject: [PATCH 03/16] Replaced double dev.offs with finally --- assets/RNAseq_report.Rmd | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index 3f764a9b..95431f82 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -599,7 +599,8 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { } } missing_files <- paste0(substring(missing_files, 1, nchar(missing_files)-2), ".") - stop(missing_files, call.=F) } + stop(missing_files, call.=F) + } #The following steps are necessary for the processing of salmon output as the files do # not contain integer counts and can therefore not be directly used for cds @@ -719,7 +720,7 @@ if (run_rlog){ # Cooks distances: get important for example when checking knock-out and overexpression studies pdf("differential_gene_expression/plots/further_diagnostics_plots/Cooks-distances.pdf") par(mar=c(10,3,3,3)) -par( mfrow = c(1,2)) +par(mfrow = c(1,2)) boxplot(log10(assays(cds)[["cooks"]]), range=0, las=2,ylim = c(-15, 15),main="log10-Cooks") boxplot(log2(assays(cds)[["cooks"]]), range=0, las=2,ylim = c(-15, 15),main="log2-Cooks") dev.off() @@ -1348,6 +1349,7 @@ if (isProvided(params$path_contrast_list)) { contrast_names <- append(contrast_names, contname) } } + if (isProvided(params$path_contrast_pairs)) { contrasts <- read.table(path_contrast_pairs, sep="\t", header = T, colClasses = "character") write.table(contrasts, file="differential_gene_expression/metadata/contrast_pairs.tsv", sep="\t", quote=F, col.names = T, row.names = F) @@ -2027,39 +2029,42 @@ for (file in contrast_files){ # Skip the heatmaps for CI tests because especially png() works only very unreliably for the heatmaps for some reason if (!isProvided(params$citest) & nrow(mat)>1){ dir.create(paste("pathway_analysis", fname, "pathway_heatmaps", sep="/")) - + # Because the image devices sometimes don't work here, surround them with a tryCatch so that the code continues even if a certain heatmap is not saved tryCatch( { png(filename = paste0("pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_",fname, ".png"), width = ifelse(nrow(mat)<=20, 200, 125)+ncol(mat)*40, height = 50+nrow(mat)*50) - dev.off() pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - dev.off() print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_",fname, ".png because of the following error:\n", e)) + }, + finally={ + dev.off() } ) tryCatch( { pdf(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".pdf"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) - dev.off() pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - dev.off() print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".pdf because of the following error:\n", e)) + }, + finally={ + dev.off() } ) tryCatch( { svg(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".svg"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) - dev.off() pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - dev.off() print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".svg because of the following error:\n", e)) + }, + finally={ + dev.off() } ) } @@ -2073,9 +2078,7 @@ for (file in contrast_files){ print_string <- paste0("Plotting pathway: ", pathway_kegg) gene.data = DE_genes gene.data.subset = gene.data[gene.data$Ensembl_ID %in% gene_list, c("Ensembl_ID","log2FoldChange")] - entrez_ids = AnnotationDbi::mapIds(species_library_installed, keys=as.character(gene.data.subset$Ensembl_ID), column = "ENTREZID", keytype=params$keytype, multiVals="first") - gene.data.subset <- gene.data.subset[!(is.na(entrez_ids)),] if (length(entrez_ids)!=length(unique(entrez_ids))) { From 84a9b9da2017aaae2e9682f1fc4c8fd61ae8aeb0 Mon Sep 17 00:00:00 2001 From: WackerO Date: Thu, 15 Feb 2024 11:16:29 +0100 Subject: [PATCH 04/16] Shortened some output filepaths, added datasources param to make pathway analysis adjustable --- assets/RNAseq_report.Rmd | 67 +++++++++++++++++++++++++++------------- bin/Execute_report.R | 2 ++ conf/test.config | 1 + modules/local/report.nf | 2 ++ nextflow.config | 1 + nextflow_schema.json | 6 +++- 6 files changed, 57 insertions(+), 22 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index 95431f82..87f09691 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -43,6 +43,7 @@ params: custom_gmt: '' set_background: '' custom_background: '' + datasources: '' #Additional args for the report path_proj_summary: '' @@ -1773,8 +1774,12 @@ BiocManager::install(params$species_library, lib=species_dir, version="3.17", fo library(params$species_library, lib.loc=species_dir, character.only=T) species_library_installed <- get(params$species_library) -# gprofiler pathway / term sources parameters -datasources <- c("KEGG", "REAC") +# If provided, prepare datasources from comma-separated string +if (isProvided(params$datasources)) { + datasources <- unlist(strsplit(params$datasources, ',')) +} else { + datasources <- c() +} # Default to 1 for the nb of genes DE in a pathway min_DEG_pathway <- as.integer(params$min_DEG_pathway) @@ -1804,7 +1809,18 @@ mv_status <- F if (isProvided(params$custom_gmt)){ # If custom GMT file was provided, filter it before uploading to use in gost queries (gprofiler will NOT filter itself, so otherwise the output will contain all kinds of datasources, not just the selected ones) - out_gmt <- (Filter(function(line) any(startsWith(line, datasources)), readLines(params$custom_gmt))) + out_gmt <- readLines(params$custom_gmt) + + # If datasources are also provided, filter the GMT + if (isProvided(params$datasources)) { + go_positions <- grep("^GO", datasources) + if (length(go_positions)) { + datasources <- my_vector[-go_positions] # If there are any datasources starting with GO, remove them (gets rid of GO:BP etc.) + datasources <- append(datasources, "GO") # Then add the single entry GO, as otherwise, the filtering might not recognize these datasources + } + out_gmt <- (Filter(function(line) any(startsWith(line, datasources)), out_gmt)) # Remove GMT lines that don't start with a datasource + } + out_path <- paste0(tools::file_path_sans_ext(basename(params$custom_gmt)), "_filtered.gmt") writeLines(out_gmt, out_path) gost_id <- upload_GMT_file(out_path) @@ -1940,13 +1956,13 @@ for (file in contrast_files){ # Generate non-interactive pathway dotplots in the folder pg <- gostplot(gostres, capped=T, interactive=F) - ggsave(pg, filename = paste0("pathway_analysis", "/", fname, "_gost_pathway_enrichment_plot.pdf"), + ggsave(pg, filename = "pathway_analysis/gost_pathway_enrichment_plot.pdf", device="pdf", height=10, width=15, units="cm", limitsize=F) - ggsave(pg, filename = paste0("pathway_analysis", "/", fname, "_gost_pathway_enrichment_plot.png"), + ggsave(pg, filename = "pathway_analysis/gost_pathway_enrichment_plot.png", device="png", height=10, width=15, units="cm", dpi=300, limitsize=F) - ggsave(pg, filename = paste0("pathway_analysis", "/", fname, "_gost_pathway_enrichment_plot.svg"), + ggsave(pg, filename = "pathway_analysis/gost_pathway_enrichment_plot.svg", device="svg", height=10, width=15, units="cm", dpi=300, limitsize=F) @@ -1972,7 +1988,7 @@ for (file in contrast_files){ # Save pathway enrichment table in tsv format write.table(pathway_gostres_table, - file = paste0("pathway_analysis", "/", fname, "/", fname, "_pathway_enrichment_results.tsv"), + file = paste0("pathway_analysis", "/", fname, "/", "pathway_enrichment_results.tsv"), sep="\t", quote = F, col.names = T, row.names = F) print("------------------------------------") @@ -1994,7 +2010,7 @@ for (file in contrast_files){ # Plotting results for df df_subset <- data.frame(Pathway_name = df$short_name, Pathway_code = df$term_id, DE_genes = df$intersection_size, Pathway_size = df$term_size, Fraction_DE = (df$intersection_size / df$term_size), Padj = df$p_value, DE_genes_names = df$intersection) write.table(df_subset, - file = paste0("pathway_analysis", "/", fname, "/", fname, "_", db_source, "_pathway_enrichment_results.tsv"), + file = paste0("pathway_analysis", "/", fname, "/", db_source, "_pathway_enrichment_results.tsv"), sep="\t", quote = F, col.names = T, row.names = F) # Enriched pathways horizontal barplots of padj values @@ -2006,9 +2022,9 @@ for (file in contrast_files){ scale_fill_continuous(high = "#132B43", low = "#56B1F7") + ggtitle("Enriched pathways") + xlab("") + ylab("Gene fraction (DE genes / Pathway size)") - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", fname, "_", db_source, "_pathway_enrichment_plot.pdf"), device = "pdf", height = 5+0.5*nrow(df_subset), units = "cm", limitsize=F) - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", fname,"_", db_source, "_pathway_enrichment_plot.png"), device = "png", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", fname,"_", db_source, "_pathway_enrichment_plot.svg"), device = "svg", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", db_source, "_pathway_enrichment_plot.pdf"), device = "pdf", height = 5+0.5*nrow(df_subset), units = "cm", limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", db_source, "_pathway_enrichment_plot.png"), device = "png", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", db_source, "_pathway_enrichment_plot.svg"), device = "svg", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) # Plotting heatmaps and KEGG pathways for all pathways print("Plotting heatmaps...") @@ -2033,11 +2049,11 @@ for (file in contrast_files){ # Because the image devices sometimes don't work here, surround them with a tryCatch so that the code continues even if a certain heatmap is not saved tryCatch( { - png(filename = paste0("pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_",fname, ".png"), width = ifelse(nrow(mat)<=20, 200, 125)+ncol(mat)*40, height = 50+nrow(mat)*50) + png(filename = paste0("pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".png"), width = ifelse(nrow(mat)<=20, 200, 125)+ncol(mat)*40, height = 50+nrow(mat)*50) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_",fname, ".png because of the following error:\n", e)) + print(paste0("Could not save pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".png because of the following error:\n", e)) }, finally={ dev.off() @@ -2045,11 +2061,11 @@ for (file in contrast_files){ ) tryCatch( { - pdf(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".pdf"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) + pdf(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".pdf"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".pdf because of the following error:\n", e)) + print(paste0("Could not save pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".pdf because of the following error:\n", e)) }, finally={ dev.off() @@ -2057,11 +2073,11 @@ for (file in contrast_files){ ) tryCatch( { - svg(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".svg"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) + svg(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".svg"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - print(paste0("Could not save Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, "_", fname, ".svg because of the following error:\n", e)) + print(paste0("Could not save pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".svg because of the following error:\n", e)) }, finally={ dev.off() @@ -2440,16 +2456,25 @@ name_species = params$species_library version_species = packageVersion(name_species) if (isProvided(params$custom_gmt)){ - database_string <- paste0("Also, a gprofiler query with this custom GMT file was done: `", basename(params$custom_gmt), "`. Entries of the following datasources were considered: ") - dbs <- paste(datasources, collapse="`, `") - database_string <- paste0(database_string, "`", dbs, "`.") -} else { + database_string <- paste0("Also, a gprofiler query with this custom GMT file was done: `", basename(params$custom_gmt), "`.") + + if (isProvided(params$datasources)) { + database_string <- paste(database_string, "Entries of the following datasources were considered: ") + dbs <- paste(datasources, collapse="`, `") + database_string <- paste0(database_string, "`", dbs, "`.") + } else { + database_string <- "" + } + +} else if (isProvided(params$datasources)) { database_string = "Also, the following databases were queried: " database_version_info <- get_version_info(params$organism) database_string <- paste0(database_string, "`gprofiler: ", database_version_info$gprofiler_version, "`") for (db in datasources) { database_string <- paste0(database_string, ", `", db, ": ", database_version_info$sources[[db]]$version, "`") } +} else { + database_string <- paste(database_string, "All datasources available in g:Profiler were considered (check https://biit.cs.ut.ee/gprofiler/gost and https://biit.cs.ut.ee/gprofiler/page/docs for more info).") } cat(paste0( diff --git a/bin/Execute_report.R b/bin/Execute_report.R index 5b9160d1..cd95b52e 100755 --- a/bin/Execute_report.R +++ b/bin/Execute_report.R @@ -34,6 +34,7 @@ option_list = list( make_option("--set_background", action="store_true", default=TRUE, help="Whether to use a background list for pathway analysis; if true, will only consider expressed genes (i.e. mean counts > 0) for PA."), make_option("--custom_background", type="character", default=NULL, help="Path to a custom background list TXT for pathway analysis; if provided, will only consider genes in that list for PA."), make_option(c("-w", "--min_DEG_pathway"), type="integer", default=NULL, help="min. number of genes DE in a pathway for this pathway to be considered enriched.", metavar="integer"), + make_option("--datasources", type="character", default=NULL, help="Which datasources to use for pathway analysis.", metavar="character"), make_option(c("-s", "--proj_summary"), type="character", default=NULL, help="Project summary file", metavar="character"), make_option(c("--path_quote"), type="character", default=NULL, help="Path to the quote PDF", metavar="character"), @@ -82,6 +83,7 @@ rmarkdown::render(opt$report, output_file = opt$output, knit_root_dir = wd, outp custom_background = opt$custom_background, keytype = opt$keytype, min_DEG_pathway = opt$min_DEG_pathway, + datasources = opt$datasources, path_proj_summary = opt$proj_summary, path_quote = opt$path_quote, diff --git a/conf/test.config b/conf/test.config index 05a27ad8..1b5562b4 100755 --- a/conf/test.config +++ b/conf/test.config @@ -30,4 +30,5 @@ params { run_pathway_analysis = true genome = 'GRCm38' quote = 'https://raw.githubusercontent.com/qbic-pipelines/rnadeseq/dev/testdata/offer_example.pdf' + datasources = 'KEGG,REAC' } diff --git a/modules/local/report.nf b/modules/local/report.nf index eac509d0..4c5c9782 100755 --- a/modules/local/report.nf +++ b/modules/local/report.nf @@ -37,6 +37,7 @@ process REPORT { def custom_gmt_opt = custom_gmt.name != 'NO_FILE3' ? "--custom_gmt $custom_gmt" : '' def set_background_opt = params.set_background ? "--set_background TRUE" : "--set_background FALSE" def custom_background_opt = custom_background.name != 'NO_FILE7' ? "--custom_background $custom_background" : '' + def datasources_opt = params.datasources ? "--datasources $params.datasources" : '' def quote_opt = params.quote != 'NO_FILE5' ? "--path_quote $params.quote" : '' def software_versions_opt = params.software_versions != 'NO_FILE6' ? "--software_versions $params.software_versions" : '' @@ -76,6 +77,7 @@ process REPORT { --species_library $params.species_library \ --keytype $params.keytype \ --min_DEG_pathway $params.min_DEG_pathway \ + $datasources_opt \ $quote_opt \ $software_versions_opt \ --proj_summary $proj_summary \ diff --git a/nextflow.config b/nextflow.config index 9018f037..3838aeba 100755 --- a/nextflow.config +++ b/nextflow.config @@ -39,6 +39,7 @@ params { custom_gmt = 'NO_FILE3' set_background = true custom_background = 'NO_FILE7' + datasources = null // Additional args for the report project_summary = null diff --git a/nextflow_schema.json b/nextflow_schema.json index adddbf59..d41f8c26 100755 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -125,7 +125,7 @@ }, "custom_gmt": { "type": "string", - "description": "Path to custom GMT file for gost query, this allows e.g. to query older versions of databases for pathway analysis, not necessary if --skip_pathway_analysis = true." + "description": "Path to custom GMT file for gost query, this allows e.g. to query older versions of databases for pathway analysis, not necessary if --skip_pathway_analysis = true. If --datasources is set, the GMT file will be filtered for these datasources." }, "set_background": { "type": "boolean", @@ -140,6 +140,10 @@ "type": "integer", "default": 1, "description": "Integer indicating how many genes in a pathway must be differentially expressed to be considered as enriched, and report these pathways in tables and the final report. The default value is 1." + }, + "datasources": { + "type": "string", + "description": "Which datasources to use for pathway analysis, comma-separated string like 'KEGG,REAC'. See param 'sources' on https://rdrr.io/cran/gprofiler2/man/gost.html for a list of available sources. If not set, will use all sources. If set while a --custom_gmt is provided, will filter the GMT for these datasources (will not filter for the GO subtypes like GO:BP, just for GO)." } } }, From c77819213fc1e50b630a88950b71041573f0a48d Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 20 Feb 2024 08:54:11 +0100 Subject: [PATCH 05/16] Updated changelog and test profiles --- CHANGELOG.md | 4 +++- assets/RNAseq_report.Rmd | 7 ++++++- conf/test.config | 1 - conf/test_custom_gmt.config | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ada1e03..a9e2e139 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- [#225](https://github.com/qbic-pipelines/rnadeseq/pull/225) Added param for pathway analysis datasources - [#215](https://github.com/qbic-pipelines/rnadeseq/pull/215) Added gene_name to boxplot titles and filenames; increased threshold before overlapping PCA labels are hidden - [#213](https://github.com/qbic-pipelines/rnadeseq/pull/213) Added smrnaseq input support - [#212](https://github.com/qbic-pipelines/rnadeseq/pull/212) Added computational methods if no --software_versions @@ -17,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- [#225](https://github.com/qbic-pipelines/rnadeseq/pull/225) Shortened names of some output files - [#219](https://github.com/qbic-pipelines/rnadeseq/pull/219) Release 2.2 to master - [#220](https://github.com/qbic-pipelines/rnadeseq/pull/220) Commit suggestions from PR review for release 2.2 - [#218](https://github.com/qbic-pipelines/rnadeseq/pull/218) Preparing release 2.2 with version bumps @@ -34,7 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- [#222](https://github.com/qbic-pipelines/rnadeseq/pull/222) Fixed too many devices error from tryCatch around normalized heatmaps +- [#225](https://github.com/qbic-pipelines/rnadeseq/pull/225) Fixed too many devices error from tryCatch around normalized heatmaps - [#212](https://github.com/qbic-pipelines/rnadeseq/pull/212) Fixed movability of interactive gostplots - [#208](https://github.com/qbic-pipelines/rnadeseq/pull/208) Fixed relevel bug, the function should now finally work! - [#207](https://github.com/qbic-pipelines/rnadeseq/pull/207) Fixed check of samples in counts vs metadata diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index 87f09691..d113be70 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -1862,6 +1862,11 @@ if (mv_status) { } } +# Set datasources to NULL instead of c() to ensure that the gost queries work +if (!isProvided(params$datasources)) { + datasources <- NULL +} + # ------------------ # Set default params # ------------------ @@ -2474,7 +2479,7 @@ if (isProvided(params$custom_gmt)){ database_string <- paste0(database_string, ", `", db, ": ", database_version_info$sources[[db]]$version, "`") } } else { - database_string <- paste(database_string, "All datasources available in g:Profiler were considered (check https://biit.cs.ut.ee/gprofiler/gost and https://biit.cs.ut.ee/gprofiler/page/docs for more info).") + database_string <- paste("All datasources available in g:Profiler were considered (check https://biit.cs.ut.ee/gprofiler/gost and https://biit.cs.ut.ee/gprofiler/page/docs for more info).") } cat(paste0( diff --git a/conf/test.config b/conf/test.config index 1b5562b4..05a27ad8 100755 --- a/conf/test.config +++ b/conf/test.config @@ -30,5 +30,4 @@ params { run_pathway_analysis = true genome = 'GRCm38' quote = 'https://raw.githubusercontent.com/qbic-pipelines/rnadeseq/dev/testdata/offer_example.pdf' - datasources = 'KEGG,REAC' } diff --git a/conf/test_custom_gmt.config b/conf/test_custom_gmt.config index e3f84934..345c2bef 100755 --- a/conf/test_custom_gmt.config +++ b/conf/test_custom_gmt.config @@ -30,4 +30,5 @@ params { run_pathway_analysis = true genome = 'GRCm38' custom_gmt = 'https://raw.githubusercontent.com/qbic-pipelines/rnadeseq/dev/testdata/gprofiler_full_mmusculus.ENSG.gmt' + datasources = 'KEGG,REAC' } From d177582340bd128c6172c200655671af24dc7293 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 20 Feb 2024 10:35:10 +0100 Subject: [PATCH 06/16] bugfix, docu update --- assets/RNAseq_report.Rmd | 8 ++++---- docs/output.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index d113be70..13aeb2ec 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -2027,9 +2027,9 @@ for (file in contrast_files){ scale_fill_continuous(high = "#132B43", low = "#56B1F7") + ggtitle("Enriched pathways") + xlab("") + ylab("Gene fraction (DE genes / Pathway size)") - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", db_source, "_pathway_enrichment_plot.pdf"), device = "pdf", height = 5+0.5*nrow(df_subset), units = "cm", limitsize=F) - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", db_source, "_pathway_enrichment_plot.png"), device = "png", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", db_source, "_pathway_enrichment_plot.svg"), device = "svg", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", make.names(db_source), "_pathway_enrichment_plot.pdf"), device = "pdf", height = 5+0.5*nrow(df_subset), units = "cm", limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", make.names(db_source), "_pathway_enrichment_plot.png"), device = "png", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", make.names(db_source), "_pathway_enrichment_plot.svg"), device = "svg", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) # Plotting heatmaps and KEGG pathways for all pathways print("Plotting heatmaps...") @@ -2198,7 +2198,7 @@ Inside the pathway analysis results folder, a subfolder for each contrast used f Expand/collapse - `*_gost_pathway_venn_diagram.pdf/png` - Venn diagrams showing the numbers of enriched pathways when using a background gene list vs when not using a bg list. -- `*_KEGG_pathway_enrichment_plot.pdf/png` +- `*_pathway_enrichment_plot.pdf/png` - Barplots showing the proportion of differentially expressed genes in the pathway. - `KEGG_pathways/` - Contains the KEGG pathways graphs with the log fold change of the differentially expressed genes. diff --git a/docs/output.md b/docs/output.md index 99131726..47213b9e 100755 --- a/docs/output.md +++ b/docs/output.md @@ -52,7 +52,7 @@ If pathway analysis was run, this directory contains the zipped pathway analysis - `*_gost_pathway_venn_diagram.pdf/png` - Venn diagrams showing the numbers of enriched pathways when using a background gene list vs when not using a bg list. -- `*_KEGG_pathway_enrichment_plot.pdf/png` +- `*_pathway_enrichment_plot.pdf/png` - Barplots showing the proportion of differentially expressed genes in the pathway. - `KEGG_pathways/` - Contains the KEGG pathways graphs with the log fold change of the differentially expressed genes. From 803d56a1ab9d8b1de65bb05bf4c92adac2783633 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 20 Feb 2024 11:03:10 +0100 Subject: [PATCH 07/16] bugfix --- assets/RNAseq_report.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index 13aeb2ec..eee83bd5 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -2015,7 +2015,7 @@ for (file in contrast_files){ # Plotting results for df df_subset <- data.frame(Pathway_name = df$short_name, Pathway_code = df$term_id, DE_genes = df$intersection_size, Pathway_size = df$term_size, Fraction_DE = (df$intersection_size / df$term_size), Padj = df$p_value, DE_genes_names = df$intersection) write.table(df_subset, - file = paste0("pathway_analysis", "/", fname, "/", db_source, "_pathway_enrichment_results.tsv"), + file = paste0("pathway_analysis", "/", fname, "/", make.names(db_source), "_pathway_enrichment_results.tsv"), sep="\t", quote = F, col.names = T, row.names = F) # Enriched pathways horizontal barplots of padj values From 6b3199cfd6515d6b35d3f347275b4757b5004266 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 20 Feb 2024 13:22:08 +0100 Subject: [PATCH 08/16] file path changes --- assets/RNAseq_report.Rmd | 37 ++++++++++++++++++++----------------- docs/output.md | 6 ++++-- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index eee83bd5..daed4082 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -1882,11 +1882,12 @@ theme_set(theme_classic()) for (file in contrast_files){ - #Reading DE genes list + # Reading DE genes list fname <- tools::file_path_sans_ext(basename(file)) dir.create(paste("pathway_analysis", fname, sep="/")) dir.create(paste("pathway_analysis", fname, "KEGG_pathways", sep="/")) + dir.create(paste("pathway_analysis", fname, "enrichment_plots", sep="/")) DE_genes <- read.csv(file = paste0(path_contrasts, file), sep="\t", header = T) DE_genes <- as.data.frame(DE_genes) @@ -1961,13 +1962,13 @@ for (file in contrast_files){ # Generate non-interactive pathway dotplots in the folder pg <- gostplot(gostres, capped=T, interactive=F) - ggsave(pg, filename = "pathway_analysis/gost_pathway_enrichment_plot.pdf", + ggsave(pg, filename = paste0("pathway_analysis/", "/", fname, "/gost_pathway_gostplot.pdf"), device="pdf", height=10, width=15, units="cm", limitsize=F) - ggsave(pg, filename = "pathway_analysis/gost_pathway_enrichment_plot.png", + ggsave(pg, filename = paste0("pathway_analysis/", "/", fname, "/gost_pathway_gostplot.png"), device="png", height=10, width=15, units="cm", dpi=300, limitsize=F) - ggsave(pg, filename = "pathway_analysis/gost_pathway_enrichment_plot.svg", + ggsave(pg, filename = paste0("pathway_analysis/", "/", fname, "/gost_pathway_gostplot.svg"), device="svg", height=10, width=15, units="cm", dpi=300, limitsize=F) @@ -1993,7 +1994,7 @@ for (file in contrast_files){ # Save pathway enrichment table in tsv format write.table(pathway_gostres_table, - file = paste0("pathway_analysis", "/", fname, "/", "pathway_enrichment_results.tsv"), + file = paste0("pathway_analysis", "/", fname, "/pathway_enrichment_results.tsv"), sep="\t", quote = F, col.names = T, row.names = F) print("------------------------------------") @@ -2027,9 +2028,9 @@ for (file in contrast_files){ scale_fill_continuous(high = "#132B43", low = "#56B1F7") + ggtitle("Enriched pathways") + xlab("") + ylab("Gene fraction (DE genes / Pathway size)") - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", make.names(db_source), "_pathway_enrichment_plot.pdf"), device = "pdf", height = 5+0.5*nrow(df_subset), units = "cm", limitsize=F) - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", make.names(db_source), "_pathway_enrichment_plot.png"), device = "png", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) - ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/", make.names(db_source), "_pathway_enrichment_plot.svg"), device = "svg", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/enrichment_plots/", make.names(db_source), "_pathway_enrichment_plot.pdf"), device = "pdf", height = 5+0.5*nrow(df_subset), units = "cm", limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/enrichment_plots/", make.names(db_source), "_pathway_enrichment_plot.png"), device = "png", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) + ggsave(p, filename = paste0("pathway_analysis", "/", fname, "/enrichment_plots/", make.names(db_source), "_pathway_enrichment_plot.svg"), device = "svg", height = 5+0.5*nrow(df_subset), units = "cm", dpi = 300, limitsize=F) # Plotting heatmaps and KEGG pathways for all pathways print("Plotting heatmaps...") @@ -2054,11 +2055,11 @@ for (file in contrast_files){ # Because the image devices sometimes don't work here, surround them with a tryCatch so that the code continues even if a certain heatmap is not saved tryCatch( { - png(filename = paste0("pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".png"), width = ifelse(nrow(mat)<=20, 200, 125)+ncol(mat)*40, height = 50+nrow(mat)*50) + png(filename = paste0("pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".png"), width = ifelse(nrow(mat)<=20, 200, 125)+ncol(mat)*40, height = 50+nrow(mat)*50) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - print(paste0("Could not save pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".png because of the following error:\n", e)) + print(paste0("Could not save pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".png because of the following error:\n", e)) }, finally={ dev.off() @@ -2066,11 +2067,11 @@ for (file in contrast_files){ ) tryCatch( { - pdf(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".pdf"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) + pdf(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".pdf"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - print(paste0("Could not save pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".pdf because of the following error:\n", e)) + print(paste0("Could not save pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".pdf because of the following error:\n", e)) }, finally={ dev.off() @@ -2078,11 +2079,11 @@ for (file in contrast_files){ ) tryCatch( { - svg(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".svg"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) + svg(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".svg"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) }, error=function(e) { - print(paste0("Could not save pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", pathway$term_id, ".svg because of the following error:\n", e)) + print(paste0("Could not save pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".svg because of the following error:\n", e)) }, finally={ dev.off() @@ -2197,9 +2198,11 @@ Inside the pathway analysis results folder, a subfolder for each contrast used f

Expand/collapse - `*_gost_pathway_venn_diagram.pdf/png` - - Venn diagrams showing the numbers of enriched pathways when using a background gene list vs when not using a bg list. -- `*_pathway_enrichment_plot.pdf/png` - - Barplots showing the proportion of differentially expressed genes in the pathway. + - Venn diagrams showing the numbers of enriched pathways when using a background gene list vs when not using a bg list. +- `enrichment_plots/*_pathway_enrichment_plot.{pdf/png/svg}` + - Barplots showing the proportion of differentially expressed genes in the pathway for a certain pathway database. +- `gost_pathway_gostplot.{pdf/png/svg}` + - Manhattan plots displaying all enriched pathways. - `KEGG_pathways/` - Contains the KEGG pathways graphs with the log fold change of the differentially expressed genes. - `pathway_heatmaps` diff --git a/docs/output.md b/docs/output.md index 47213b9e..6cc4e044 100755 --- a/docs/output.md +++ b/docs/output.md @@ -52,8 +52,10 @@ If pathway analysis was run, this directory contains the zipped pathway analysis - `*_gost_pathway_venn_diagram.pdf/png` - Venn diagrams showing the numbers of enriched pathways when using a background gene list vs when not using a bg list. -- `*_pathway_enrichment_plot.pdf/png` - - Barplots showing the proportion of differentially expressed genes in the pathway. +- `enrichment_plots/*_pathway_enrichment_plot.{pdf/png/svg}` + - Barplots showing the proportion of differentially expressed genes in the pathway for a certain pathway database. +- `gost_pathway_gostplot.{pdf/png/svg}` + - Manhattan plots displaying all enriched pathways. - `KEGG_pathways/` - Contains the KEGG pathways graphs with the log fold change of the differentially expressed genes. - `pathway_heatmaps` From 469724bde42129c728ecd0a2a50e6a22cbc11b97 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 20 Feb 2024 14:22:37 +0100 Subject: [PATCH 09/16] updated test ymls --- tests/test.yml | 32 ++++++++++++++++---------------- tests/test_custom_gmt.yml | 4 ++-- tests/test_full.yml | 22 +++++++++++----------- tests/test_smrnaseq.yml | 20 ++++++++++---------- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/tests/test.yml b/tests/test.yml index 56ff217d..bb988d70 100755 --- a/tests/test.yml +++ b/tests/test.yml @@ -60,35 +60,35 @@ - path: results_test/differential_gene_expression/plots/PCA_plot.pdf - path: results_test/differential_gene_expression/plots/PCA_plot.png - path: results_test/differential_gene_expression/plots/PCA_plot.svg - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_venn_diagram.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_venn_diagram.png - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_venn_diagram.svg - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.svg + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO/pathway_enrichment_results.tsv md5sum: be0f292a205f2ecd453ee27ecdc62615 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_KEGG_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_results.tsv md5sum: f0e6d8117e3ff05ddabc3abb98f514b7 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_REAC_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_results.tsv md5sum: 3d7616fd0f6cb3aaf9f08252b2bcd223 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_REAC_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/KEGG_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/KEGG_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/REAC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/REAC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.DE_contrast_condition_genotype_WT_vs_KO.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.xml - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04610.DE_contrast_condition_genotype_WT_vs_KO.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04610.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04610.xml - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/pathway_enrichment_results.tsv md5sum: 0bd6dfd32bad6f5292f6cde91f019844 - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_REAC_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_results.tsv md5sum: 452ca5dd8d5f190648988502f85d3ef1 - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.pdf - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.png - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.svg - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_REAC_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.pdf - path: results_test/RNAseq_report.html diff --git a/tests/test_custom_gmt.yml b/tests/test_custom_gmt.yml index 589ccf13..6baa345d 100755 --- a/tests/test_custom_gmt.yml +++ b/tests/test_custom_gmt.yml @@ -62,9 +62,9 @@ - path: results_test/differential_gene_expression/plots/PCA_plot.svg - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.pdf - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/pathway_enrichment_results.tsv md5sum: eae154d9c7a526cc8c3fcd1a586fa0ed - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/pathway_enrichment_results.tsv md5sum: bd2cbbf85c3e241743e60b9b8263a31c - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.pdf - path: results_test/RNAseq_report.html diff --git a/tests/test_full.yml b/tests/test_full.yml index c4477cbf..c6aa2bc8 100755 --- a/tests/test_full.yml +++ b/tests/test_full.yml @@ -62,24 +62,24 @@ - path: results_test/differential_gene_expression/plots/PCA_plot.svg - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.pdf - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/pathway_enrichment_results.tsv md5sum: be0f292a205f2ecd453ee27ecdc62615 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_KEGG_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_results.tsv md5sum: f0e6d8117e3ff05ddabc3abb98f514b7 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_REAC_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_results.tsv md5sum: 3d7616fd0f6cb3aaf9f08252b2bcd223 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO_REAC_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.DE_contrast_condition_genotype_WT_vs_KO.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.xml - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/pathway_enrichment_results.tsv md5sum: 0bd6dfd32bad6f5292f6cde91f019844 - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_REAC_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_results.tsv md5sum: 452ca5dd8d5f190648988502f85d3ef1 - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/DE_contrast_condition_treatment_Treated_vs_Control_REAC_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.pdf - path: results_test/RNAseq_report.html diff --git a/tests/test_smrnaseq.yml b/tests/test_smrnaseq.yml index 34ff104b..3b430223 100755 --- a/tests/test_smrnaseq.yml +++ b/tests/test_smrnaseq.yml @@ -72,18 +72,18 @@ - path: results_test/differential_gene_expression/plots/PCA_plot_with_labels.pdf - path: results_test/differential_gene_expression/plots/PCA_plot_with_labels.png - path: results_test/differential_gene_expression/plots/PCA_plot_with_labels.svg - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/DE_contrast_condition_treatment_clone9_vs_clone1_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/DE_contrast_condition_treatment_clone9_vs_clone1_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/DE_contrast_condition_treatment_clone9_vs_clone1_KEGG_pathway_enrichment_plot.svg - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/DE_contrast_condition_treatment_clone9_vs_clone1_KEGG_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/enrichment_plots/KEGG_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/enrichment_plots/KEGG_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/enrichment_plots/KEGG_pathway_enrichment_plot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/KEGG_pathway_enrichment_results.tsv md5sum: 2637f5f6f4e74e7723280449e3ac647b - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/DE_contrast_condition_treatment_clone9_vs_clone1_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/pathway_enrichment_results.tsv md5sum: a091e2ae9a678599d9e994082907d646 - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/DE_contrast_condition_treatment_control_vs_clone1_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/DE_contrast_condition_treatment_control_vs_clone1_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/DE_contrast_condition_treatment_control_vs_clone1_KEGG_pathway_enrichment_plot.svg - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/DE_contrast_condition_treatment_control_vs_clone1_KEGG_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/KEGG_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/KEGG_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/KEGG_pathway_enrichment_plot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/KEGG_pathway_enrichment_results.tsv md5sum: 497cbe026880c9ea78c5591c7c4d07f7 - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/DE_contrast_condition_treatment_control_vs_clone1_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/pathway_enrichment_results.tsv md5sum: 63a2adf7c4a971dc7443503cf968e455 - path: results_test/RNAseq_report.html From 4a472f845d165f2e66fa18d179c9590baac59c9b Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 20 Feb 2024 16:09:10 +0100 Subject: [PATCH 10/16] more yml fixing, pinned validation plugin version --- assets/RNAseq_report.Rmd | 28 ++++++++++++++-------------- nextflow.config | 5 +++++ tests/test.yml | 15 ++++++++------- tests/test_custom_gmt.yml | 8 ++++++-- tests/test_full.yml | 18 +++++++++--------- tests/test_smrnaseq.yml | 14 +++++++------- tests/test_star_salmon.yml | 4 ++-- 7 files changed, 51 insertions(+), 41 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index daed4082..87b7928f 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -169,7 +169,7 @@ isProvided <- function(value) { #this function is used to produce a more informative error message when count table and metadata table disagree write_error_msg <- function(counts, qbicCodes) { error_msg <- "Count table headers do not exactly match the metadata table sample names!\n" - + counts_msg <- "" counts_offending <- "" for (c in names(counts)) { @@ -178,7 +178,7 @@ write_error_msg <- function(counts, qbicCodes) { counts_offending <- paste0(counts_offending, c, "\n") } } - + meta_msg <- "" meta_offending <- "" for (m in qbicCodes) { @@ -399,7 +399,7 @@ if (params$input_type == "smrnaseq") { missing_files <- paste0(substring(missing_files, 1, nchar(missing_files)-2), ".") stop(missing_files, call.=F) } - + # Combine files for later files <- c(hairpin_files, other_files) @@ -1054,7 +1054,7 @@ cat(paste0("*** The raw count table and normalized count tables are available [here](./differential_gene_expression/gene_counts_tables). The differential expression analysis is performed using the raw gene count table. -For PCA analysis and heatmap plotting, the `r norm_method_long_text` normalized gene counts were used. +For PCA analysis and heatmap plotting, the `r norm_method_long_text` normalized gene counts were used. `r norm_method_override_text` `r nsub_genes_text` @@ -1653,7 +1653,7 @@ if (isProvided(params$path_genelist)) { ggsave(filename=paste("differential_gene_expression/plots/boxplots_requested_genes/",requested_genes_plot_gene_name[i],"_",requested_genes_plot_Ensembl[i],".svg",sep=""), width=10, height=5, plot=plot) ggsave(filename=paste("differential_gene_expression/plots/boxplots_requested_genes/",requested_genes_plot_gene_name[i],"_",requested_genes_plot_Ensembl[i],".png",sep=""), width=10, height=5, plot=plot) ggsave(filename=paste("differential_gene_expression/plots/boxplots_requested_genes/",requested_genes_plot_gene_name[i],"_",requested_genes_plot_Ensembl[i],".pdf",sep=""), width=10, height=5, plot=plot) - } + } } ``` @@ -1720,7 +1720,7 @@ if (isProvided(params$path_genelist)) { ggsave(filename=paste0("differential_gene_expression/plots/boxplots_requested_genes/",requested_genes_plot_gene_name[i],"_",requested_genes_plot_Ensembl[i],"_after_batchcorrect.svg"), width=10, height=5, plot=plot) ggsave(filename=paste0("differential_gene_expression/plots/boxplots_requested_genes/",requested_genes_plot_gene_name[i],"_",requested_genes_plot_Ensembl[i],"_after_batchcorrect.png"), width=10, height=5, plot=plot) ggsave(filename=paste0("differential_gene_expression/plots/boxplots_requested_genes/",requested_genes_plot_gene_name[i],"_",requested_genes_plot_Ensembl[i],"_after_batchcorrect.pdf"), width=10, height=5, plot=plot) - } + } } ``` @@ -1912,11 +1912,11 @@ for (file in contrast_files){ custom_bg=custom_background, domain_scope="custom_annotated" ) - + pathway_gostres <- gostres$result pathway_gostres <- as.data.frame(pathway_gostres[which(pathway_gostres$significant==TRUE),]) pathway_gostres <- pathway_gostres[which(pathway_gostres$intersection_size>=min_DEG_pathway),] - + # Also run without bg for Venn diagrams gostres_nobg <- gost(query=q, organism=gost_id, @@ -1982,9 +1982,9 @@ for (file in contrast_files){ no_background=pathway_gostres_nobg$term_name ) pv <- ggvenn::ggvenn(VennInput) - ggsave(paste0("pathway_analysis", "/", fname, "_gost_pathway_venn_diagram.pdf"),pv, device="pdf", width=10, height=15) - ggsave(paste0("pathway_analysis", "/", fname, "_gost_pathway_venn_diagram.png"),pv, device="png", width=10, height=15) - ggsave(paste0("pathway_analysis", "/", fname, "_gost_pathway_venn_diagram.svg"),pv, device="svg", width=10, height=15) + ggsave(paste0("pathway_analysis", "/", fname, "/gost_pathway_venn_diagram.pdf"),pv, device="pdf", width=10, height=15) + ggsave(paste0("pathway_analysis", "/", fname, "/gost_pathway_venn_diagram.png"),pv, device="png", width=10, height=15) + ggsave(paste0("pathway_analysis", "/", fname, "/gost_pathway_venn_diagram.svg"),pv, device="svg", width=10, height=15) } } @@ -2052,7 +2052,7 @@ for (file in contrast_files){ if (!isProvided(params$citest) & nrow(mat)>1){ dir.create(paste("pathway_analysis", fname, "pathway_heatmaps", sep="/")) - # Because the image devices sometimes don't work here, surround them with a tryCatch so that the code continues even if a certain heatmap is not saved + # Because the image devices sometimes don't work here, surround them with a tryCatch so that the code continues even if a certain heatmap is not saved tryCatch( { png(filename = paste0("pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".png"), width = ifelse(nrow(mat)<=20, 200, 125)+ncol(mat)*40, height = 50+nrow(mat)*50) @@ -2241,7 +2241,7 @@ names(q_list) <- q_names if (length(q_list) > 0) { #gost query - + if (isProvided(params$set_background)) { gostres <- gost(query=q_list, organism=gost_id, @@ -2452,7 +2452,7 @@ as.character(params$revision), "` pipeline [^5], which was written using the nf-core template [@ewels2020nf]. For differential expression analysis, the read quantification data resulting from `", quant_tool, "` were processed with the R package `DESeq2 v", packageVersion("DESeq2"), -"` [@love2014differential]. The thresholds for differentially expressed genes were set to ", +"` [@love2014differential]. The thresholds for differentially expressed genes were set to ", pval_text, " for the p-value and ", logFC_text, " for the log2 Fold Change." )) diff --git a/nextflow.config b/nextflow.config index 3838aeba..afce37a5 100755 --- a/nextflow.config +++ b/nextflow.config @@ -6,6 +6,11 @@ ---------------------------------------------------------------------------------------- */ +// Pin nf-validation to prevent errors from new versions +plugins { + id 'nf-validation@1.1.3' +} + // Global default params, used in configs // params marked with //* exist for the sake of completeness only; // enabling them prevents igenomes from working diff --git a/tests/test.yml b/tests/test.yml index bb988d70..c08f7e0a 100755 --- a/tests/test.yml +++ b/tests/test.yml @@ -63,13 +63,14 @@ - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.pdf - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.svg - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO/pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/pathway_enrichment_results.tsv md5sum: be0f292a205f2ecd453ee27ecdc62615 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_results.tsv md5sum: f0e6d8117e3ff05ddabc3abb98f514b7 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_results.tsv md5sum: 3d7616fd0f6cb3aaf9f08252b2bcd223 - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/KEGG_pathway_enrichment_plot.pdf - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/KEGG_pathway_enrichment_plot.png @@ -88,7 +89,7 @@ - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.pdf - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.png - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.svg - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/enrichment_plots/REAC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/enrichment_plots/REAC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.pdf - path: results_test/RNAseq_report.html diff --git a/tests/test_custom_gmt.yml b/tests/test_custom_gmt.yml index 6baa345d..ea161a15 100755 --- a/tests/test_custom_gmt.yml +++ b/tests/test_custom_gmt.yml @@ -60,8 +60,12 @@ - path: results_test/differential_gene_expression/plots/PCA_plot.pdf - path: results_test/differential_gene_expression/plots/PCA_plot.png - path: results_test/differential_gene_expression/plots/PCA_plot.svg - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_venn_diagram.svg - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/pathway_enrichment_results.tsv md5sum: eae154d9c7a526cc8c3fcd1a586fa0ed - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/pathway_enrichment_results.tsv diff --git a/tests/test_full.yml b/tests/test_full.yml index c6aa2bc8..9ec30e7f 100755 --- a/tests/test_full.yml +++ b/tests/test_full.yml @@ -60,18 +60,18 @@ - path: results_test/differential_gene_expression/plots/PCA_plot.pdf - path: results_test/differential_gene_expression/plots/PCA_plot.png - path: results_test/differential_gene_expression/plots/PCA_plot.svg - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO_gost_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/pathway_enrichment_results.tsv - md5sum: be0f292a205f2ecd453ee27ecdc62615 + md5sum: 21b907d52008f66f9a85190400fd211e - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_results.tsv - md5sum: f0e6d8117e3ff05ddabc3abb98f514b7 + md5sum: 92115e662e0e2489ad05d28f3981fa3a - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_results.tsv - md5sum: 3d7616fd0f6cb3aaf9f08252b2bcd223 - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_plot.png + md5sum: 9077c63139668fd01d3f4086e6acb7bc + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/KEGG_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/KEGG_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/REAC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/REAC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.DE_contrast_condition_genotype_WT_vs_KO.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.xml diff --git a/tests/test_smrnaseq.yml b/tests/test_smrnaseq.yml index 3b430223..39676c01 100755 --- a/tests/test_smrnaseq.yml +++ b/tests/test_smrnaseq.yml @@ -76,14 +76,14 @@ - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/enrichment_plots/KEGG_pathway_enrichment_plot.png - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/enrichment_plots/KEGG_pathway_enrichment_plot.svg - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/KEGG_pathway_enrichment_results.tsv - md5sum: 2637f5f6f4e74e7723280449e3ac647b + md5sum: 326f3495ca42dbc527484cef3ee0e58d - path: results_test/pathway_analysis/DE_contrast_condition_treatment_clone9_vs_clone1/pathway_enrichment_results.tsv - md5sum: a091e2ae9a678599d9e994082907d646 - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/KEGG_pathway_enrichment_plot.svg + md5sum: b77e2839aa95ce3a9562d03a13629eb4 + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/enrichment_plots/KEGG_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/enrichment_plots/KEGG_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/enrichment_plots/KEGG_pathway_enrichment_plot.svg - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/KEGG_pathway_enrichment_results.tsv - md5sum: 497cbe026880c9ea78c5591c7c4d07f7 + md5sum: 64b3a3716b779900e99f56688c4b27e8 - path: results_test/pathway_analysis/DE_contrast_condition_treatment_control_vs_clone1/pathway_enrichment_results.tsv - md5sum: 63a2adf7c4a971dc7443503cf968e455 + md5sum: 05e83209e36face6ead8b066155fdbe5 - path: results_test/RNAseq_report.html diff --git a/tests/test_star_salmon.yml b/tests/test_star_salmon.yml index dbe49c9a..f657920b 100755 --- a/tests/test_star_salmon.yml +++ b/tests/test_star_salmon.yml @@ -69,8 +69,8 @@ - path: results_test/differential_gene_expression/plots/PCA_plot.pdf - path: results_test/differential_gene_expression/plots/PCA_plot.png - path: results_test/differential_gene_expression/plots/PCA_plot.svg - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/pathway_enrichment_results.tsv md5sum: cd967cc355045d9dc8c0bb6ffcf40b61 - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/pathway_enrichment_results.tsv md5sum: 68b329da9893e34099c7d8ad5cb9c940 - path: results_test/RNAseq_report.html From 6869d813d32f8cbd4f85a2899c3b087554045f95 Mon Sep 17 00:00:00 2001 From: WackerO Date: Wed, 21 Feb 2024 14:52:07 +0100 Subject: [PATCH 11/16] more yml updates, trying to get rsem to run --- assets/RNAseq_report.Rmd | 32 ++++++++++++++++++++++++++++++++ tests/test.yml | 16 ++++++++-------- tests/test_full.yml | 8 ++++---- tests/test_star_salmon.yml | 4 ++-- 4 files changed, 46 insertions(+), 14 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index 87b7928f..c30ae187 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -529,6 +529,7 @@ DT::datatable(df_QA_neat, options = list(scrollX = "100%", scrollY = "400px", p if (params$input_type %in% c("featurecounts", "smrnaseq")) { cds <- DESeqDataSetFromMatrix( countData =count.table, colData =metadata, design = eval(parse(text=as.character(design[[1]])))) } else if (params$input_type %in% c("rsem", "salmon")) { + write("rsem1", file="/home-link/iivow01/git/rnadeseq/error/status", append=F) ## Create a dataframe which consists of both the gene id and the transcript name gtf <- rtracklayer::import(params$path_gtf) gtf <- as.data.frame(gtf, header=T) @@ -573,6 +574,7 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { coldata <- data.frame(files = files, names= qbicCodes, sampleconditions) coldata$combfactor <- metadata$combfactor rownames(coldata) <- NULL + write("rsem2", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) #Do tximeta, this is necessary to run DESeq on rsem (imports the rsem output #and modifies them as they are not integers and can not directly be used for cds) @@ -585,6 +587,7 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { #dds from SummarizedExperiment , then run DESeq cds <- DESeqDataSet(se, design = as.formula(eval(parse(text=as.character(design[[1]]))))) + write("rsem3", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Load salmon count files } else if (params$input_type == "salmon") { @@ -625,12 +628,16 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { #Apply relevel if provided; this must be done before calling DESeq() if (isProvided(params$path_relevel)) { + write("rsem4", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) + relevel_table <- read.table(params$path_relevel, sep="\t", header = T, colClasses = "character") write.table(relevel_table, file="differential_gene_expression/metadata/relevel.tsv") for (i in c(1:nrow(relevel_table))) { relev <- relevel_table[i,] cds[[paste(relev[1])]] <- relevel(cds[[paste(relev[1])]], paste(relev[2])) } + write("rsem5", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) + } # Run actual DESeq analysis @@ -644,6 +651,8 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { nm <- assays(cds)[["avgTxLength"]] sf <- estimateSizeFactorsForMatrix(counts(cds)/nm) } + write("rsem6", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) + write.table(sf,paste("differential_gene_expression/gene_counts_tables/sizeFactor_libraries.tsv",sep=""), append = FALSE, quote = FALSE, sep = "\t",eol = "\n", na = "NA", dec = ".", row.names = T, col.names = F, qmethod = c("escape", "double")) # Write cds assay table to file @@ -716,6 +725,7 @@ if (run_rlog){ rownames(norm_counts) <- norm_counts$Ensembl_ID } } + write("rsem7", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) ############################## DIAGNOSTICS AND QUALITY CONTROL PLOTS ############################### # Cooks distances: get important for example when checking knock-out and overexpression studies @@ -771,6 +781,7 @@ par(mfrow = c(1, 3)) meanSdPlot(log2(counts(cds,normalized=TRUE)[notAllZero,] + 1),ylab = "sd raw count data") meanSdPlot(assay((if (run_rlog) rld else vsd)[notAllZero,]),ylab = paste("sd", norm_method_text, "transformed count data")) dev.off() + write("rsem8", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Further diagnostics plots res=0 @@ -859,6 +870,8 @@ for (i in resultsNames(cds)[-1]) { dev.off() rm(res,qs,bins,ratios,use,h1,h2,colori) } + write("rsem9", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) + ``` @@ -951,6 +964,8 @@ The read mapping statistics to the reference genome for each sample are shown be # Disable auto-conversion of paths to relative paths as we provide include_graphics() with absolute paths. Also, error=F is necessary in every include_graphic() call to not fail with an error knitr.graphics.rel_path = F knitr::include_graphics(paste0(wd, "/QC/multiqc_plots/svg/mqc_star_alignment_plot_1_pc.svg"), error=F) + write("rsem10", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) + ``` ```{r STAR_readnums,echo=FALSE, message=FALSE, warning=FALSE, results='asis', eval=dir.exists(paste0(wd,"/QC/multiqc_data/"))} @@ -1102,6 +1117,8 @@ if (run_rlog) { } else { vsd_noncorrected <- vsd } + write("rsem11", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) + ``` \ @@ -1315,6 +1332,7 @@ if (isProvided(params$path_contrast_list)) { } } write.table(contrasts, file="differential_gene_expression/metadata/contrast_list.tsv", quote=F) + write("rsem12", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) ## Contrast calculation for contrast list for (i in c(1:nrow(contrasts))) { @@ -1433,6 +1451,7 @@ if (!isProvided(params$path_contrast_matrix) & !isProvided(params$path_contrast_ DE_genes_df = cbind(DE_genes_df,results_DEseq_contrast) } } + write("rsem13", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Write contrast names to file write(contrast_names, file="contrast_names.txt", sep="\t") @@ -1559,6 +1578,7 @@ DE_all$logpval[DE_all$logpval > 16] <- 17 DE_all <- na.omit(DE_all) log2FoldChange_min <- min(DE_all$log2FoldChange) log2FoldChange_max <- max(DE_all$log2FoldChange) + write("rsem14", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # get quotient of log2FoldChange range and 10 to determine if xticks of plot need to be scaled discretely (otherwise, for large FC ranges, there will be too many xticks and they will overlap) log2FoldChange_quotient <- length(seq(log2FoldChange_min, log2FoldChange_max, 10)) @@ -1691,6 +1711,7 @@ for (i in nrow(random_DE_genes_plot)) { ggsave(filename=paste0("differential_gene_expression/plots/boxplots_example_genes/",genename,"_",ensid,"_after_batchcorrect.png"), width=10, height=5, plot=plot) ggsave(filename=paste0("differential_gene_expression/plots/boxplots_example_genes/",genename,"_",ensid,"_after_batchcorrect.pdf"), width=10, height=5, plot=plot) } + write("rsem15", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # make boxplots of interesting genes in gene list if (isProvided(params$path_genelist)) { @@ -1780,6 +1801,7 @@ if (isProvided(params$datasources)) { } else { datasources <- c() } + write("rsem16", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Default to 1 for the nb of genes DE in a pathway min_DEG_pathway <- as.integer(params$min_DEG_pathway) @@ -1851,6 +1873,7 @@ if (isProvided(params$custom_gmt)){ } ) } +write("rsem17", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # If GMT exist(s), create metadata folder and move GMT(s) there @@ -1861,6 +1884,7 @@ if (mv_status) { system(paste("cp", params$custom_gmt, "pathway_analysis/metadata/")) } } + write("rsem17.1", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Set datasources to NULL instead of c() to ensure that the gost queries work if (!isProvided(params$datasources)) { @@ -1879,6 +1903,7 @@ theme_set(theme_classic()) # ---------------------- # For each contrast do pathway analysis + write("rsem17.2", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) for (file in contrast_files){ @@ -1890,6 +1915,7 @@ for (file in contrast_files){ dir.create(paste("pathway_analysis", fname, "enrichment_plots", sep="/")) DE_genes <- read.csv(file = paste0(path_contrasts, file), sep="\t", header = T) DE_genes <- as.data.frame(DE_genes) + write("rsem17.3", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Skip pathway analysis for the contrast if not 2 or more DE genes were found if (nrow(DE_genes) < 2){ @@ -1899,6 +1925,7 @@ for (file in contrast_files){ # Define list of Ensemble IDs (q) to run the pathway analysis q = as.character(DE_genes$Ensembl_ID) + write("rsem17.4", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # gost query if (isProvided(params$set_background)) { @@ -1916,6 +1943,7 @@ for (file in contrast_files){ pathway_gostres <- gostres$result pathway_gostres <- as.data.frame(pathway_gostres[which(pathway_gostres$significant==TRUE),]) pathway_gostres <- pathway_gostres[which(pathway_gostres$intersection_size>=min_DEG_pathway),] + write("rsem17.5", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Also run without bg for Venn diagrams gostres_nobg <- gost(query=q, @@ -1930,6 +1958,7 @@ for (file in contrast_files){ pathway_gostres_nobg <- gostres_nobg$result pathway_gostres_nobg <- as.data.frame(pathway_gostres_nobg[which(pathway_gostres_nobg$significant==TRUE),]) pathway_gostres_nobg <- pathway_gostres_nobg[which(pathway_gostres_nobg$intersection_size>=min_DEG_pathway),] + write("rsem17.6", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) } else { gostres <- gost(query=q, @@ -1943,6 +1972,7 @@ for (file in contrast_files){ ) } + write("rsem18", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Make data frame of gost result pathway_gostres <- gostres$result @@ -2160,6 +2190,7 @@ if (isProvided(params$path_genelist)){ mat$gene_name <- NULL mat$Ensembl_ID <- NULL mat <- data.matrix(mat) + write("rsem19", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) if (nrow(mat)>1){ png(filename = paste0("pathway_analysis", "/", genelist_heatmaps_dir, "/", "Heatmap_normalized_counts_gene_list.png"), width = 100+ncol(mat)*50, height = 50+nrow(mat)*100) @@ -2383,6 +2414,7 @@ cat("No software versions file was provided for primary analysis.") ``` ```{r software_versions_RNASeq, echo=FALSE, results='asis', eval=isProvided(params$path_software_versions)} + write("rsem20", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # In the following part, I use newlines (in code) where possible whenever the paste0 function switches from a string to a variable call to better distinguish between the two so it is clearer in which lines quotes are needed and in which not --> Cannot always use newlines as this sometimes translates into the report.html diff --git a/tests/test.yml b/tests/test.yml index c08f7e0a..585f4a04 100755 --- a/tests/test.yml +++ b/tests/test.yml @@ -67,11 +67,11 @@ - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/gost_pathway_gostplot.svg - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/pathway_enrichment_results.tsv - md5sum: be0f292a205f2ecd453ee27ecdc62615 + md5sum: 21b907d52008f66f9a85190400fd211e - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathway_enrichment_results.tsv - md5sum: f0e6d8117e3ff05ddabc3abb98f514b7 + md5sum: 92115e662e0e2489ad05d28f3981fa3a - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/REAC_pathway_enrichment_results.tsv - md5sum: 3d7616fd0f6cb3aaf9f08252b2bcd223 + md5sum: 9077c63139668fd01d3f4086e6acb7bc - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/KEGG_pathway_enrichment_plot.pdf - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/KEGG_pathway_enrichment_plot.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/enrichment_plots/REAC_pathway_enrichment_plot.pdf @@ -83,12 +83,12 @@ - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04610.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04610.xml - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/pathway_enrichment_results.tsv - md5sum: 0bd6dfd32bad6f5292f6cde91f019844 + md5sum: bdc0167b8b33a0da44e34768eead8376 - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_results.tsv - md5sum: 452ca5dd8d5f190648988502f85d3ef1 - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.png - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control_gost_pathway_venn_diagram.svg + md5sum: 6594fdb8c0eb591fa131982a8be00877 + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/gost_pathway_venn_diagram.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/gost_pathway_venn_diagram.png + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/gost_pathway_venn_diagram.svg - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/enrichment_plots/REAC_pathway_enrichment_plot.pdf - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/enrichment_plots/REAC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.pdf diff --git a/tests/test_full.yml b/tests/test_full.yml index 9ec30e7f..beed5c7d 100755 --- a/tests/test_full.yml +++ b/tests/test_full.yml @@ -76,10 +76,10 @@ - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.png - path: results_test/pathway_analysis/DE_contrast_condition_genotype_WT_vs_KO/KEGG_pathways/mmu04360.xml - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/pathway_enrichment_results.tsv - md5sum: 0bd6dfd32bad6f5292f6cde91f019844 + md5sum: bdc0167b8b33a0da44e34768eead8376 - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_results.tsv - md5sum: 452ca5dd8d5f190648988502f85d3ef1 - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/REAC_pathway_enrichment_plot.png + md5sum: 6594fdb8c0eb591fa131982a8be00877 + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/enrichment_plots/REAC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_treatment_Treated_vs_Control/enrichment_plots/REAC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.pdf - path: results_test/RNAseq_report.html diff --git a/tests/test_star_salmon.yml b/tests/test_star_salmon.yml index f657920b..9d693acb 100755 --- a/tests/test_star_salmon.yml +++ b/tests/test_star_salmon.yml @@ -70,7 +70,7 @@ - path: results_test/differential_gene_expression/plots/PCA_plot.png - path: results_test/differential_gene_expression/plots/PCA_plot.svg - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/pathway_enrichment_results.tsv - md5sum: cd967cc355045d9dc8c0bb6ffcf40b61 + md5sum: 30af65ef53ef7e389e116c31d31bd1d6 - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/pathway_enrichment_results.tsv - md5sum: 68b329da9893e34099c7d8ad5cb9c940 + md5sum: 4a3e61c2b4fea94c327acc63c83c0a4a - path: results_test/RNAseq_report.html From 9655686c56d3056abf7a81b4c6f81d26b6f48fca Mon Sep 17 00:00:00 2001 From: WackerO Date: Thu, 22 Feb 2024 09:22:24 +0100 Subject: [PATCH 12/16] Fixed a bug with finally dev.off; restricted rsem pathway analysis to GO:CC to speed it up --- assets/RNAseq_report.Rmd | 13 ++++--------- conf/test_star_rsem.config | 1 + 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index c30ae187..a6920e4f 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -2087,38 +2087,33 @@ for (file in contrast_files){ { png(filename = paste0("pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".png"), width = ifelse(nrow(mat)<=20, 200, 125)+ncol(mat)*40, height = 50+nrow(mat)*50) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) + dev.off() }, error=function(e) { print(paste0("Could not save pathway_analysis", "/",fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".png because of the following error:\n", e)) - }, - finally={ - dev.off() } ) tryCatch( { pdf(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".pdf"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) + dev.off() }, error=function(e) { print(paste0("Could not save pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".pdf because of the following error:\n", e)) - }, - finally={ - dev.off() } ) tryCatch( { svg(paste0("pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".svg"), width = ifelse(nrow(mat)<=20, 50, 10)+ncol(mat)*0.1, height = 5+nrow(mat)*0.005) pheatmap(mat = mat, annotation_col = metadata_save, main = paste("Heatmap of normalized expression values for genes in pathway ", pathway$short_name, "(",pathway$source,")",sep=" "), scale = "row", cluster_cols = F, cluster_rows = T) + dev.off() }, error=function(e) { print(paste0("Could not save pathway_analysis", "/", fname, "/", "pathway_heatmaps", "/", "Heatmap_normalized_counts_", pathway$source, "_", make.names(pathway$term_id), ".svg because of the following error:\n", e)) - }, - finally={ - dev.off() } ) + graphics.off() # Close all still open devices from errors. Tried doing this in finally, but that doesn't work } # Plotting pathway view only for kegg pathways diff --git a/conf/test_star_rsem.config b/conf/test_star_rsem.config index 03c11cd5..5e633e22 100755 --- a/conf/test_star_rsem.config +++ b/conf/test_star_rsem.config @@ -27,6 +27,7 @@ params { input_type = 'rsem' run_pathway_analysis = true genome = 'GRCh37' + datasources = 'GO:CC' // species_library = "org.Hs.eg.db" // organism = "hsapiens" // keytype = "ENSEMBL" From cf4a195e162d9311a9df8a34f8cf22105ded6ba3 Mon Sep 17 00:00:00 2001 From: WackerO Date: Thu, 22 Feb 2024 10:50:51 +0100 Subject: [PATCH 13/16] removed local writes --- assets/RNAseq_report.Rmd | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index a6920e4f..ae01a018 100755 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -529,7 +529,7 @@ DT::datatable(df_QA_neat, options = list(scrollX = "100%", scrollY = "400px", p if (params$input_type %in% c("featurecounts", "smrnaseq")) { cds <- DESeqDataSetFromMatrix( countData =count.table, colData =metadata, design = eval(parse(text=as.character(design[[1]])))) } else if (params$input_type %in% c("rsem", "salmon")) { - write("rsem1", file="/home-link/iivow01/git/rnadeseq/error/status", append=F) + ## Create a dataframe which consists of both the gene id and the transcript name gtf <- rtracklayer::import(params$path_gtf) gtf <- as.data.frame(gtf, header=T) @@ -574,7 +574,6 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { coldata <- data.frame(files = files, names= qbicCodes, sampleconditions) coldata$combfactor <- metadata$combfactor rownames(coldata) <- NULL - write("rsem2", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) #Do tximeta, this is necessary to run DESeq on rsem (imports the rsem output #and modifies them as they are not integers and can not directly be used for cds) @@ -587,7 +586,6 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { #dds from SummarizedExperiment , then run DESeq cds <- DESeqDataSet(se, design = as.formula(eval(parse(text=as.character(design[[1]]))))) - write("rsem3", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Load salmon count files } else if (params$input_type == "salmon") { @@ -628,16 +626,12 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { #Apply relevel if provided; this must be done before calling DESeq() if (isProvided(params$path_relevel)) { - write("rsem4", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) - relevel_table <- read.table(params$path_relevel, sep="\t", header = T, colClasses = "character") write.table(relevel_table, file="differential_gene_expression/metadata/relevel.tsv") for (i in c(1:nrow(relevel_table))) { relev <- relevel_table[i,] cds[[paste(relev[1])]] <- relevel(cds[[paste(relev[1])]], paste(relev[2])) } - write("rsem5", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) - } # Run actual DESeq analysis @@ -651,7 +645,6 @@ if (params$input_type %in% c("featurecounts", "smrnaseq")) { nm <- assays(cds)[["avgTxLength"]] sf <- estimateSizeFactorsForMatrix(counts(cds)/nm) } - write("rsem6", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) write.table(sf,paste("differential_gene_expression/gene_counts_tables/sizeFactor_libraries.tsv",sep=""), append = FALSE, quote = FALSE, sep = "\t",eol = "\n", na = "NA", dec = ".", row.names = T, col.names = F, qmethod = c("escape", "double")) @@ -725,7 +718,6 @@ if (run_rlog){ rownames(norm_counts) <- norm_counts$Ensembl_ID } } - write("rsem7", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) ############################## DIAGNOSTICS AND QUALITY CONTROL PLOTS ############################### # Cooks distances: get important for example when checking knock-out and overexpression studies @@ -781,7 +773,6 @@ par(mfrow = c(1, 3)) meanSdPlot(log2(counts(cds,normalized=TRUE)[notAllZero,] + 1),ylab = "sd raw count data") meanSdPlot(assay((if (run_rlog) rld else vsd)[notAllZero,]),ylab = paste("sd", norm_method_text, "transformed count data")) dev.off() - write("rsem8", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Further diagnostics plots res=0 @@ -870,8 +861,6 @@ for (i in resultsNames(cds)[-1]) { dev.off() rm(res,qs,bins,ratios,use,h1,h2,colori) } - write("rsem9", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) - ``` @@ -964,8 +953,6 @@ The read mapping statistics to the reference genome for each sample are shown be # Disable auto-conversion of paths to relative paths as we provide include_graphics() with absolute paths. Also, error=F is necessary in every include_graphic() call to not fail with an error knitr.graphics.rel_path = F knitr::include_graphics(paste0(wd, "/QC/multiqc_plots/svg/mqc_star_alignment_plot_1_pc.svg"), error=F) - write("rsem10", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) - ``` ```{r STAR_readnums,echo=FALSE, message=FALSE, warning=FALSE, results='asis', eval=dir.exists(paste0(wd,"/QC/multiqc_data/"))} @@ -1117,8 +1104,6 @@ if (run_rlog) { } else { vsd_noncorrected <- vsd } - write("rsem11", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) - ``` \ @@ -1332,7 +1317,6 @@ if (isProvided(params$path_contrast_list)) { } } write.table(contrasts, file="differential_gene_expression/metadata/contrast_list.tsv", quote=F) - write("rsem12", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) ## Contrast calculation for contrast list for (i in c(1:nrow(contrasts))) { @@ -1451,7 +1435,6 @@ if (!isProvided(params$path_contrast_matrix) & !isProvided(params$path_contrast_ DE_genes_df = cbind(DE_genes_df,results_DEseq_contrast) } } - write("rsem13", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Write contrast names to file write(contrast_names, file="contrast_names.txt", sep="\t") @@ -1578,7 +1561,6 @@ DE_all$logpval[DE_all$logpval > 16] <- 17 DE_all <- na.omit(DE_all) log2FoldChange_min <- min(DE_all$log2FoldChange) log2FoldChange_max <- max(DE_all$log2FoldChange) - write("rsem14", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # get quotient of log2FoldChange range and 10 to determine if xticks of plot need to be scaled discretely (otherwise, for large FC ranges, there will be too many xticks and they will overlap) log2FoldChange_quotient <- length(seq(log2FoldChange_min, log2FoldChange_max, 10)) @@ -1711,7 +1693,6 @@ for (i in nrow(random_DE_genes_plot)) { ggsave(filename=paste0("differential_gene_expression/plots/boxplots_example_genes/",genename,"_",ensid,"_after_batchcorrect.png"), width=10, height=5, plot=plot) ggsave(filename=paste0("differential_gene_expression/plots/boxplots_example_genes/",genename,"_",ensid,"_after_batchcorrect.pdf"), width=10, height=5, plot=plot) } - write("rsem15", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # make boxplots of interesting genes in gene list if (isProvided(params$path_genelist)) { @@ -1801,7 +1782,6 @@ if (isProvided(params$datasources)) { } else { datasources <- c() } - write("rsem16", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Default to 1 for the nb of genes DE in a pathway min_DEG_pathway <- as.integer(params$min_DEG_pathway) @@ -1873,7 +1853,6 @@ if (isProvided(params$custom_gmt)){ } ) } -write("rsem17", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # If GMT exist(s), create metadata folder and move GMT(s) there @@ -1884,7 +1863,6 @@ if (mv_status) { system(paste("cp", params$custom_gmt, "pathway_analysis/metadata/")) } } - write("rsem17.1", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Set datasources to NULL instead of c() to ensure that the gost queries work if (!isProvided(params$datasources)) { @@ -1903,7 +1881,6 @@ theme_set(theme_classic()) # ---------------------- # For each contrast do pathway analysis - write("rsem17.2", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) for (file in contrast_files){ @@ -1915,7 +1892,6 @@ for (file in contrast_files){ dir.create(paste("pathway_analysis", fname, "enrichment_plots", sep="/")) DE_genes <- read.csv(file = paste0(path_contrasts, file), sep="\t", header = T) DE_genes <- as.data.frame(DE_genes) - write("rsem17.3", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Skip pathway analysis for the contrast if not 2 or more DE genes were found if (nrow(DE_genes) < 2){ @@ -1925,7 +1901,6 @@ for (file in contrast_files){ # Define list of Ensemble IDs (q) to run the pathway analysis q = as.character(DE_genes$Ensembl_ID) - write("rsem17.4", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # gost query if (isProvided(params$set_background)) { @@ -1943,7 +1918,6 @@ for (file in contrast_files){ pathway_gostres <- gostres$result pathway_gostres <- as.data.frame(pathway_gostres[which(pathway_gostres$significant==TRUE),]) pathway_gostres <- pathway_gostres[which(pathway_gostres$intersection_size>=min_DEG_pathway),] - write("rsem17.5", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # Also run without bg for Venn diagrams gostres_nobg <- gost(query=q, @@ -1958,7 +1932,6 @@ for (file in contrast_files){ pathway_gostres_nobg <- gostres_nobg$result pathway_gostres_nobg <- as.data.frame(pathway_gostres_nobg[which(pathway_gostres_nobg$significant==TRUE),]) pathway_gostres_nobg <- pathway_gostres_nobg[which(pathway_gostres_nobg$intersection_size>=min_DEG_pathway),] - write("rsem17.6", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) } else { gostres <- gost(query=q, @@ -1972,8 +1945,6 @@ for (file in contrast_files){ ) } - write("rsem18", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) - # Make data frame of gost result pathway_gostres <- gostres$result @@ -2185,7 +2156,6 @@ if (isProvided(params$path_genelist)){ mat$gene_name <- NULL mat$Ensembl_ID <- NULL mat <- data.matrix(mat) - write("rsem19", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) if (nrow(mat)>1){ png(filename = paste0("pathway_analysis", "/", genelist_heatmaps_dir, "/", "Heatmap_normalized_counts_gene_list.png"), width = 100+ncol(mat)*50, height = 50+nrow(mat)*100) @@ -2409,7 +2379,6 @@ cat("No software versions file was provided for primary analysis.") ``` ```{r software_versions_RNASeq, echo=FALSE, results='asis', eval=isProvided(params$path_software_versions)} - write("rsem20", file="/home-link/iivow01/git/rnadeseq/error/status", append=T) # In the following part, I use newlines (in code) where possible whenever the paste0 function switches from a string to a variable call to better distinguish between the two so it is clearer in which lines quotes are needed and in which not --> Cannot always use newlines as this sometimes translates into the report.html From 8df1b3186d7763319e4be31958b1cfcb9ed494fb Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 27 Feb 2024 14:10:27 +0100 Subject: [PATCH 14/16] Fixed rsem test --- tests/test_star_rsem.yml | 70 ++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/tests/test_star_rsem.yml b/tests/test_star_rsem.yml index c9cbdd49..6566048b 100755 --- a/tests/test_star_rsem.yml +++ b/tests/test_star_rsem.yml @@ -75,38 +75,44 @@ - path: results_test/differential_gene_expression/plots/PCA_plot.pdf - path: results_test/differential_gene_expression/plots/PCA_plot.png - path: results_test/differential_gene_expression/plots/PCA_plot.svg - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_REAC_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_REAC_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_REAC_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/gost_pathway_gostplot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/gost_pathway_gostplot.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/gost_pathway_gostplot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/gost_pathway_venn_diagram.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/gost_pathway_venn_diagram.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/gost_pathway_venn_diagram.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/pathway_enrichment_results.tsv md5sum: b1c0a1374c963fff71083a9cdefe8e9b - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/GO.CC_pathway_enrichment_results.tsv + md5sum: 2bbbf2de30f9da36e4c5b2df7a4ef5e7 + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/gost_pathway_gostplot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/gost_pathway_gostplot.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/gost_pathway_gostplot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/gost_pathway_venn_diagram.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/gost_pathway_venn_diagram.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/gost_pathway_venn_diagram.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/pathway_enrichment_results.tsv md5sum: 631e89b4de9042936fa2652bde036e7d - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_pathway_enrichment_results.tsv + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/GO.CC_pathway_enrichment_results.tsv + md5sum: 48a7c37c08b19fe71cfee34ae7c3fd8b + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/gost_pathway_gostplot.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/gost_pathway_gostplot.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/gost_pathway_gostplot.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/gost_pathway_venn_diagram.pdf + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/gost_pathway_venn_diagram.png + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/gost_pathway_venn_diagram.svg + - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/pathway_enrichment_results.tsv md5sum: 80123c4ba2c97eaa0217816f41122855 - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_KEGG_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_KEGG_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/DE_contrast_condition_cellline_H1_vs_GM12878_REAC_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_REAC_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_REAC_pathway_enrichment_plot.pdf - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/DE_contrast_condition_cellline_MCF7_vs_GM12878_REAC_pathway_enrichment_plot.png - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_KEGG_pathway_enrichment_results.tsv - md5sum: 276e871c81e85217bbd7eef951676084 - - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/DE_contrast_condition_cellline_K562_vs_GM12878_REAC_pathway_enrichment_results.tsv - md5sum: 9e6847fe5d631f09305dfa00dd3472d1 - - path: results_test/RNAseq_report.html + - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.pdf + - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.png + - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.svg + - path: results_test/pathway_analysis/metadata/gprofiler_full_hsapiens.ENSG.gmt From db3111ccebdfc8434881728051b5021f5ff2f785 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 27 Feb 2024 15:08:01 +0100 Subject: [PATCH 15/16] md5sum update --- tests/test_star_rsem.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_star_rsem.yml b/tests/test_star_rsem.yml index 6566048b..d0d4b11c 100755 --- a/tests/test_star_rsem.yml +++ b/tests/test_star_rsem.yml @@ -85,7 +85,7 @@ - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/gost_pathway_venn_diagram.png - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/gost_pathway_venn_diagram.svg - path: results_test/pathway_analysis/DE_contrast_condition_cellline_H1_vs_GM12878/pathway_enrichment_results.tsv - md5sum: b1c0a1374c963fff71083a9cdefe8e9b + md5sum: 9eef4eab3da88b4b7e465f982be72acb - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/GO.CC_pathway_enrichment_results.tsv md5sum: 2bbbf2de30f9da36e4c5b2df7a4ef5e7 - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.pdf @@ -98,9 +98,9 @@ - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/gost_pathway_venn_diagram.png - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/gost_pathway_venn_diagram.svg - path: results_test/pathway_analysis/DE_contrast_condition_cellline_K562_vs_GM12878/pathway_enrichment_results.tsv - md5sum: 631e89b4de9042936fa2652bde036e7d + md5sum: cbda28eeba947c53847ea28fdaa0cebd - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/GO.CC_pathway_enrichment_results.tsv - md5sum: 48a7c37c08b19fe71cfee34ae7c3fd8b + md5sum: 6b79ce64567f94ad3fc492e1a56fce58 - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.pdf - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.png - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/enrichment_plots/GO.CC_pathway_enrichment_plot.svg @@ -111,8 +111,7 @@ - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/gost_pathway_venn_diagram.png - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/gost_pathway_venn_diagram.svg - path: results_test/pathway_analysis/DE_contrast_condition_cellline_MCF7_vs_GM12878/pathway_enrichment_results.tsv - md5sum: 80123c4ba2c97eaa0217816f41122855 + md5sum: 68f919b58d7fe5cc1b9a38665abccf78 - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.pdf - - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.png - path: results_test/pathway_analysis/heatmap_gene_list/Heatmap_normalized_counts_gene_list.svg - path: results_test/pathway_analysis/metadata/gprofiler_full_hsapiens.ENSG.gmt From 69855ac7d082403d0719b2359e273710eff060d6 Mon Sep 17 00:00:00 2001 From: WackerO Date: Thu, 29 Feb 2024 11:12:18 +0100 Subject: [PATCH 16/16] changed versions to dev --- .github/workflows/ci.yml | 8 ++++---- Dockerfile | 6 +++--- environment.yml | 2 +- modules/local/report.nf | 2 +- nextflow.config | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e40f2eb6..ae4653ab 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,14 +40,14 @@ jobs: environment.yml - name: Build new docker image if: env.MATCHED_FILES - run: docker build --no-cache . -t ghcr.io/qbic-pipelines/rnadeseq:2.2 + run: docker build --no-cache . -t ghcr.io/qbic-pipelines/rnadeseq:2.3dev # Change the version above and the third version below before/after release - name: Pull docker image if: ${{ !env.MATCHED_FILES }} run: | docker pull ghcr.io/qbic-pipelines/rnadeseq:dev - docker tag ghcr.io/qbic-pipelines/rnadeseq:dev ghcr.io/qbic-pipelines/rnadeseq:2.2 + docker tag ghcr.io/qbic-pipelines/rnadeseq:dev ghcr.io/qbic-pipelines/rnadeseq:2.3dev - name: Install Nextflow uses: nf-core/setup-nextflow@v1 @@ -94,14 +94,14 @@ jobs: environment.yml - name: Build new docker image if: env.MATCHED_FILES - run: docker build --no-cache . -t ghcr.io/qbic-pipelines/rnadeseq:2.2 + run: docker build --no-cache . -t ghcr.io/qbic-pipelines/rnadeseq:2.3dev # Change the version above and the third version below before/after release - name: Pull docker image if: ${{ !env.MATCHED_FILES }} run: | docker pull ghcr.io/qbic-pipelines/rnadeseq:dev - docker tag ghcr.io/qbic-pipelines/rnadeseq:dev ghcr.io/qbic-pipelines/rnadeseq:2.2 + docker tag ghcr.io/qbic-pipelines/rnadeseq:dev ghcr.io/qbic-pipelines/rnadeseq:2.3dev - name: Install Nextflow uses: nf-core/setup-nextflow@v1 diff --git a/Dockerfile b/Dockerfile index c13267b3..1a3b6a0f 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,14 @@ LABEL org.opencontainers.image.authors="Gisela Gabernet, Alexander Peltzer, Oska LABEL org.opencontainers.image.licenses=MIT COPY environment.yml / #RUN conda install -c conda-forge mamba -RUN mamba env create --file /environment.yml -p /opt/conda/envs/qbic-pipelines-rnadeseq-2.2 && \ +RUN mamba env create --file /environment.yml -p /opt/conda/envs/qbic-pipelines-rnadeseq-2.3dev && \ mamba clean --all --yes RUN apt-get update -qq && \ apt-get install -y zip procps ghostscript # Add conda installation dir to PATH -ENV PATH /opt/conda/envs/qbic-pipelines-rnadeseq-2.2/bin:$PATH +ENV PATH /opt/conda/envs/qbic-pipelines-rnadeseq-2.3dev/bin:$PATH # Dump the details of the installed packates to a file for posterity -RUN mamba env export --name qbic-pipelines-rnadeseq-2.2 > qbic-pipelines-rnadeseq-2.2.yml +RUN mamba env export --name qbic-pipelines-rnadeseq-2.3dev > qbic-pipelines-rnadeseq-2.3dev.yml # Instruct R processes to use these empty files instead of clashing with a local config RUN touch .Rprofile RUN touch .Renviron diff --git a/environment.yml b/environment.yml index cf3dc64d..a9447dcb 100755 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ # You can use this file to create a conda environment for this pipeline: # conda env create -f environment.yml # use this to find packages: https://anaconda.org/ -name: qbic-pipelines-rnadeseq-2.2 +name: qbic-pipelines-rnadeseq-2.3dev channels: - bioconda - conda-forge diff --git a/modules/local/report.nf b/modules/local/report.nf index 4c5c9782..bc145c70 100755 --- a/modules/local/report.nf +++ b/modules/local/report.nf @@ -1,6 +1,6 @@ process REPORT { - container 'ghcr.io/qbic-pipelines/rnadeseq:2.2' + container 'ghcr.io/qbic-pipelines/rnadeseq:2.3dev' input: path gene_counts diff --git a/nextflow.config b/nextflow.config index afce37a5..7397f9c5 100755 --- a/nextflow.config +++ b/nextflow.config @@ -258,7 +258,7 @@ manifest { description = """Differential gene expression analysis and pathway analysis of RNAseq data""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '2.2' + version = '2.3dev' doi = '' }