-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.rmd
119 lines (90 loc) · 3.55 KB
/
README.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
title: "README"
author: "Rasmus Kirkegaard"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output: github_document
always_allow_html: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
options(scipen = 10)
```
```{r echo=FALSE,warning=FALSE,message=FALSE}
library(readxl)
library(kableExtra)
library(tidyverse)
d<-read_xlsx("data_links.xlsx")
```
<img align="right" src="images/microbench.jpg" width="200">
# MicroBench
Overview of our data for microbial genomic benchmarking. We have sequenced a bunch of mono cultures, and metagenomic samples.
Monocultures:
```{r echo=FALSE,message=FALSE,results='asis'}
list_samples <- function(df) {
# Assuming 'Sample' column contains the monoculture names
samples <- unique(df$Sample)
for (sample in samples) {
sample_formatted<-sample %>% gsub(pattern=" ",replacement="-") %>% tolower()
cat(paste0(" * [",sample,"](#",sample_formatted,")"),"\n")
}
}
list_samples(d %>% filter(SampleType=="monoculture"))
```
Mock Metagenomes:
```{r echo=FALSE,message=FALSE,results='asis'}
list_samples(d %>% filter(SampleType=="mock"))
```
"Real" metagenomes:
```{r echo=FALSE,message=FALSE,results='asis'}
list_samples(d %>% filter(SampleType=="metagenome"))
```
## To do:
* Sequence all standards
* Get AAU to support public links or upload data to NCBI/ENA
## Mono cultures
```{r echo=FALSE,message=FALSE,results='asis'}
generate_monoculture_report <- function(df) {
# Assuming 'Sample' column contains the monoculture names
monocultures <- unique(df$Sample)
for (culture in monocultures) {
# Extract relevant information for the current monoculture
culture_data <- df %>%
filter(Sample == culture) %>%
arrange(desc(`date of basecalling`))
# Create the markdown output
cat("###", culture, "\n\n") # Heading with culture name
# Construct the DSMZ link (assuming a pattern in your data)
dsmz_link <- culture_data$SampleInfo[1]
cat("You find a description of this sample here: [",dsmz_link,"](",dsmz_link,")\n")
# Output the table
print(culture_data %>% select(-c( SampleType,SampleInfo)) %>%
mutate(fast = case_when(is.na(fast)~NA,
TRUE~cell_spec("fast", "html", link = fast))) %>%
mutate(hac = case_when(is.na(hac)~NA,
TRUE~cell_spec("hac", "html", link = hac))) %>%
mutate(sup = case_when(is.na(sup)~NA,
TRUE~cell_spec("sup", "html", link = sup))) %>%
mutate(hacdup = case_when(is.na(hacdup)~NA,
TRUE~cell_spec("hacdup", "html", link = hacdup))) %>%
mutate(supdup = case_when(is.na(supdup)~NA,
TRUE~cell_spec("supdup", "html", link = supdup))) %>%
mutate(mods = case_when(is.na(mods)~NA,
TRUE~cell_spec("mods", "html", link = mods))) %>%
mutate(pod5 = case_when(is.na(pod5)~NA,
TRUE~cell_spec("pod5", "html", link = pod5))) %>%
kable(format="html",escape = F) %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive" ,"bordered"),
full_width=FALSE, position = "left"))
cat("\n\n")
}
}
generate_monoculture_report(d %>% filter(SampleType=="monoculture"))
```
## Mock metagenomes
```{r echo=FALSE,message=FALSE,results='asis'}
generate_monoculture_report(d %>% filter(SampleType=="mock"))
```
## "Real" metagenomes
```{r echo=FALSE,message=FALSE,results='asis'}
generate_monoculture_report(d %>% filter(SampleType=="metagenome"))
```