forked from WangLab-ComputationalBiology/btc-sc-notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotebook_quality_table_report.Rmd
83 lines (64 loc) · 1.6 KB
/
notebook_quality_table_report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
title: "Module - Rendering quality report"
author: "BTC Pipeline"
date: "`r Sys.time()`"
output:
html_document:
toc: TRUE
toc_float: TRUE
toc_depth: 4
code_folding: show
theme: united
self_contained: TRUE
params:
project_name: 'Test'
input_metrics_report: './data/Test_metrics_report.csv'
n_threads: 8
n_memory: 16
workdir: !r here::here()
timestamp: !r Sys.Date()
auto_save: TRUE
---
# Project Name: `r params$project_name`
```{r setup, message = FALSE, warning = FALSE, echo = TRUE}
# Project parameters
project_name <- params$project_name
input_metrics_report <- strsplit(
params$input_metrics_report, split = ';')[[1]]
# Dataflow/Computational parameters
n_threads <- params$n_threads
n_memory <- params$n_memory
# Output parameters
work_directory <- params$workdir
timestamp <- params$timestamp
auto_save <- params$auto_save
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(
root.dir = work_directory,
error = TRUE
)
```
## Loading library
```{r library, message = FALSE, warning = FALSE, echo = TRUE}
library(readr)
library(dplyr)
library(ggplot2)
library(DT)
```
## Report interactive table
```{r merging_report, message = FALSE, warning = FALSE, echo = TRUE}
metric_report_db <- data.frame()
for (sample_metric in input_metrics_report) {
metric_report_tmp <- read_csv(file = sample_metric)
metric_report_db <- rbind(
metric_report_db,
metric_report_tmp
)
}
datatable(metric_report_db,
class = 'cell-border stripe',
rownames = FALSE,
filter = 'top',
width = '100%',
options = list(scrollX = TRUE))
```