From 7623c08121f03addeeef5dd387f30ad62f0748ea Mon Sep 17 00:00:00 2001 From: Sameet Mehta Date: Fri, 29 Sep 2023 12:42:55 -0400 Subject: [PATCH 1/3] fixed the abstraction issue introduced in devel --- R/qmd_template_parts.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/qmd_template_parts.R b/R/qmd_template_parts.R index 2ca5b00..9728e7e 100644 --- a/R/qmd_template_parts.R +++ b/R/qmd_template_parts.R @@ -3,7 +3,6 @@ #' @param title Title for the report #' @param author Author for the report #' @param email Email of the author for the report -#' @param ... Other parameters to set the yaml header #' #' @return opening_yaml string to be used to construct the report qmd #' @export @@ -15,7 +14,13 @@ template_yaml <- function(title = "RNA-Seq Report", author = "Sameet", email = "sameet.mehta@yale.edu", - ...) { + count_fn = "gene_count_matrix.csv", + meta_fn = "sample-sheet.txt", + contrast_fn = "contrasts.txt", + metrics = NULL, + outputdir = "rnaseq_report_outputs", + thresh = 0.05 + ) { opening_yaml <- stringr::str_glue(" --- title: \"{title}\" @@ -41,7 +46,7 @@ params: contrasts_fn: null metrics: null outputs: \"{outputdir}\" - use_threshold: 0.05 + use_threshold: {thresh} --- ") opening_yaml From 0c509650fe965850f9a22f641a9d4dc4ec458d52 Mon Sep 17 00:00:00 2001 From: Sameet Mehta Date: Fri, 29 Sep 2023 12:47:43 -0400 Subject: [PATCH 2/3] Fixed a typo. --- R/qmd_template_parts.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/qmd_template_parts.R b/R/qmd_template_parts.R index 9728e7e..3aab201 100644 --- a/R/qmd_template_parts.R +++ b/R/qmd_template_parts.R @@ -15,7 +15,7 @@ template_yaml <- function(title = "RNA-Seq Report", author = "Sameet", email = "sameet.mehta@yale.edu", count_fn = "gene_count_matrix.csv", - meta_fn = "sample-sheet.txt", + sample_fn = "sample-sheet.txt", contrast_fn = "contrasts.txt", metrics = NULL, outputdir = "rnaseq_report_outputs", From 487207a3b9a3efc3d375455fccf4bf9f6f3e6f19 Mon Sep 17 00:00:00 2001 From: Sameet Mehta Date: Fri, 29 Sep 2023 12:57:39 -0400 Subject: [PATCH 3/3] Fixed a typo, and make sure the output directory is created. --- R/qmd_template_parts.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/qmd_template_parts.R b/R/qmd_template_parts.R index 3aab201..91ffe00 100644 --- a/R/qmd_template_parts.R +++ b/R/qmd_template_parts.R @@ -79,6 +79,7 @@ We will import packages and functions. library(quartoReport) # use_thresh <- 0.05 # global threshold to use as alpha in the analysis +if(!dir.exists(params$outputs)) dir.create(params$outputs) ``` Please note that this package is currently under active development. @@ -392,16 +393,16 @@ This is a deconstructed Venn Diagram that is much more interpretable. Upset plot for the data in this analysis is given in @fig_upset ```{{r}} -#| label: fig_upset +#| label: fig-upset #| fig-cap: UpSet plot with with significant genes seen across all the comparisons. upset_df <- make_upset_df(dds = dds, meta_df = meta_df, contrasts_df = contrasts_df, thresh = params$use_threshold) upset_plot <- make_upset_plot(upset_df) ofn_upset <- file.path(params$outputs, \"upset-plot.pdf\") -ggplot2::ggsave(filname = ofn_upset, device = \"pdf\", plot = upset_plot) +ggplot2::ggsave(filename = ofn_upset, device = \"pdf\", plot = upset_plot) upset_plot ``` -In @fig_upset the number in the bars denotes number of genes satisfying that condition. +In @fig-upset the number in the bars denotes number of genes satisfying that condition. ") }