Skip to content

Commit

Permalink
Minor changes to seurat report
Browse files Browse the repository at this point in the history
  • Loading branch information
irzamsarfraz committed Feb 1, 2023
1 parent 53ddefa commit 585c3f5
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 43 deletions.
32 changes: 16 additions & 16 deletions R/htmlReports.R
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ reportFindMarker <- function(inSCE, output_file = NULL, output_dir = NULL) {
#' each figure in the report. Default is \code{FALSE}.
#' @param forceRun A logical value indicating if all computations previously
#' computed should be re-calculated regardless if these computations are
#' available in the input object. Default is \code{FALSE}.
#' available in the input object. Default is \code{TRUE}.
#'
#' @return A \code{\link[SingleCellExperiment]{SingleCellExperiment}} object
#' with computations stored.
Expand All @@ -318,7 +318,7 @@ reportSeuratRun <- function(inSCE,
authors = NULL,
showSession = FALSE,
pdf = FALSE,
forceRun = FALSE){
forceRun = TRUE){

if(is.null(biological.group)){
stop("Must specify atleast one biological.group that is present in the colData of input object.")
Expand Down Expand Up @@ -431,7 +431,7 @@ reportSeuratRun <- function(inSCE,
#' each figure in the report. Default is \code{FALSE}.
#' @param forceRun A logical value indicating if all computations previously
#' computed should be re-calculated regardless if these computations are
#' available in the input object. Default is \code{FALSE}.
#' available in the input object. Default is \code{TRUE}.
#'
#' @return A \code{\link[SingleCellExperiment]{SingleCellExperiment}} object
#' with computations stored.
Expand All @@ -454,7 +454,7 @@ reportSeuratResults <- function(inSCE,
authors = NULL,
showSession = FALSE,
pdf = FALSE,
forceRun = FALSE){
forceRun = TRUE){

if(is.null(biological.group)){
stop("Must specify atleast one biological.group that is present in the colData of input object.")
Expand Down Expand Up @@ -544,7 +544,7 @@ reportSeuratResults <- function(inSCE,
#' each figure in the report. Default is \code{FALSE}.
#' @param forceRun A logical value indicating if all computations previously
#' computed should be re-calculated regardless if these computations are
#' available in the input object. Default is \code{FALSE}.
#' available in the input object. Default is \code{TRUE}.
#'
#' @return A \code{\link[SingleCellExperiment]{SingleCellExperiment}} object
#' with computations stored.
Expand All @@ -561,7 +561,7 @@ reportSeuratDimRed <- function(inSCE,
authors = NULL,
showSession = FALSE,
pdf = FALSE,
forceRun = FALSE){
forceRun = TRUE){

if(is.null(outputPath)){
outputPath <- getwd()
Expand Down Expand Up @@ -621,7 +621,7 @@ reportSeuratDimRed <- function(inSCE,
#' each figure in the report. Default is \code{FALSE}.
#' @param forceRun A logical value indicating if all computations previously
#' computed should be re-calculated regardless if these computations are
#' available in the input object. Default is \code{FALSE}.
#' available in the input object. Default is \code{TRUE}.
#'
#' @return A \code{\link[SingleCellExperiment]{SingleCellExperiment}} object
#' with computations stored.
Expand All @@ -633,7 +633,7 @@ reportSeuratNormalization <- function(inSCE,
authors = NULL,
showSession = FALSE,
pdf = FALSE,
forceRun = FALSE){
forceRun = TRUE){

if(is.null(outputPath)){
outputPath <- getwd()
Expand Down Expand Up @@ -693,7 +693,7 @@ reportSeuratNormalization <- function(inSCE,
#' each figure in the report. Default is \code{FALSE}.
#' @param forceRun A logical value indicating if all computations previously
#' computed should be re-calculated regardless if these computations are
#' available in the input object. Default is \code{FALSE}.
#' available in the input object. Default is \code{TRUE}.
#'
#' @return A \code{\link[SingleCellExperiment]{SingleCellExperiment}} object
#' with computations stored.
Expand All @@ -708,7 +708,7 @@ reportSeuratFeatureSelection <- function(inSCE,
authors = NULL,
showSession = FALSE,
pdf = FALSE,
forceRun = FALSE){
forceRun = TRUE){
if(is.null(outputPath)){
outputPath <- getwd()
message("No output directory defined, using current working directory ", outputPath, " instead.")
Expand Down Expand Up @@ -763,7 +763,7 @@ reportSeuratFeatureSelection <- function(inSCE,
#' each figure in the report. Default is \code{FALSE}.
#' @param forceRun A logical value indicating if all computations previously
#' computed should be re-calculated regardless if these computations are
#' available in the input object. Default is \code{FALSE}.
#' available in the input object. Default is \code{TRUE}.
#'
#' @return A \code{\link[SingleCellExperiment]{SingleCellExperiment}} object
#' with computations stored.
Expand All @@ -775,7 +775,7 @@ reportSeuratScaling <- function(inSCE,
authors = NULL,
showSession = FALSE,
pdf = FALSE,
forceRun = FALSE){
forceRun = TRUE){

if(is.null(outputPath)){
outputPath <- getwd()
Expand Down Expand Up @@ -848,7 +848,7 @@ reportSeuratScaling <- function(inSCE,
#' each figure in the report. Default is \code{FALSE}.
#' @param forceRun A logical value indicating if all computations previously
#' computed should be re-calculated regardless if these computations are
#' available in the input object. Default is \code{FALSE}.
#' available in the input object. Default is \code{TRUE}.
#'
#' @return A \code{\link[SingleCellExperiment]{SingleCellExperiment}} object
#' with computations stored.
Expand All @@ -869,7 +869,7 @@ reportSeuratClustering <- function(inSCE,
authors = NULL,
showSession = FALSE,
pdf = FALSE,
forceRun = FALSE){
forceRun = TRUE){

if(is.null(biological.group)){
stop("Must specify atleast one biological.group that is present in the colData of input object.")
Expand Down Expand Up @@ -1090,7 +1090,7 @@ reportSeuratMarkerSelection <- function(inSCE,
#' to visualize in each group. Default \code{10}.
#' @param forceRun A logical value indicating if all algorithms should be
#' re-run regardless if they have been computed previously in the input object.
#' Default is \code{FALSE}.
#' Default is \code{TRUE}.
#'
#' @return A \code{\link[SingleCellExperiment]{SingleCellExperiment}} object
#' with computations stored.
Expand Down Expand Up @@ -1123,7 +1123,7 @@ reportSeurat <- function(
runMSClusters = TRUE,
runMSBioGroup = TRUE,
numTopFeatures = 10,
forceRun = FALSE){
forceRun = TRUE){

if(is.null(biological.group)){
stop("Must specify atleast one biological.group that is present in the colData of input object.")
Expand Down
4 changes: 2 additions & 2 deletions inst/rmarkdown/seurat/reportSeurat.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ sampleNames <- unique(colData(data)[[biological.group]])

```{r, echo=FALSE, results='asis', warning=FALSE, message=FALSE}
showSession <- FALSE
seuratRun <- knitr::knit_child('reportSeuratRun.Rmd', quiet = TRUE, envir = environment())
seuratRun <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratRun.Rmd", package = "singleCellTK"), quiet = TRUE, envir = environment())
```

<!-- Seurat Results -->

```{r, echo=FALSE, results='asis', warning=FALSE, message=FALSE}
showSession <- FALSE
seuratResults <- knitr::knit_child('reportSeuratResults.Rmd', quiet = TRUE, envir = environment())
seuratResults <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratResults.Rmd", package = "singleCellTK"), quiet = TRUE, envir = environment())
```

# Summary {-}
Expand Down
8 changes: 4 additions & 4 deletions inst/rmarkdown/seurat/reportSeuratResults.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ maxResolution <- clustering.resolution
numClusters <- 10 #remove this later
showClusterDesc <- FALSE
resClustering <- knitr::knit_child('reportSeuratClustering.Rmd', quiet = TRUE, envir = environment())
resClustering <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratClustering.Rmd", package = "singleCellTK"), quiet = TRUE, envir = environment())
```

```{r, echo=FALSE, results='asis', warning=FALSE, message=FALSE}
Expand All @@ -88,7 +88,7 @@ selectedOption <- paste0("Seurat_louvain_Resolution", clustering.resolution)
groupTitle <- "Clusters"
titleMarkerPlots <- "Gene Plots of Top Markers by Clusters"
headingMS <- "##"
resMSC <- knitr::knit_child('reportSeuratMarkerSelection.Rmd', quiet = TRUE, envir = environment())
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, ])
```

Expand All @@ -101,7 +101,7 @@ selectedOption <- biological.group
groupTitle <- biological.group
titleMarkerPlots <- paste0("Gene Plots of Top Markers by Group: ", biological.group)
headingMS <- "##"
resMSB <- knitr::knit_child('reportSeuratMarkerSelection.Rmd', quiet = TRUE)
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, ])
```

Expand All @@ -116,7 +116,7 @@ titleMarkerPlots <- "Plot Selected Features"
numTopFeatures <- length(selected.markers)
headingMS <- "#"
resPSM <- knitr::knit_child('reportSeuratMarkerSelection.Rmd', quiet = TRUE)
resPSM <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratMarkerSelection.Rmd", package = "singleCellTK"), quiet = TRUE)
```

```{r, echo=FALSE, results='asis', warning=FALSE, message=FALSE, eval=!is.null(selected.markers)}
Expand Down
10 changes: 5 additions & 5 deletions inst/rmarkdown/seurat/reportSeuratRun.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ numSamples <- length(sampleNames)
<!-- Normalization -->
```{r, echo=FALSE, results='asis', message=FALSE}
headingNorm <- "##"
resNormalization <- knitr::knit_child('reportSeuratNormalizeData.Rmd', quiet = TRUE, envir = environment())
resNormalization <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratNormalizeData.Rmd", package = "singleCellTK"), quiet = TRUE, envir = environment())
```

<!-- Feature Selection -->
```{r, echo=FALSE, results='asis'}
headingFS <- "##"
resFeatureSelection <- knitr::knit_child('reportSeuratFeatureSelection.Rmd', quiet = TRUE)
resFeatureSelection <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratFeatureSelection.Rmd", package = "singleCellTK"), quiet = TRUE)
```

<!-- Scale Data -->
```{r, echo=FALSE, results='asis', warning=FALSE, message=FALSE}
headingSD <- "##"
resScaleData <- knitr::knit_child('reportSeuratScaleData.Rmd', quiet = TRUE)
resScaleData <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratScaleData.Rmd", package = "singleCellTK"), quiet = TRUE)
```

<!-- Dimensionality Reduction -->
Expand All @@ -106,7 +106,7 @@ headingDR <- "##"
headingDR2 <- "###"
significant_PC <- 10
resDimRed <- knitr::knit_child('reportSeuratDimRed.Rmd', quiet = TRUE, envir = environment())
resDimRed <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratDimRed.Rmd", package = "singleCellTK"), quiet = TRUE, envir = environment())
```

<!-- Clustering -->
Expand All @@ -115,7 +115,7 @@ numClusters <- 10 # this should be computed by the code itself (do later)
showClusterDesc <- TRUE
headingClust <- "##"
resClustering <- knitr::knit_child('reportSeuratClustering.Rmd', quiet = TRUE, envir = environment())
resClustering <- knitr::knit_child(system.file("rmarkdown/seurat", "reportSeuratClustering.Rmd", package = "singleCellTK"), quiet = TRUE, envir = environment())
```

# Seurat Run
Expand Down
4 changes: 2 additions & 2 deletions man/reportSeurat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reportSeuratClustering.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reportSeuratDimRed.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reportSeuratFeatureSelection.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reportSeuratNormalization.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reportSeuratResults.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reportSeuratRun.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reportSeuratScaling.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 585c3f5

Please sign in to comment.