Skip to content
Snippets Groups Projects
Commit 1250426c authored by Simeon's avatar Simeon
Browse files

all analyses re-knitted

parent 81dcee35
No related branches found
No related tags found
No related merge requests found
Showing
with 8480 additions and 252 deletions
This diff is collapsed.
This diff is collapsed.
---
title: "16S Data Analysis"
title: "FITS1 Data Analysis"
author: "Simeon Lim Rossmann, Marte Persdatter Tangvik"
date: "23.12.2024"
output:
......@@ -86,7 +86,7 @@ remotes::install_github("mahendra-mariadassou/phyloseq-extended", ref = "dev")
source("https://raw.githubusercontent.com/mahendra-mariadassou/phyloseq-extended/master/load-extra-functions.R" )
library(phyloseq)
library(SIAMCAT)
#library(SIAMCAT)
# Phylogeny libraries
library(phangorn)
......@@ -676,7 +676,7 @@ its1_percentage
This chunk plots abundance of the Top n ASVs or taxa at a given level as a bar plot, giving an insight into the presence of the n ASV and most common taxa for the primary and secondary parameters. The default for n is set at 20, a larger n may lead to delay/skipping of the plot in standard out, but it should be saved as a PDF regardless for ASVs. For taxa, a large n may lead to unreadable plots. **The chunk does not require any input**, but it is possible to adjust the **default 'n'**, and to change **width**, **height** and **resolution** of the PDF-output if necessary.
```{r custom-Bar-plot, tidy=TRUE, message=FALSE}
```{r custom Bar plot, message=FALSE}
# CHANGE ME to the desired sample categories on the x-axis.
# Accepted values are the column headers in the descriptor file.
set$x_axis_value = "ndvi"
......@@ -785,7 +785,7 @@ plots$combo_topn_custom
### NDVI+Shannon regression
```{r ndvi-shannon}
```{r ndvi shannon}
topntax_data <- set$topntax_tbl %>%
mutate(Taxa = 'fits1') %>%
ungroup() %>%
......@@ -799,7 +799,7 @@ write.csv(topntax_data, file = "../topntax_all_taxa/topntax_data_fits1.csv")
### NDVI regression
```{r NDVI-new}
```{r NDVI new}
# Create properly formatted tibble with columns Sample, ndvi_01 (ndvi translated to (0, 1) interval) and one column for each genus
# containing the sample abundances for that genus.
......
This diff is collapsed.
No preview for this file type
File deleted
No preview for this file type
No preview for this file type
No preview for this file type
---
title: "16S Data Analysis"
title: "FITS2 Data Analysis"
author: "Simeon Lim Rossmann, Marte Persdatter Tangvik"
date: "23.12.2024"
output:
......@@ -86,7 +86,7 @@ remotes::install_github("mahendra-mariadassou/phyloseq-extended", ref = "dev")
source("https://raw.githubusercontent.com/mahendra-mariadassou/phyloseq-extended/master/load-extra-functions.R" )
library(phyloseq)
library(SIAMCAT)
#library(SIAMCAT)
# Phylogeny libraries
library(phangorn)
......@@ -668,7 +668,7 @@ its2_percentage
This chunk plots abundance of the Top n ASVs or taxa at a given level as a bar plot, giving an insight into the presence of the n ASV and most common taxa for the primary and secondary parameters. The default for n is set at 20, a larger n may lead to delay/skipping of the plot in standard out, but it should be saved as a PDF regardless for ASVs. For taxa, a large n may lead to unreadable plots. **The chunk does not require any input**, but it is possible to adjust the **default 'n'**, and to change **width**, **height** and **resolution** of the PDF-output if necessary.
```{r custom-Bar-plot, tidy=TRUE, message=FALSE}
```{r custom-Bar-plot, message=FALSE}
# CHANGE ME to the desired sample categories on the x-axis.
# Accepted values are the column headers in the descriptor file.
......@@ -786,7 +786,7 @@ topntax_data <- set$topntax_tbl %>%
select(Alias, ndvi, Shannon, Taxa) %>%
distinct()
write.csv(topntax_data, file = "../../topntax_all_taxa/topntax_data_fits2.csv")
write.csv(topntax_data, file = "../topntax_all_taxa/topntax_data_fits2.csv")
```
......
This diff is collapsed.
File added
File added
No preview for this file type
This diff is collapsed.
---
title: "16S Data Analysis"
title: "Nems Data Analysis"
author: "Simeon Lim Rossmann, Marte Persdatter Tangvik"
date: "23.12.2024"
output:
......@@ -88,7 +88,7 @@ remotes::install_github("mahendra-mariadassou/phyloseq-extended", ref = "dev")
source("https://raw.githubusercontent.com/mahendra-mariadassou/phyloseq-extended/master/load-extra-functions.R" )
library(phyloseq)
library(SIAMCAT)
#library(SIAMCAT)
# Phylogeny libraries
library(phangorn)
......@@ -811,7 +811,7 @@ plots$topn_ASVs
This chunk plots abundance of the Top n ASVs or taxa at a given level as a bar plot, giving an insight into the presence of the n ASV and most common taxa for the primary and secondary parameters. The default for n is set at 20, a larger n may lead to delay/skipping of the plot in standard out, but it should be saved as a PDF regardless for ASVs. For taxa, a large n may lead to unreadable plots. **The chunk does not require any input**, but it is possible to adjust the **default 'n'**, and to change **width**, **height** and **resolution** of the PDF-output if necessary.
```{r custom-Bar-plot, tidy=TRUE, message=FALSE}
```{r custom-Bar-plot, message=FALSE}
# CHANGE ME to the desired sample categories on the x-axis.
# Accepted values are the column headers in the descriptor file.
set$x_axis_value = "ndvi"
......@@ -939,7 +939,7 @@ topntax_data <- set$topntax_tbl %>%
select(Alias, ndvi, Shannon, Taxa) %>%
distinct()
write.csv(topntax_data, file = "../../topntax_all_taxa/topntax_data_nematodes.csv")
write.csv(topntax_data, file = "../topntax_all_taxa/topntax_data_nematodes.csv")
```
......@@ -1261,13 +1261,13 @@ set$data_mol_morph_long <- data_mol_morph_long_temp %>%
set$data_morph <- set$data_mol_morph_long[set$data_mol_morph_long$type == 'total_count',]
set$data_morph <- set$data_morph %>%
rename("value" = "Number_of_nematodes")
dplyr::rename("Number_of_nematodes" = value)
# Relative abundance data
set$data_relabu <- set$data_mol_morph_long[set$data_mol_morph_long$type == 'Genus_Sample_Abundance',]
set$data_relabu <- set$data_relabu %>%
rename("value" = "Relative_abundance")
dplyr::rename("Relative_abundance" = value)
```
......
This diff is collapsed.
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment