@@ -19,21 +19,25 @@ output:
1919 css : " assets/report.css"
2020 includes :
2121 in_header : " assets/copy-button.html"
22- staff_web : " https://www.biosustain.dtu.dk/technologies/informatics/data-science-platform"
22+ staff_web : " https://bright.dtu.dk/technologies/biofoundry/informatics"
23+ always_allow_html : true
2324---
2425
2526``` {r,echo=FALSE,include=FALSE}
2627# variables
27- rep_org <- "Data Science Platform"
28- rep_core3 <- "Alberto Pallejà Caro"
29- rep_core_email3 <- "apca@biosustain.dtu.dk"
30- rep_core2 <- "Sebastian Ayala Ruano"
31- rep_core_email2 <- "asaru@dtu.dk"
28+ rep_org <- "Data Science Platform"
29+ rep_core4 <- "Albert Pallejà Caro"
30+ rep_core_email4 <- "apca@dtu.dk"
31+ rep_core3 <- "Alexander Zubov"
32+ rep_core_email3 <- "alzub@dtu.dk"
33+ rep_core2 <- "Edir Sebastian Vidal Casto"
34+ rep_core_email2 <- "s243564@student.dtu.dk"
3235rep_core <- "Juliana Assis"
3336rep_core_email <- "jasge@dtu.dk"
3437
3538# Combine all responsibles into a single string
3639rep_all <- paste0(
40+ rep_core4, " (", rep_core_email4, ")<br>",
3741 rep_core3, " (", rep_core_email3, ")<br>",
3842 rep_core2, " (", rep_core_email2, ")<br>",
3943 rep_core, " (", rep_core_email, ")"
@@ -52,6 +56,8 @@ __Responsibles:__ `r paste0(rep_all," ")`
5256
5357<!-- ----------------------- Do not edit above this ----------------------- -->
5458
59+ # Microbial association networks tutorial
60+
5561This markdown is to create microbial association networks (MANs) based on the abundance data using [ pearson correlation] ( https://en.wikipedia.org/wiki/Pearson_correlation_coefficient )
5662as association measure.
5763
@@ -70,16 +76,16 @@ library(dplyr)
7076## Load data
7177``` {r, warning=FALSE}
7278# Abundance table
73- abundance <- readRDS(file = "data/MetaphlanAbundance_Species.rds")
79+ abundance <- readRDS(file = "../ data/MetaphlanAbundance_Species.rds")
7480rownames(abundance) <- gsub("_SRR_db1.metaphlan", "", rownames(abundance))
7581dim(abundance)
7682
7783# Taxonomical annotation
78- annotation <- readRDS(file = "data/MetaphlanAnnotations_Species.rds")
84+ annotation <- readRDS(file = "../ data/MetaphlanAnnotations_Species.rds")
7985dim(annotation)
8086
8187# Metadata
82- metadata <- read.table(file = "data/metadata.tsv",
88+ metadata <- read.table(file = "../ data/metadata.tsv",
8389 header = TRUE, sep = "\t",
8490 quote = "",
8591 row.names = NULL)
@@ -94,7 +100,7 @@ dim(abundance)
94100## Create a directory to store the results
95101
96102``` {r, warning=FALSE}
97- results_dir <- "results/report/05_Microbial-association-networks"
103+ results_dir <- "../ results/report/05_Microbial-association-networks"
98104
99105dir.create(results_dir, recursive = TRUE, showWarnings = FALSE)
100106```
@@ -340,7 +346,8 @@ net_viz <- plot(
340346)
341347
342348# Open and close PNG device
343- png(file.path(results_dir, "5_pearson_network_igraph_plot.png"), width = 2500, height = 2300, res = 150)
349+ png(file.path(results_dir, "5_pearson_network_igraph_plot.png"),
350+ width = 2500, height = 2300, res = 150)
344351dev.off()
345352```
346353
@@ -365,7 +372,7 @@ to demonstrate how to use this package using the same dataset from this course.
365372
366373``` {r,eval=FALSE,echo=FALSE}
367374# manually run this to render this document to HTML
368- rmarkdown::render("Group-Comparison .Rmd")
375+ rmarkdown::render("05_Microbial-association-networks .Rmd")
369376# then run this to convert HTML to PDF (if needed)
370377#pagedown::chrome_print("core-report.html",output="core-report.pdf")
371378```
0 commit comments