Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## SINCLAIR development version

- Set main job memory to 2 GB for slurm mode. (#205, @kelly-sovacool)
- Improvements to R Markdown reports: (#216, @kelly-sovacool)
- Link to function documentation websites.
- Use code folding to include code in output, but set it to 'hide' by default.
- Hide R messages by default.

## SINCLAIR 0.3.5

Expand Down
23 changes: 16 additions & 7 deletions bin/batch_correction_cca.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: "Batch Correction: CCA"
author: "Samantha Sevilla"
author: "CCR Collaborative Bioinformatics Resource"
date: "`r Sys.Date()`"
output: html_document
output:
html_document:
toc: true
code_folding: hide
downlit_highlight: true
editor_options:
chunk_output_type: console
params:
Expand All @@ -17,9 +21,14 @@ params:
scRNA_functions: "/data/CCBR_Pipeliner/Pipelines/SINCLAIR/dev/bin/scRNA_functions.R"
testing: "Y"
---
```{r, setup, include=FALSE}
knitr::opts_chunk$set(
message = FALSE,
echo = TRUE
)
```


```{r, prep_args, message=FALSE}
```{r, prep_args}
# set up params
species <- params$species
gid <- params$gid
Expand All @@ -38,7 +47,7 @@ testing <- params$testing
scRNA_functions <- params$scRNA_functions
```

```{r, handle_pkg, message=FALSE}
```{r, handle_pkg}
# source functions
source(scRNA_functions)

Expand All @@ -62,7 +71,7 @@ scRNA_handle_packages(pkg_df)
options(future.globals.maxSize = 96000 * 1024^2)
```

```{r, processing, message=FALSE}
```{r, processing}
# read in merged object
so <- readRDS(mergedObj)

Expand All @@ -78,7 +87,7 @@ so_corrected <- MAIN_BATCH_CORRECTION(so, npcs, species, resolution,
)
```

```{r saveoutputs, message=FALSE, include=FALSE, echo=FALSE}
```{r saveoutputs include=FALSE}
fpath <- paste0(gid, "_batch_correction_cca.rds")
saveRDS(so_corrected, fpath)
```
23 changes: 16 additions & 7 deletions bin/batch_correction_harmony.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: "Batch Correction: Harmony"
author: "Samantha Sevilla"
author: "CCR Collaborative Bioinformatics Resource"
date: "`r Sys.Date()`"
output: html_document
output:
html_document:
toc: true
code_folding: hide
downlit_highlight: true
editor_options:
chunk_output_type: console
params:
Expand All @@ -17,8 +21,13 @@ params:
scRNA_functions: "/data/CCBR_Pipeliner/Pipelines/SINCLAIR/dev/bin/scRNA_functions.R"
testing: "Y"
---

```{r, prep_args, message=FALSE, echo=FALSE, include=FALSE}
```{r, setup, include=FALSE}
knitr::opts_chunk$set(
message = FALSE,
echo = TRUE
)
```
```{r, prep_args, include=FALSE}
# set up params
species <- params$species
gid <- params$gid
Expand All @@ -36,7 +45,7 @@ Rpkg_config <- params$Rpkg_config
scRNA_functions <- params$scRNA_functions
```

```{r, handle_pkg, message=FALSE}
```{r, handle_pkg}
# source functions
source(scRNA_functions)

Expand All @@ -60,7 +69,7 @@ scRNA_handle_packages(pkg_df)
options(future.globals.maxSize = 96000 * 1024^2)
```

```{r, processing, message=FALSE}
```{r, processing}
# read in merged object
so <- readRDS(mergedObj)

Expand All @@ -76,7 +85,7 @@ so_corrected <- MAIN_BATCH_CORRECTION(so, npcs, species, resolution,
)
```

```{r saveoutputs, message=FALSE, include=FALSE, echo=FALSE}
```{r saveoutputs include=FALSE}
fpath <- paste0(gid, "_batch_correction_harmony.rds")
saveRDS(so_corrected, fpath)
```
51 changes: 30 additions & 21 deletions bin/batch_correction_integration.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: "Batch Correction Analysis"
author: "CCBR"
date: '`r format(Sys.time(), "%a %b %d %Y - %X")`'
output: html_document
author: "CCR Collaborative Bioinformatics Resource"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
code_folding: hide
downlit_highlight: true
editor_options:
chunk_output_type: console
always_allow_html: true
Expand All @@ -23,8 +27,13 @@ params:
scRNA_functions: "/data/CCBR_Pipeliner/Pipelines/SINCLAIR/dev/bin/scRNA_functions.R"
testing: "Y"
---

```{r, prep_args, message=FALSE, echo=FALSE, include=FALSE}
```{r, setup, include=FALSE}
knitr::opts_chunk$set(
message = FALSE,
echo = TRUE
)
```
```{r, prep_args, include=FALSE}
# set up params
# species= params$species
gid <- params$gid
Expand All @@ -51,7 +60,7 @@ unlink(tmp_images, recursive = TRUE)
dir.create(file.path("tmp_images"), showWarnings = FALSE)
```

```{r, handle_pkg, message=FALSE, echo=FALSE, include=FALSE}
```{r, handle_pkg include=FALSE}
# source functions
source(scRNA_functions)

Expand All @@ -71,7 +80,7 @@ pkg_df
scRNA_handle_packages(pkg_df)
```

```{r, processing, message=FALSE, echo=FALSE, include=FALSE}
```{r, processing include=FALSE}
# read in merged objects
so_merged <- readRDS(mergedObj)
so_rpca <- readRDS(rpcaObj)
Expand All @@ -89,7 +98,7 @@ objList <- c("merged", "rpca", "integrated", "harmony", "liger")

### Samples

```{r sampleBatchCorrection, echo=FALSE, fig.width=15, fig.height=15}
```{r sampleBatchCorrection, fig.width=15, fig.height=15}
# plot
plot_list_s <- list()

Expand Down Expand Up @@ -123,7 +132,7 @@ annotate_figure(p,

### Groups

```{r groupBatchCorrection, echo=FALSE, fig.width=15, fig.height=15}
```{r groupBatchCorrection, fig.width=15, fig.height=15}
plot_list_g <- list()
for (i in 1:length(objList)) {
obj <- OBJECT_SELECT(objList[i])
Expand All @@ -150,7 +159,7 @@ annotate_figure(p,

### Cell type annotations

```{r annotationBatchCorrection, echo=FALSE, fig.width=15, fig.height=15}
```{r annotationBatchCorrection, fig.width=15, fig.height=15}
plot_list_annot <- list()
for (i in 1:length(objList)) {
obj <- OBJECT_SELECT(objList[i])
Expand Down Expand Up @@ -187,7 +196,7 @@ DT::datatable(

### RPCA

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "rpca"
files <- list.files(
path = tmp_images,
Expand All @@ -203,7 +212,7 @@ if (length(files) > 0) {

### ccaIntegrated

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "int"
files <- list.files(
path = tmp_images,
Expand All @@ -219,7 +228,7 @@ if (length(files) > 0) {

### Harmony

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "harmony"
files <- list.files(
path = tmp_images,
Expand All @@ -237,7 +246,7 @@ if (length(files) > 0) {

### scvi

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "scvi"
files <- list.files(
path = tmp_images,
Expand All @@ -255,7 +264,7 @@ if (length(files) > 0) {

### liger

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "liger"
files <- list.files(
path = tmp_images,
Expand All @@ -271,7 +280,7 @@ if (length(files) > 0) {

## Silhouette scores {.tabset}

```{r silhouetteImages, message=FALSE, echo=FALSE, include=FALSE}
```{r silhouetteImages, , include=FALSE}
# create matrix
resSil_merged <- matrix(ncol = 2, nrow = length(resolution))
resSil_merged[] <- 0
Expand Down Expand Up @@ -412,7 +421,7 @@ for (i in 1:length(objList)) {

### RPCA

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "rpca"
files <- list.files(
path = tmp_images,
Expand All @@ -428,7 +437,7 @@ if (length(files) > 0) {

### ccaIntegrated

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "int"
files <- list.files(
path = tmp_images,
Expand All @@ -444,7 +453,7 @@ if (length(files) > 0) {

### Harmony

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "harmony"
files <- list.files(
path = tmp_images,
Expand All @@ -462,7 +471,7 @@ if (length(files) > 0) {

### scvi

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "scvi"
files <- list.files(
path = tmp_images,
Expand All @@ -480,7 +489,7 @@ if (length(files) > 0) {

### liger

```{r, echo=FALSE,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
```{r,out.width="49%", out.height="20%",fig.show='hold',fig.align='center'}
method <- "liger"
files <- list.files(
path = tmp_images,
Expand Down
23 changes: 16 additions & 7 deletions bin/batch_correction_liger.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: 'Batch Correction: LIGER'
author: "Samantha Sevilla"
author: "CCR Collaborative Bioinformatics Resource"
date: "`r Sys.Date()`"
output: html_document
output:
html_document:
toc: true
code_folding: hide
downlit_highlight: true
editor_options:
chunk_output_type: console
params:
Expand All @@ -17,9 +21,14 @@ params:
scRNA_functions: "/data/CCBR_Pipeliner/Pipelines/SINCLAIR/dev/bin/scRNA_functions.R"
testing: "Y"
---
```{r, setup, include=FALSE}
knitr::opts_chunk$set(
message = FALSE,
echo = TRUE
)
```


```{r, prep_args, message=FALSE}
```{r, prep_args}
# set up params
species <- params$species
gid <- params$gid
Expand All @@ -38,7 +47,7 @@ testing <- params$testing
scRNA_functions <- params$scRNA_functions
```

```{r, handle_pkg, message=FALSE}
```{r, handle_pkg}
# source functions
source(scRNA_functions)

Expand All @@ -62,7 +71,7 @@ scRNA_handle_packages(pkg_df)
options(future.globals.maxSize = 96000 * 1024^2)
```

```{r, processing, message=FALSE}
```{r, processing}
# read in merged object
so <- readRDS(mergedObj)

Expand All @@ -78,7 +87,7 @@ so_corrected <- MAIN_BATCH_CORRECTION(so, npcs, species, resolution,
)
```

```{r saveoutputs, message=FALSE, include=FALSE, echo=FALSE}
```{r saveoutputs include=FALSE}
fpath <- paste0(gid, "_batch_correction_liger.rds")
saveRDS(so_corrected, fpath)
```
Loading
Loading