library(plotly)
library(DT)
library(dplyr)
library(utils)

knitr::opts_chunk$set(echo = FALSE)

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

Overview


Sample metadata

A total of r length(metadata$metadata) metadata variables were imported from the sample sheet for this sample: -

classes <- as.character(lapply(metadata$metadata, class))
metadata_table <- data.frame(
  metadata = names(metadata$metadata), 
  class = paste0("<i>", classes, "</i>"), 
  values = t(metadata$metadata)[,1]
)
datatable(metadata_table, rownames = FALSE, options = list(pageLength = 5, scrollX=F, columnDefs = list(list(className = 'dt-left', targets = "_all"))), escape = FALSE )

Empty droplet identification

r if(metadata$scflow_steps$emptydrops_annotated != 1){"EmptyDrops was not run on this dataset."}


Count depth distribution by barcode rank (high to low counts)

knitr::opts_chunk$set(echo = FALSE)
metadata$qc_plots$count_depth_distribution

Number of counts / features per cellular barcode

r if(metadata$qc_params$max_library_size_method == "adaptive"){sprintf("The maximum number of counts per cell threshold was determined adaptively for this sample as >=%s median average deviations (MADs), or %s total counts per cell.", metadata$qc_params$nmads, metadata$qc_params$max_library_size)} r if(metadata$qc_params$max_features_method == "adaptive"){sprintf("The maximum number of features per cell threshold was determined adaptively for this sample as >=%s median average deviations (MADs), or %s total features per cell.", metadata$qc_params$nmads, metadata$qc_params$max_features)}

knitr::opts_chunk$set(echo = FALSE)
metadata$qc_plots$count_depth_histogram
#ggplotly(metadata$qc_plots$count_depth_histogram)
wzxhzdk:7

Number of genes versus count depth

knitr::opts_chunk$set(echo = FALSE)
metadata$qc_plots$number_genes_vs_count_depth

Fraction of mitochondrial / ribosomal counts

r if(metadata$qc_params$max_mito_method == "adaptive"){sprintf("The maximum fraction of mitochondrial counts per cell threshold was determined adaptively for this sample as >=%s median average deviations (MADs), or %s total counts per cell.", metadata$qc_params$nmads, metadata$qc_params$max_mito)}

knitr::opts_chunk$set(echo = FALSE)
#ggplotly(metadata$qc_plots$mito_fraction_histogram)
metadata$qc_plots$mito_fraction_histogram
wzxhzdk:10

Doublet/multiplet identification

r if(metadata$scflow_steps$singlets_annotated != 1){"No doublet/multiplet identification algorithm was run on this dataset."}


Full QC parameters and results

datatable(t(metadata$qc_summary), colnames = "")

References

{r, results='asis', eval = (!is.null(metadata$citations))} knitr::opts_chunk$set(echo = FALSE) cat(apply(metadata$citations, 1, .print_citation_html))


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



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