Commit 00af4935 authored by Olivier Rue's avatar Olivier Rue
Browse files

real samples analysis

parent 1305af2c
Pipeline #48203 passed with stage
in 16 seconds
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Eco Sample Eco SampleID
echantillon1-1 BREAD S1 echantillon1-1 WINE echantillon1-1
echantillon1-2 BREAD S1 echantillon1-2 WINE echantillon1-2
echantillon1-3 BREAD S1 echantillon1-3 WINE echantillon1-3
echantillon2-1 BREAD S2 echantillon2-1 WINE echantillon2-1
echantillon2-2 BREAD S2 echantillon2-2 WINE echantillon2-2
echantillon2-3 BREAD S2 echantillon2-3 WINE echantillon2-3
echantillon3-1 BREAD S3 echantillon3-1 WINE echantillon3-1
echantillon3-2 BREAD S3 echantillon3-2 WINE echantillon3-2
echantillon3-3 BREAD S3 echantillon3-3 WINE echantillon3-3
\ No newline at end of file \ No newline at end of file
No preview for this file type
This diff is collapsed.
...@@ -114,41 +114,246 @@ raw_data <- read.csv2("data/metadata_real_reads.tsv" , sep = "\t", stringsAsFact ...@@ -114,41 +114,246 @@ raw_data <- read.csv2("data/metadata_real_reads.tsv" , sep = "\t", stringsAsFact
``` ```
# MEAT
## Analysis of raw BIOM files {.tabset}
```{r, eval=T} ```{r, eval=T}
if (!file.exists("REAL_MEAT/ITS1.rds")) {
biomfile <- "REAL_MEAT/ITS1.biom" dir <- paste("REAL",eco, sep="_")
physeq_its1 <- import_frogs(biomfile, taxMethod = "blast") ecos <- c("MEAT")
tax_table(physeq_its1) <- gsub(tax_table(physeq_its1), pattern = "[a-z]__", replacement = "") markers <- c("ITS1","ITS2","D1D2","RPB2")
metadata <- read.table("REAL_MEAT/metadata.tsv", row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE) for(eco in ecos){
sample_data(physeq_its1) <- metadata for(marker in markers){
sample_data(physeq_its1)$Marker <- "ITS1" #if (!file.exists(file.path(dir,paste0(marker,".rds")))) {
sample_data(physeq_its1)$Type <- "Raw" biomfile <- file.path(dir,paste0(marker,".biom"))
sample_data(physeq_its1)$Reads <- raw_data %>% filter(Ecosystem == "MEAT") %>% filter(Marker == "ITS1") %>% pull(Reads) physeq <- import_frogs(biomfile, taxMethod = "blast")
sample_names(physeq_its1) <- glue::glue(paste("{sample_names(physeq_its1)}","ITS1", sep="_")) tax_table(physeq) <- gsub(tax_table(physeq),pattern = "[a-z]__", replacement = "")
saveRDS(physeq_its1,"REAL_MEAT/ITS1.rds") metadata <- read.table(file.path(dir,"metadata.tsv"), row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
} else { sample_data(physeq) <- metadata
physeq_its1 <- readRDS("REAL_MEAT/ITS1.rds") sample_data(physeq)$Marker <- marker
sample_data(physeq)$Type <- "Raw"
#sample_data(physeq)$Reads <- raw_data %>% filter(Ecosystem == eco) %>% filter(Marker == marker) %>% pull(Reads)
sample_names(physeq) <- glue::glue(paste("{sample_names(physeq)}",marker,"RAW",sep="_"))
saveRDS(physeq,file.path(dir,paste0(marker,".rds")))
#}
#if (!file.exists(file.path(dir,paste0(marker,"_final.rds")))) {
if(eco == "MEAT"){
if(marker == "ITS1"){
physeq_final <- curation_meat_its1(physeq)
}else if(marker == "ITS2"){
physeq_final <- curation_meat_its2(physeq)
}else if (marker == "D1D2"){
physeq_final <- curation_meat_d1d2(physeq)
}else{
physeq_final <- curation_meat_rpb2(physeq)
}
}else if(eco == "CHEESE"){
if(marker == "ITS1") physeq_final <- curation_cheese_its1(physeq)
if(marker == "ITS2") physeq_final <- curation_cheese_its2(physeq)
if(marker == "D1D2") physeq_final <- curation_cheese_d1d2(physeq)
if(marker == "RPB2") physeq_final <- curation_cheese_rpb2(physeq)
}else if(eco == "BREAD"){
if(marker == "ITS1") physeq_final <- curation_bread_its1(physeq)
if(marker == "ITS2") physeq_final <- curation_bread_its2(physeq)
if(marker == "D1D2") physeq_final <- curation_bread_d1d2(physeq)
if(marker == "RPB2") physeq_final <- curation_bread_rpb2(physeq)
}else if(eco == "WINE"){
if(marker == "ITS1") physeq_final <- curation_wine_its1(physeq)
if(marker == "ITS2") physeq_final <- curation_wine_its2(physeq)
if(marker == "D1D2") physeq_final <- curation_wine_d1d2(physeq)
if(marker == "RPB2") physeq_final <- curation_wine_rpb2(physeq)
}
sample_data(physeq_final)$Type <- "Curated"
#sample_data(physeq_final)$Reads <- sample_sums(physeq_final)
sample_names(physeq_final) <- glue::glue(paste("{sample_data(physeq)$SampleID}",marker,"CURATED", sep="_"))
saveRDS(physeq_final,file.path(dir,paste0(marker,"_final.rds")))
#}
}
} }
```
# Sequencing depth {.tabset}
## MEAT {.tabset}
### ITS1
```{r, eval=T}
physeq <- readRDS("REAL_MEAT/ITS1.rds")
physeq_final <- readRDS("REAL_MEAT/ITS1_final.rds")
physeq_all <- merge_phyloseq(physeq, physeq_final)
p <- plot_composition(physeq_all, "Kingdom", "Fungi", "Family", x = "Type") +
scale_y_continuous(expand = expansion(0, 0)) +
scale_x_discrete(expand = expansion(0, 0)) +
facet_grid(~ SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
p <- plot_bar(physeq_all, x="Type") + facet_grid(~SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
```
### ITS2
```{r, eval=T}
physeq <- readRDS("REAL_MEAT/ITS2.rds")
physeq_final <- readRDS("REAL_MEAT/ITS2_final.rds")
physeq_all <- merge_phyloseq(physeq, physeq_final)
p <- plot_composition(physeq_all, "Kingdom", "Fungi", "Family", x = "Type") +
scale_y_continuous(expand = expansion(0, 0)) +
scale_x_discrete(expand = expansion(0, 0)) +
facet_grid(~ SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
p <- plot_bar(physeq_all, x="Type") + facet_grid(~SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
```
### D1D2
```{r, eval=T}
physeq <- readRDS("REAL_MEAT/D1D2.rds")
physeq_final <- readRDS("REAL_MEAT/D1D2_final.rds")
physeq_all <- merge_phyloseq(physeq, physeq_final)
p <- plot_composition(physeq, "Kingdom", "Fungi", "Family", x = "Type") +
scale_y_continuous(expand = expansion(0, 0)) +
scale_x_discrete(expand = expansion(0, 0)) +
facet_grid(~ SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
p <- plot_composition(physeq_final, "Kingdom", "Fungi", "Family", x = "Type") +
scale_y_continuous(expand = expansion(0, 0)) +
scale_x_discrete(expand = expansion(0, 0)) +
facet_grid(~ SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
p <- plot_composition(physeq_all, "Kingdom", "Fungi", "Family", x = "Type") +
scale_y_continuous(expand = expansion(0, 0)) +
scale_x_discrete(expand = expansion(0, 0)) +
facet_grid(~ SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
p <- plot_bar(physeq_all, x="Type") + facet_grid(~SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
```
### RPB2
```{r, eval=T}
physeq <- readRDS("REAL_MEAT/RPB2.rds")
physeq_final <- readRDS("REAL_MEAT/RPB2_final.rds")
physeq_all <- merge_phyloseq(physeq, physeq_final)
p <- plot_composition(physeq_all, "Kingdom", "Fungi", "Family", x = "Type") +
scale_y_continuous(expand = expansion(0, 0)) +
scale_x_discrete(expand = expansion(0, 0)) +
facet_grid(~ SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
p <- plot_bar(physeq_all, x="Type") + facet_grid(~SampleID)
p$data$Type <- factor(p$data$Type, levels = c("Raw","Curated"))
p
```
```{r}
#if (!file.exists(file.path(dir,paste0(marker,".rds")))) {
biomfile <- file.path(dir,paste0(marker,".biom"))
physeq <- import_frogs(biomfile, taxMethod = "blast")
tax_table(physeq) <- gsub(tax_table(physeq), pattern = "[a-z]__", replacement = "")
metadata <- read.table(file.path(dir,"metadata.tsv"), row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
sample_data(physeq) <- metadata
sample_data(physeq)$Marker <- marker
sample_data(physeq)$Type <- "Raw"
sample_data(physeq)$Reads <- raw_data %>% filter(Ecosystem == eco) %>% filter(Marker == marker) %>% pull(Reads)
sample_names(physeq) <- glue::glue(paste("{sample_names(physeq)}",marker,"RAW",sep="_"))
saveRDS(physeq,file.path(dir,paste0(marker,".rds")))
if(eco == "MEAT"){
if(marker == "ITS1") physeq_final <- curation_meat_its1(physeq)
if(marker == "ITS2") physeq_final <- curation_meat_its2(physeq)
if(marker == "D1D2") physeq_final <- curation_meat_d1d2(physeq)
if(marker == "RPB2") physeq_final <- curation_meat_rpb2(physeq)
}else if(eco == "CHEESE"){
if(marker == "ITS1") physeq_final <- curation_cheese_its1(physeq)
if(marker == "ITS2") physeq_final <- curation_cheese_its2(physeq)
if(marker == "D1D2") physeq_final <- curation_cheese_d1d2(physeq)
if(marker == "RPB2") physeq_final <- curation_cheese_rpb2(physeq)
}else if(eco == "BREAD"){
if(marker == "ITS1") physeq_final <- curation_bread_its1(physeq)
if(marker == "ITS2") physeq_final <- curation_bread_its2(physeq)
if(marker == "D1D2") physeq_final <- curation_bread_d1d2(physeq)
if(marker == "RPB2") physeq_final <- curation_bread_rpb2(physeq)
}else if(eco == "WINE"){
if(marker == "ITS1") physeq_final <- curation_wine_its1(physeq)
if(marker == "ITS2") physeq_final <- curation_wine_its2(physeq)
if(marker == "D1D2") physeq_final <- curation_wine_d1d2(physeq)
if(marker == "RPB2") physeq_final <- curation_wine_rpb2(physeq)
}
if(marker == "ITS1"){
physeq_final <- curation_meat_its1(physeq)
}
sample_data(physeq_final)$Type <- "Curated"
sample_data(physeq_final)$Reads <- sample_sums(physeq_final)
sample_names(physeq_final) <- glue::glue(paste("{sample_data(physeq)$Sample}",marker,"CURATED", sep="_"))
saveRDS(physeq_final,file.path(dir,paste0(marker,"_final.rds")))
#} else {
# physeq_its1 <- readRDS("REAL_MEAT/ITS1.rds")
#}
#if (!file.exists("REAL_MEAT/ITS1_final.rds")) {
physeq_its1_final <- curation_meat_its1(physeq_its1)
sample_data(physeq_its1_final)$Type <- "Curated"
sample_data(physeq_its1_final)$Reads <- sample_sums(physeq_its1_final)
sample_names(physeq_its1_final) <- glue::glue(paste("{sample_data(physeq_its1)$Sample}","ITS1","CURATED", sep="_"))
saveRDS(physeq_its1_final,"REAL_MEAT/ITS1_final.rds")
#} else {
# physeq_its1_final <- readRDS("REAL_MEAT/ITS1_final.rds")
#}
if (!file.exists("REAL_MEAT/ITS2.rds")) { #if (!file.exists("REAL_MEAT/ITS2.rds")) {
biomfile <- "REAL_MEAT/ITS2.biom" biomfile <- "REAL_MEAT/ITS2.biom"
physeq_its2 <- import_frogs(biomfile, taxMethod = "blast") physeq_its2 <- import_frogs(biomfile, taxMethod = "blast")
tax_table(physeq_its2) <- gsub(tax_table(physeq_its2), pattern = "[a-z]__", replacement = "") tax_table(physeq_its2) <- gsub(tax_table(physeq_its2), pattern = "[a-z]__", replacement = "")
metadata <- read.table("REAL_MEAT/metadata.tsv", row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadata <- read.table("REAL_MEAT/metadata.tsv", row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
sample_data(physeq_its2) <- metadata sample_data(physeq_its2) <- metadata
sample_data(physeq_its2)$Marker <- "ITS2" sample_data(physeq_its2)$Marker <- "ITS2"
sample_data(physeq_its2)$Type <- "Raw"
sample_data(physeq_its2)$Reads <- raw_data %>% filter(Ecosystem == "MEAT") %>% filter(Marker == "ITS2") %>% pull(Reads) sample_data(physeq_its2)$Reads <- raw_data %>% filter(Ecosystem == "MEAT") %>% filter(Marker == "ITS2") %>% pull(Reads)
sample_names(physeq_its2) <- glue::glue(paste("{sample_names(physeq_its2)}","ITS2", sep="_")) sample_names(physeq_its2) <- glue::glue(paste("{sample_names(physeq_its2)}","ITS2", sep="_"))
saveRDS(physeq_its2,"REAL_MEAT/ITS2.rds") saveRDS(physeq_its2,"REAL_MEAT/ITS2.rds")
} else { #} else {
physeq_its2 <- readRDS("REAL_MEAT/ITS2.rds") #physeq_its2 <- readRDS("REAL_MEAT/ITS2.rds")
} #}
#if (!file.exists("REAL_MEAT/ITS2_final.rds")) {
if (!file.exists("REAL_MEAT/D1D2.rds")) { physeq_its2_final <- curation_meat_its2(physeq_its2)
sample_data(physeq_its2_final)$Type <- "Curated"
sample_data(physeq_its2_final)$Reads <- sample_sums(physeq_its2_final)
sample_names(physeq_its2_final) <- glue::glue(paste("{sample_data(physeq_its2)$Sample}","ITS2","CURATED", sep="_"))
saveRDS(physeq_its2_final,"REAL_MEAT/ITS2_final.rds")
#} else {
# physeq_its2_final <- readRDS("REAL_MEAT/ITS2_final.rds")
#}
#if (!file.exists("REAL_MEAT/D1D2.rds")) {
biomfile <- "REAL_MEAT/D1D2.biom" biomfile <- "REAL_MEAT/D1D2.biom"
physeq_d1d2 <- import_frogs(biomfile, taxMethod = "blast") physeq_d1d2 <- import_frogs(biomfile, taxMethod = "blast")
tax_table(physeq_d1d2) <- gsub(tax_table(physeq_d1d2), pattern = "[a-z]__", replacement = "") tax_table(physeq_d1d2) <- gsub(tax_table(physeq_d1d2), pattern = "[a-z]__", replacement = "")
...@@ -156,36 +361,38 @@ if (!file.exists("REAL_MEAT/D1D2.rds")) { ...@@ -156,36 +361,38 @@ if (!file.exists("REAL_MEAT/D1D2.rds")) {
metadata <- read.table("REAL_MEAT/metadata.tsv", row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadata <- read.table("REAL_MEAT/metadata.tsv", row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
sample_data(physeq_d1d2) <- metadata sample_data(physeq_d1d2) <- metadata
sample_data(physeq_d1d2)$Marker <- "D1D2" sample_data(physeq_d1d2)$Marker <- "D1D2"
sample_data(physeq_d1d2)$Type <- "Raw"
sample_data(physeq_d1d2)$Reads <- raw_data %>% filter(Ecosystem == "MEAT") %>% filter(Marker == "D1D2") %>% pull(Reads) sample_data(physeq_d1d2)$Reads <- raw_data %>% filter(Ecosystem == "MEAT") %>% filter(Marker == "D1D2") %>% pull(Reads)
sample_names(physeq_d1d2) <- glue::glue(paste("{sample_names(physeq_d1d2)}","D1D2", sep="_")) sample_names(physeq_d1d2) <- glue::glue(paste("{sample_names(physeq_d1d2)}","D1D2", sep="_"))
saveRDS(physeq_d1d2,"REAL_MEAT/D1D2.rds") saveRDS(physeq_d1d2,"REAL_MEAT/D1D2.rds")
} else { #} else {
physeq_d1d2 <- readRDS("REAL_MEAT/D1D2.rds") # physeq_d1d2 <- readRDS("REAL_MEAT/D1D2.rds")
} #}
if (!file.exists("REAL_MEAT/RPB2.rds")) { #if (!file.exists("REAL_MEAT/RPB2.rds")) {
biomfile <- "REAL_MEAT/RPB2.biom" biomfile <- "REAL_MEAT/RPB2.biom"
physeq_rpb2 <- import_frogs(biomfile, taxMethod = "blast") physeq_rpb2 <- import_frogs(biomfile, taxMethod = "blast")
tax_table(physeq_rpb2) <- gsub(tax_table(physeq_rpb2), pattern = "[a-z]__", replacement = "") tax_table(physeq_rpb2) <- gsub(tax_table(physeq_rpb2), pattern = "[a-z]__", replacement = "")
metadata <- read.table("REAL_MEAT/metadata.tsv", row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadata <- read.table("REAL_MEAT/metadata.tsv", row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
sample_data(physeq_rpb2) <- metadata sample_data(physeq_rpb2) <- metadata
sample_data(physeq_rpb2)$Marker <- "RPB2" sample_data(physeq_rpb2)$Marker <- "RPB2"
sample_data(physeq_rpb2)$Type <- "Raw"
sample_data(physeq_rpb2)$Reads <- raw_data %>% filter(Ecosystem == "MEAT") %>% filter(Marker == "RPB2") %>% pull(Reads) sample_data(physeq_rpb2)$Reads <- raw_data %>% filter(Ecosystem == "MEAT") %>% filter(Marker == "RPB2") %>% pull(Reads)
sample_names(physeq_rpb2) <- glue::glue(paste("{sample_names(physeq_rpb2)}","RPB2", sep="_")) sample_names(physeq_rpb2) <- glue::glue(paste("{sample_names(physeq_rpb2)}","RPB2", sep="_"))
saveRDS(physeq_rpb2,"REAL_MEAT/RPB2.rds") saveRDS(physeq_rpb2,"REAL_MEAT/RPB2.rds")
} else { #} else {
physeq_rpb2 <- readRDS("REAL_MEAT/RPB2.rds") # physeq_rpb2 <- readRDS("REAL_MEAT/RPB2.rds")
} #}
``` ```
```{r, eval=T} ```{r, eval=T}
if (!file.exists("REAL_MEAT/meat.rds")){ #if (!file.exists("REAL_MEAT/meat.rds")){
meat_all <- merge_phyloseq(physeq_its1, physeq_its2, physeq_d1d2, physeq_rpb2) meat_all <- merge_phyloseq(physeq_its1, physeq_its2, physeq_d1d2, physeq_rpb2)
sample_data(meat_all)$Marker <- factor(sample_data(meat_all)$Marker, levels=c("ITS1","ITS2","D1D2","RPB2")) sample_data(meat_all)$Marker <- factor(sample_data(meat_all)$Marker, levels=c("ITS1","ITS2","D1D2","RPB2"))
saveRDS(meat_all,"REAL_MEAT/meat.rds") saveRDS(meat_all,"REAL_MEAT/meat.rds")
}else{ #}else{
meat_all <- readRDS("REAL_MEAT/meat.rds") # meat_all <- readRDS("REAL_MEAT/meat.rds")
} #}
``` ```
...@@ -264,8 +471,14 @@ ggVennDiagram(x,label_alpha = 0) + ...@@ -264,8 +471,14 @@ ggVennDiagram(x,label_alpha = 0) +
physeq_its1_final <- curation_meat_its1(physeq_its1) physeq_its1_final <- curation_meat_its1(physeq_its1)
sample_data(physeq_its1_final)$Type <- "Curated" sample_data(physeq_its1_final)$Type <- "Curated"
sample_data(physeq_its1_final)$Reads <- sample_sums(physeq_its1_final) sample_data(physeq_its1_final)$Reads <- sample_sums(physeq_its1_final)
sample_names(physeq_its1_final) <- glue::glue(paste("{sample_names(physeq_its1)}","CURATED", sep="_")) sample_names(physeq_its1_final) <- glue::glue(paste("{sample_data(physeq_its1)$Sample}","ITS1","CURATED", sep="_"))
toto <- merge_phyloseq(physeq_its1, physeq_its1_final)
p <- plot_composition(physeq = toto, taxaRank1 = "Kingdom", taxaSet1 = "Fungi", taxaRank2 = "Species", numberOfTaxa = 22, x = "Sample")
p <- p + facet_grid(". ~ Sample", scales = "free_x", space = "free")
p + theme(legend.position="bottom")
p
saveRDS(physeq_its1_final,"REAL_MEAT/ITS1_final.rds") saveRDS(physeq_its1_final,"REAL_MEAT/ITS1_final.rds")
...@@ -1189,8 +1402,8 @@ ggVennDiagram(x,label_alpha = 0) + ...@@ -1189,8 +1402,8 @@ ggVennDiagram(x,label_alpha = 0) +
physeq_its1_final <- curation_wine_its1(physeq_its1) physeq_its1_final <- curation_wine_its1(physeq_its1)
saveRDS(physeq_its1_final,"REAL_WINE/ITS1_final.rds") saveRDS(physeq_its1_final,"REAL_WINE/ITS1_final.rds")
#physeq_its2_final <- curation_wine_its2(physeq_its2) physeq_its2_final <- curation_wine_its2(physeq_its2)
#saveRDS(physeq_its2_final,"REAL_WINE/ITS2_final.rds") saveRDS(physeq_its2_final,"REAL_WINE/ITS2_final.rds")
physeq_d1d2_final <- curation_wine_d1d2(physeq_d1d2) physeq_d1d2_final <- curation_wine_d1d2(physeq_d1d2)
saveRDS(physeq_d1d2_final,"REAL_WINE/D1D2_final.rds") saveRDS(physeq_d1d2_final,"REAL_WINE/D1D2_final.rds")
...@@ -1203,7 +1416,7 @@ saveRDS(physeq_rpb2_final,"REAL_WINE/RPB2_final.rds") ...@@ -1203,7 +1416,7 @@ saveRDS(physeq_rpb2_final,"REAL_WINE/RPB2_final.rds")
```{r, eval=T} ```{r, eval=T}
#if (!file.exists("REAL_WINE/wine_final.rds")){ #if (!file.exists("REAL_WINE/wine_final.rds")){
wine_all_final <- merge_phyloseq(physeq_its1_final, physeq_its2, physeq_d1d2_final, physeq_rpb2_final) wine_all_final <- merge_phyloseq(physeq_its1_final, physeq_its2_final, physeq_d1d2_final, physeq_rpb2_final)
sample_data(wine_all_final)$Marker <- factor(sample_data(wine_all_final)$Marker, levels=c("ITS1","ITS2","D1D2","RPB2")) sample_data(wine_all_final)$Marker <- factor(sample_data(wine_all_final)$Marker, levels=c("ITS1","ITS2","D1D2","RPB2"))
saveRDS(wine_all_final,"REAL_WINE/wine_final.rds") saveRDS(wine_all_final,"REAL_WINE/wine_final.rds")
#}else{ #}else{
......
...@@ -11,17 +11,25 @@ ...@@ -11,17 +11,25 @@
<meta name="author" content="Olivier Rué" /> <meta name="author" content="Olivier Rué" />
<meta name="date" content="2022-01-12" /> <meta name="date" content="2022-01-18" />
<title>Real samples analysis</title> <title>Real samples analysis</title>
<script src="real_samples_files/header-attrs-2.6/header-attrs.js"></script>
<script src="real_samples_files/jquery-1.11.3/jquery.min.js"></script> <script src="real_samples_files/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="real_samples_files/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" /> <link href="real_samples_files/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<script src="real_samples_files/bootstrap-3.3.5/js/bootstrap.min.js"></script> <script src="real_samples_files/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="real_samples_files/bootstrap-3.3.5/shim/html5shiv.min.js"></script> <script src="real_samples_files/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="real_samples_files/bootstrap-3.3.5/shim/respond.min.js"></script> <script src="real_samples_files/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="real_samples_files/jqueryui-1.11.4/jquery-ui.min.js"></script> <script src="real_samples_files/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="real_samples_files/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" /> <link href="real_samples_files/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="real_samples_files/tocify-1.9.1/jquery.tocify.js"></script> <script src="real_samples_files/tocify-1.9.1/jquery.tocify.js"></script>
...@@ -40,11 +48,6 @@ ...@@ -40,11 +48,6 @@
</style> </style>
<style type="text/css">code{white-space: pre;}</style> <style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript"> <script type="text/javascript">
if (window.hljs) { if (window.hljs) {
hljs.configure({languages: []}); hljs.configure({languages: []});
...@@ -57,32 +60,6 @@ if (window.hljs) { ...@@ -57,32 +60,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
...@@ -94,10 +71,6 @@ h6 { ...@@ -94,10 +71,6 @@ h6 {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img { img {
max-width:100%; max-width:100%;
} }
...@@ -113,6 +86,9 @@ button.code-folding-btn:focus { ...@@ -113,6 +86,9 @@ button.code-folding-btn:focus {
summary { summary {
display: list-item; display: list-item;
} }
pre code {
padding: 0;
}
</style> </style>
...@@ -125,7 +101,6 @@ summary { ...@@ -125,7 +101,6 @@ summary {
max-height: 500px; max-height: 500px;
min-height: 44px; min-height: 44px;
overflow-y: auto; overflow-y: auto;
background: white;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 4px; border-radius: 4px;
} }
...@@ -254,7 +229,7 @@ div.tocify { ...@@ -254,7 +229,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content --> <!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid"> <div class="row">
<div class="col-xs-12 col-sm-4 col-md-3"> <div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify"> <div id="TOC" class="tocify">
</div> </div>
...@@ -265,11 +240,11 @@ div.tocify { ...@@ -265,11 +240,11 @@ div.tocify {
<div class="fluid-row" id="header"> <div id="header">
<div class="btn-group pull-right"> <div class="btn-group pull-right float-right">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button> <button type="button" class="btn btn-default btn-xs btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button>
<ul class="dropdown-menu" style="min-width: 50px;"> <ul class="dropdown-menu dropdown-menu-right" style="min-width: 50px;">
<li><a id="rmd-show-all-code" href="#">Show All Code</a></li> <li><a id="rmd-show-all-code" href="#">Show All Code</a></li>
<li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li> <li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li>
</ul> </ul>
...@@ -279,7 +254,7 @@ div.tocify { ...@@ -279,7 +254,7 @@ div.tocify {
<h1 class="title toc-ignore">Real samples analysis</h1> <h1 class="title toc-ignore">Real samples analysis</h1>
<h4 class="author">Olivier Rué</h4> <h4 class="author">Olivier Rué</h4>
<h4 class="date">2022-01-12</h4> <h4 class="date">2022-01-18</h4>
</div> </div>
...@@ -335,7 +310,7 @@ grep -f to_keep.lst affiliation.tsv &gt;&gt; affiliation-filtered-final.tsv</cod ...@@ -335,7 +310,7 @@ grep -f to_keep.lst affiliation.tsv &gt;&gt; affiliation-filtered-final.tsv</cod
<div id="meat" class="section level1"> <div id="meat" class="section level1">
<h1>MEAT</h1> <h1>MEAT</h1>
<div id="analysis-of-raw-biom-files" class="section level2 tabset"> <div id="analysis-of-raw-biom-files" class="section level2 tabset">
<h2 class="tabset">Analysis of raw BIOM files</h2> <h2>Analysis of raw BIOM files</h2>
<pre class="r"><code>if (!file.exists(&quot;REAL_MEAT/ITS1.rds&quot;)) { <pre class="r"><code>if (!file.exists(&quot;REAL_MEAT/ITS1.rds&quot;)) {
biomfile &lt;- &quot;REAL_MEAT/ITS1.biom&quot; biomfile &lt;- &quot;REAL_MEAT/ITS1.biom&quot;
physeq_its1 &lt;- import_frogs(biomfile, taxMethod = &quot;blast&quot;) physeq_its1 &lt;- import_frogs(biomfile, taxMethod = &quot;blast&quot;)
...@@ -343,6 +318,7 @@ grep -f to_keep.lst affiliation.tsv &gt;&gt; affiliation-filtered-final.tsv</cod ...@@ -343,6 +318,7 @@ grep -f to_keep.lst affiliation.tsv &gt;&gt; affiliation-filtered-final.tsv</cod
metadata &lt;- read.table(&quot;REAL_MEAT/metadata.tsv&quot;, row.names = 1, header = TRUE, sep = &quot;\t&quot;, stringsAsFactors = FALSE) metadata &lt;- read.table(&quot;REAL_MEAT/metadata.tsv&quot;, row.names = 1, header = TRUE, sep = &quot;\t&quot;, stringsAsFactors = FALSE)
sample_data(physeq_its1) &lt;- metadata sample_data(physeq_its1) &lt;- metadata
sample_data(physeq_its1)$Marker &lt;- &quot;ITS1&quot; sample_data(physeq_its1)$Marker &lt;- &quot;ITS1&quot;
sample_data(physeq_its1)$Type &lt;- &quot;Raw&quot;
sample_data(physeq_its1)$Reads &lt;- raw_data %&gt;% filter(Ecosystem == &quot;MEAT&quot;) %&gt;% filter(Marker == &quot;ITS1&quot;) %&gt;% pull(Reads) sample_data(physeq_its1)$Reads &lt;- raw_data %&gt;% filter(Ecosystem == &quot;MEAT&quot;) %&gt;% filter(Marker == &quot;ITS1&quot;) %&gt;% pull(Reads)
sample_names(physeq_its1) &lt;- glue::glue(paste(&quot;{sample_names(physeq_its1)}&quot;,&quot;ITS1&quot;, sep=&quot;_&quot;)) sample_names(physeq_its1) &lt;- glue::glue(paste(&quot;{sample_names(physeq_its1)}&quot;,&quot;ITS1&quot;, sep=&quot;_&quot;))
saveRDS(physeq_its1,&quot;REAL_MEAT/ITS1.rds&quot;) saveRDS(physeq_its1,&quot;REAL_MEAT/ITS1.rds&quot;)
...@@ -400,7 +376,7 @@ if (!file.exists(&quot;REAL_MEAT/RPB2.rds&quot;)) { ...@@ -400,7 +376,7 @@ if (!file.exists(&quot;REAL_MEAT/RPB2.rds&quot;)) {
meat_all &lt;- readRDS(&quot;REAL_MEAT/meat.rds&quot;) meat_all &lt;- readRDS(&quot;REAL_MEAT/meat.rds&quot;)
}</code></pre> }</code></pre>
<div id="sequencing-depth" class="section level3 tabset"> <div id="sequencing-depth" class="section level3 tabset">