library(DT)
library(utils)
library(knitr)
library(htmltools)
library(plotly)
library(dplyr)


knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)

knitr::knit_hooks$set(wrap = function(before, options, envir){
  if (before){
    paste0('<', options$wrap, ' align="center">')
  } else {
    paste0('</', options$wrap, '>')
  }
})
metadata <- qs::qread(params$metadata_path)

fc_threshold <- as.numeric(attr(metadata, "report_params")["fc_threshold"]) 

pval_cutoff <- as.numeric(attr(metadata, "report_params")["pval_cutoff"])

total_de <- metadata %>%
  filter(padj <= pval_cutoff, abs(logFC) >= log2(fc_threshold)) %>%
  pull(gene) %>%
  length()

r if(total_de == 0){sprintf("No gene found to be differentially expressed at a fold-change threshold of %g and an adjusted p-value (padj) cut-off of %g", fc_threshold, pval_cutoff)}



scFlow vr utils::packageVersion("scFlow") -- r Sys.time()



combiz/scFlow documentation built on Feb. 25, 2024, 10:25 a.m.