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

Better formatting for PDF knitting

parent c9e27722
No related branches found
No related tags found
No related merge requests found
Showing
with 1837 additions and 313 deletions
names(colors_genera_pp) <- genera_pp
colors_genera_other <- viridis(length(genera_other), option = "D", begin = 1 ,end = 0.9)
names(colors_genera_other) <- genera_other
colors_oomyc_genera <- c(colors_genera_pp, colors_genera_other)
#Sort alphabetically by vector names to avoid mixing up color assignments (origin of issue not resolved)
colors_oomyc_genera <- colors_oomyc_genera[order(names(colors_oomyc_genera))]
colors_oomyc_genera["Phytophthora"] <- viridis_reds[1]
colors_oomyc_genera["Pythium"] <- viridis_reds[4]
shared_theme <- theme(legend.key.size = unit(3, "mm"), legend.position = "none", axis.title.x = element_blank(), plot.margin = margin(20,10,10,10), legend.text.align = 0)
shared_theme_abu <- theme(legend.key.size = unit(3, "mm"), legend.position = "none", axis.title.x = element_blank(), plot.margin = margin(20,10,10,10),legend.text.align = 0)
if(customLabels){
labelling <- c(expression(paste("uncultured ", italic("Apodachlya"))),
expression(paste("uncultured ", italic("Lagenidium"))),
expression(paste("uncultured ", italic("Oomycetes"))),
expression(paste("uncultured ", italic("Phytophthora"))),
expression(paste("uncultured ", italic("Pythium"))),
expression(italic("Achlya"), italic("Albugo"), italic("Aphanomyces"),
italic("Apodachlya"), italic("Atkinsiella"), italic("Bremia"),
italic("Brevilegnia"), italic("Dictyuchus"), italic("Eurychasma"),
italic("Geolegnia"), italic("Globisporangium"), italic("Halocrusticida"),
italic("Haptoglossa"), italic("Hyaloperonospora"), italic("Lagena"),
italic("Lagenidium"), italic("Leptolegnia"), italic("Myzocytiopsis"), italic("Lagenidium"), italic("Leptolegnia"), italic("Myzocytiopsis"),
italic("Paralagenidium"), italic("Peronospora"), italic("Phragmosporangium"), italic("Paralagenidium"), italic("Peronospora"), italic("Phragmosporangium"),
italic("Phytophthora"), italic("Phytopythium"), italic("Pilasporangium"), italic("Phytophthora"), italic("Phytopythium"), italic("Pilasporangium"),
...@@ -510,3 +489,24 @@ cat(topnt_summary, "\n\n", topnt2_summary) ...@@ -510,3 +489,24 @@ cat(topnt_summary, "\n\n", topnt2_summary)
cat(prctg_pyth_phyt_str) cat(prctg_pyth_phyt_str)
combobar1 combobar1
cat("Chunk successfully run") cat("Chunk successfully run")
# CHANGE ME according to the location containing 'seqtab_nochim.rds' and other relevant files.
path = "Data_files/"
# CHANGE ME to 'TRUE' to list all samples and generate an empty metadata file
optional_sample_check <- "FALSE"
# CHANGE ME to TRUE to update the cuphyr package. This is a package the author published to separate out general purpose functions from this script. If the package is not installed, it will be installed, regardless of the value chosen here.
update_cuphyr <- TRUE
################# NO CHANGES NECESSARY BELOW #################
#global knitr settings to determine the output of the markdown document upon 'knitting'
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(root.dir = paste0(path))
#Messages and warnings are turned off globally for a cleaner output. Change to TRUE for complete output
knitr::opts_chunk$set(message = FALSE)
knitr::opts_chunk$set(warning = FALSE)
knitr::opts_chunk$set(tidy = TRUE)
#CuPhyR is the author's own package that contains several functions used to process phyloseq objects. It is hosted on GitHub and installed/updated using this command if update_cuphyr is TRUE
if (update_cuphyr | !"cuphyr" %in% rownames(installed.packages())) {
devtools::install_github("simeross/cuphyr")
}
#Loading required packages
library(phyloseq)
library(dada2)
This diff is collapsed.
This diff is collapsed.
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment