if(!exists("significant_PC")) significant_PC <- pc.count
library(Seurat)
library(dplyr)
library(cowplot)
library(RColorBrewer)
library(ggplot2)
library(knitr)
library(kableExtra)
library(SingleCellExperiment)
library(scater)
library(gridExtra)
library(grid)
library(ggpubr)
library(patchwork)
library(singleCellTK)

Seurat Results

Selected Resolution {.tabset .tabset-fade}

A final resolution of r clustering.resolution was selected for downstream clustering that better reflects the input data.

minResolution <- clustering.resolution
maxResolution <- clustering.resolution
numClusters <- 10 #remove this later
showClusterDesc <- FALSE

resClustering <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratClustering.Rmd", package = "singleCellTK"), quiet = TRUE, envir = environment())
cat(resClustering, sep = '\n')
runMarkerSelection <- TRUE
plotMarkerSelection <- TRUE
numClusters <- length(unique(colData(data)[[paste0("Seurat_louvain_Resolution", clustering.resolution)]]))
selectedOption <- paste0("Seurat_louvain_Resolution", clustering.resolution)
groupTitle <- "Clusters"
titleMarkerPlots <- "Gene Plots of Top Markers by Clusters"
headingMS <- "##"
resMSC <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratMarkerSelection.Rmd", package = "singleCellTK"), quiet = TRUE, envir = environment())
numMarkerGenesCluster <- nrow(data.markers[data.markers$p_val_adj < 0.05, ])
runMarkerSelection <- TRUE
plotMarkerSelection <- TRUE
numClusters <- length(unique(colData(data)[[biological.group]]))
selectedOption <- biological.group
groupTitle <- biological.group
titleMarkerPlots <- paste0("Gene Plots of Top Markers by Group: ", biological.group)
headingMS <- "##"
resMSB <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratMarkerSelection.Rmd", package = "singleCellTK"), quiet = TRUE)
numMarkerGenesBio <- nrow(data.markers[data.markers$p_val_adj < 0.05, ])
runMarkerSelection <- FALSE
plotMarkerSelection <- TRUE
groupTitle <- NULL
numClusters <- 1
selectedOption <- paste0("Seurat_louvain_Resolution", clustering.resolution)
titleMarkerPlots <- "Plot Selected Features"
numTopFeatures <- length(selected.markers)
headingMS <- "#"

resPSM <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratMarkerSelection.Rmd", package = "singleCellTK"), quiet = TRUE)
cat(resPSM, sep = '\n')
cat(resMSC, sep = '\n')
cat(resMSB, sep = '\n')
cat("# Session Information\n\n")
sessionInfo()


compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.