This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ReporteR.scRNAseq/inst/template.Rmd
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
113 lines (93 sloc)
6.54 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{r scRNAseq-infrastructural-setup, include = FALSE} | |
options(knitr.duplicate.label = "allow") | |
options(xtable.comment = FALSE) | |
libs <- c( | |
"magrittr", | |
"ReporteR.base", | |
"ReporteR.scRNAseq" | |
) | |
for (lib in libs) { | |
library(lib, character.only = TRUE, quietly = TRUE) | |
} | |
unlockBinding(sym = "params", env = environment()) | |
params %<>% | |
ReporteR.base::flag_persistent() | |
lockBinding(sym = "params", env = environment()) | |
managed_objects$paths$differential_expression_results_dir <- file.path(getwd(), "differential_expression_results") | |
if(!dir.exists(managed_objects$paths$differential_expression_results_dir)) | |
{ | |
dir.create(managed_objects$paths$differential_expression_results_dir, showWarnings = FALSE) | |
} | |
``` | |
```{r scRNAseq-intro, echo = FALSE, child = system.file('content/01-intro.Rmd', package = 'ReporteR.scRNAseq', mustWork = TRUE), R.options = params, eval = ifelse(exists('params'), 'intro' %in% names(params[['scRNAseq']]), FALSE)} | |
``` | |
```{r scRNAseq-quality-control, echo = FALSE, include = FALSE, R.options = params, eval = ifelse(exists('params'), 'quality_control' %in% names(params[['scRNAseq']]), FALSE)} | |
rmd_path <- system.file(file.path('content', '02-quality-control.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE) | |
md_path = ReporteR.base::make_md_path(rmd_path) | |
knitr::knit(rmd_path, output = md_path) | |
``` | |
```{r scRNAseq-quality-control-include, echo = FALSE, results = "asis", eval = assertive.files::is_readable_file(ReporteR.base::make_md_path(system.file(file.path('content', '02-quality-control.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)))} | |
ReporteR.base::make_md_path(system.file(file.path('content', '02-quality-control.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)) %>% | |
readLines() %>% | |
cat(sep = '\n') | |
``` | |
```{r scRNAseq-normalization, echo = FALSE, include=FALSE, R.options = params, eval = ifelse(exists('params'), 'normalization' %in% names(params[['scRNAseq']]), FALSE)} | |
rmd_path <- system.file(file.path('content', '03-normalization.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE) | |
md_path = ReporteR.base::make_md_path(rmd_path) | |
knitr::knit(rmd_path, output = md_path) | |
``` | |
```{r scRNAseq-normalization-include, echo = FALSE, results = "asis", eval = assertive.files::is_readable_file(ReporteR.base::make_md_path(system.file(file.path('content', '03-normalization.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)))} | |
ReporteR.base::make_md_path(system.file(file.path('content', '03-normalization.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)) %>% | |
readLines() %>% | |
cat(sep = '\n') | |
``` | |
```{r scRNAseq-feature-selection, echo = FALSE, include = FALSE, R.options = params, eval = ifelse(exists('params'), 'feature_selection' %in% names(params[['scRNAseq']]), FALSE)} | |
rmd_path <- system.file(file.path('content', '04-feature-selection.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE) | |
md_path = ReporteR.base::make_md_path(rmd_path) | |
knitr::knit(rmd_path, output = md_path) | |
``` | |
```{r scRNAseq-feature-selection-include, echo = FALSE, results = "asis", eval = assertive.files::is_readable_file(ReporteR.base::make_md_path(system.file(file.path('content', '04-feature-selection.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)))} | |
ReporteR.base::make_md_path(system.file(file.path('content', '04-feature-selection.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)) %>% | |
readLines() %>% | |
cat(sep = '\n') | |
``` | |
```{r scRNAseq-dimension-reduction, echo = FALSE, include = FALSE, R.options = params, eval = ifelse(exists('params'), 'dimension_reduction' %in% names(params[['scRNAseq']]), FALSE)} | |
rmd_path <- system.file(file.path('content', '05-dimension-reduction.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE) | |
md_path = ReporteR.base::make_md_path(rmd_path) | |
knitr::knit(rmd_path, output = md_path) | |
``` | |
```{r scRNAseq-dimension-reduction-include, echo = FALSE, results = "asis", eval = assertive.files::is_readable_file(ReporteR.base::make_md_path(system.file(file.path('content', '05-dimension-reduction.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)))} | |
ReporteR.base::make_md_path(system.file(file.path('content', '05-dimension-reduction.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)) %>% | |
readLines() %>% | |
cat(sep = '\n') | |
``` | |
```{r scRNAseq-clustering, echo = FALSE, include = FALSE, R.options = params, eval = ifelse(exists('params'), 'clustering' %in% names(params[['scRNAseq']]), FALSE)} | |
rmd_path <- system.file(file.path('content', '06-clustering.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE) | |
md_path = ReporteR.base::make_md_path(rmd_path) | |
knitr::knit(rmd_path, output = md_path) | |
``` | |
```{r scRNAseq-clustering-include, echo = FALSE, results = "asis", eval = assertive.files::is_readable_file(ReporteR.base::make_md_path(system.file(file.path('content', '06-clustering.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)))} | |
ReporteR.base::make_md_path(system.file(file.path('content', '06-clustering.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)) %>% | |
readLines() %>% | |
cat(sep = '\n') | |
``` | |
```{r scRNAseq-markers, echo = FALSE, include = FALSE, R.options = params, eval = ifelse(exists('params'), 'marker_genes' %in% names(params[['scRNAseq']]), FALSE)} | |
rmd_path <- system.file(file.path('content', '07-marker.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE) | |
md_path = ReporteR.base::make_md_path(rmd_path) | |
knitr::knit(rmd_path, output = md_path) | |
``` | |
```{r scRNAseq-markers-include, echo = FALSE, results = "asis", eval = assertive.files::is_readable_file(ReporteR.base::make_md_path(system.file(file.path('content', '07-marker.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)))} | |
ReporteR.base::make_md_path(system.file(file.path('content', '07-marker.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)) %>% | |
readLines() %>% | |
cat(sep = '\n') | |
``` | |
```{r scRNAseq-differential-expression, echo = FALSE, include = FALSE, R.options = params, eval = ifelse(exists('params'), 'differential_expression' %in% names(params[['scRNAseq']]), FALSE)} | |
rmd_path <- system.file(file.path('content', '08-differential-expression.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE) | |
md_path = ReporteR.base::make_md_path(rmd_path) | |
knitr::knit(rmd_path, output = md_path) | |
``` | |
```{r scRNAseq-differential-expression-include, echo = FALSE, results = "asis", eval = assertive.files::is_readable_file(ReporteR.base::make_md_path(system.file(file.path('content', '08-differential-expression.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)))} | |
ReporteR.base::make_md_path(system.file(file.path('content', '08-differential-expression.Rmd'), package = 'ReporteR.scRNAseq', mustWork = TRUE)) %>% | |
readLines() %>% | |
cat(sep = '\n') | |
``` | |