-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRead_me.Rmd
105 lines (74 loc) · 3.64 KB
/
Read_me.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
---
title: "Read me"
author: "Elizabeth Bowman"
date: "2/24/2020"
output: html_document
---
The folders here contain R scripts and data files for the article "Fire and local factors shape ectomycorrhizal fungal communities associated with Pinus ponderosa in mountains of the Madrean Sky Island Archipelago" written by Elizabeth A. Bowman, Daniel R. Hayden, and A.Elizabeth Arnold. The manuscript has been published in the Fungal Ecology journal
A. Elizabeth Arnold is the author for correspondence on this article.
Address: 1140 E. South Campus Drive
Forbes 303
School of Plant Sciences
The University of Arizona
Tucson, AZ 85721 USA.
Email: [email protected]
Elizabeth A. Bowman wrote all R scripts for data analysis.
Email: [email protected]
A portion of the analyses were conducted in JMP. See manuscript for more information.
------------------------------------------------------------------------------------------
Explanation of folders:
1. The data folder contains all data files used in the R script for analyses with
explanations of columns.
2. The script folder contains all scripts organized by type of analysis.
3. Create a folder titled 'figures'. The figures folder is an output folder where figures
generated in the R script will be output.
4. Create a folder title 'results'. The results folder is an output folder for results tables generated in the R script.
Each of these folders contains a 'Read me' file with further explanations.
------------------------------------------------------------------------------------------
The following code will run each analysis and output figures and result tables to their appropriate folders. All analyses below are run using sequenced root tip data (see manuscript for explanation of sequenced root tips).
You will need to create a figures and results folder before proceeding (see above).
# Load file paths
```{r file paths}
#--file path to data directory
dat.dir <- 'data/'
fig.dir <- 'figures/'
res.dir <- 'results/'
script.dir <- 'scripts/'
```
# Load packages
If you need to install packages, open 'Load_packages.R' and uncomment 'install.packages'
before running.
```{r libraries}
source(paste0(script.dir, "LoadLibraries.R"))
```
# Elevation map (Figure 1)
```{r map}
source(paste0(script.dir, "ElevationMap.R"))
```
# Diversity analyses (Figure 3)
```{r diversity}
source(paste0(script.dir, "Diversity.R"))
```
# Community composition analyses
Within the script there is code to remove singletons, just uncomment them (remove # sign). The code as it is run has outliers removed, but you can include them by commenting out those lines (add # sign before code). All code is commented with explanations of what their function is. Figure 4 was created in past 3.24, but the code to create the figures in R is included here for transparency.
The script contains code for NMDS ordinations, PERMANOVA or ANOSIM depending on the data, and comparisons of community similarity.
```{r community}
source(paste0(script.dir, "Ordination.R"))
```
# Taxonomic analyses (Fig. 5)
```{r taxonomy}
source(paste0(script.dir, "Taxonomic_analyses.R"))
```
# Indicator species analyses
```{r indicator}
source(paste0(script.dir, "Indicator_species_analyses.R"))
```
# Environmental analyses (soil and climate)
```{r indicator}
source(paste0(script.dir, "EnvironmentalAnalyses.R"))
```
# Species accumulation curves
While this script was not used to create the graphs used in the manuscript, they are included here for transparency. The graphs of species accumulation curves used in the manuscript were created by AEA in EstimateS 9.1.0.
```{r species accumulation curves}
source(paste0(script.dir, "SpeciesAccumulationCurves.R"))
```