-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
247 lines (194 loc) · 7.33 KB
/
README.Rmd
File metadata and controls
247 lines (194 loc) · 7.33 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
---
output: github_document
always_allow_html: true
editor_options:
markdown:
wrap: 72
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
message = FALSE,
warning = FALSE,
fig.retina = 2,
fig.align = 'center'
)
```
# fungalgrowth
<!-- badges: start -->
[](https://creativecommons.org/licenses/by/4.0/)
<!-- badges: end -->
Data from a laboratory assay investigating the growth of fungal species on
human faeces and their effect on faecal physicochemical properties and
bacterial indicator concentrations over 14 days post inoculation. Five fungal
species were tested alongside untreated controls: Pleurotus ostreatus (MG1015,
MG1010), Ganoderma lucidum, Stropharia fimicola (F35), and Trichoderma
harzianum (T22).
## Installation
You can install the development version of fungalgrowth from
[GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("global-health-engineering/fungalgrowth")
```
```{r}
## Run the following code in console if you don't have the packages
## install.packages(c("dplyr", "knitr", "readr", "stringr", "gt", "kableExtra"))
library(dplyr)
library(knitr)
library(readr)
library(stringr)
library(gt)
library(kableExtra)
```
Alternatively, you can download the individual datasets as a CSV or XLSX
file from the table below.
1. Click Download CSV. A window opens that displays the CSV in
your browser.
2. Right-click anywhere inside the window and select "Save Page As...".
3. Save the file in a folder of your choice.
```{r, echo=FALSE, message=FALSE, warning=FALSE}
extdata_path <- "https://github.com/global-health-engineering/fungalgrowth/raw/main/inst/extdata/"
read_csv("data-raw/dictionary.csv") |>
distinct(file_name) |>
dplyr::mutate(file_name = str_remove(file_name, ".rda")) |>
dplyr::rename(dataset = file_name) |>
mutate(
CSV = paste0("[Download CSV](", extdata_path, dataset, ".csv)"),
XLSX = paste0("[Download XLSX](", extdata_path, dataset, ".xlsx)")
) |>
knitr::kable()
```
## Data
The datasets capture a 14-day laboratory assay designed to study how fungal
mycelium grows on human faeces and how that growth alters the substrate's
physicochemical and microbial properties. Five datasets describe the assay end
to end: the experimental setup, the characterization of the inputs (faeces
samples and fungal inocula), the daily time series of mycelium growth, and the
endpoint measurements recorded 14 days post inoculation. Each dataset is
lazy-loaded and ready to use as soon as the package is attached.
```{r}
library(fungalgrowth)
```
### experiment_setup
The dataset `experiment_setup` contains data about the experimental setup recorded at 0 days post inoculation (0 dpi), linking each treatment unit to its faeces sample and fungal inoculum along with the initial faeces wet weight on the plate. It has
`r nrow(experiment_setup)` observations and `r ncol(experiment_setup)`
variables
```{r}
experiment_setup |>
head(3) |>
gt::gt() |>
gt::as_raw_html()
```
For an overview of the variable names, see the following table.
```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
dplyr::filter(file_name == "experiment_setup.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
### experiment_endpoint
The dataset `experiment_endpoint` contains data about the experimental measurements taken at 14 days post inoculation (14 dpi), including faeces wet and dry weights, pH, and bacterial indicator concentrations (E. coli, Enterococcus, total plate count) for each treatment unit. It has
`r nrow(experiment_endpoint)` observations and `r ncol(experiment_endpoint)`
variables
```{r}
experiment_endpoint |>
head(3) |>
gt::gt() |>
gt::as_raw_html()
```
For an overview of the variable names, see the following table.
```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
dplyr::filter(file_name == "experiment_endpoint.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
### faecal_measurements
The dataset `faecal_measurements` contains data about the characterization of each faeces sample at 0 days post inoculation (0 dpi), including total faeces weight, additive composition, pH, water content, and bacterial indicator concentrations (E. coli, Enterococcus, total plate count) averaged across three replicates. It has
`r nrow(faecal_measurements)` observations and `r ncol(faecal_measurements)`
variables
```{r}
faecal_measurements |>
head(3) |>
gt::gt() |>
gt::as_raw_html()
```
For an overview of the variable names, see the following table.
```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
dplyr::filter(file_name == "faecal_measurements.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
### inoculum_species
The dataset `inoculum_species` contains data about the fungal inocula used in the assay, providing the mapping from each inoculum identifier to the fungal species. It has
`r nrow(inoculum_species)` observations and `r ncol(inoculum_species)`
variables
```{r}
inoculum_species |>
head(3) |>
gt::gt() |>
gt::as_raw_html()
```
For an overview of the variable names, see the following table.
```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
dplyr::filter(file_name == "inoculum_species.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
### fungal_growth
The dataset `fungal_growth` contains time-series observations of fungal mycelium growth on each treatment unit, with one row per treatment-observation date. Variables include mycelium area, contamination metrics, and growth descriptors recorded at each timepoint. It has
`r nrow(fungal_growth)` observations and `r ncol(fungal_growth)`
variables
```{r}
fungal_growth |>
head(3) |>
gt::gt() |>
gt::as_raw_html()
```
For an overview of the variable names, see the following table.
```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
dplyr::filter(file_name == "fungal_growth.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
## Example
```{r, message=FALSE, warning=FALSE}
library(fungalgrowth)
library(ggplot2)
ggplot(fungal_growth, aes(x = dpi, y = area_size, group = id_treatment)) +
geom_line(alpha = 0.3) +
labs(
title = "Fungal mycelium growth over time",
x = "Days post inoculation",
y = "Area size (cm²)"
) +
theme_minimal()
```
## License
Data are available as
[CC-BY](https://github.com/Global-Health-Engineering/fungalgrowth/blob/main/LICENSE.md).
## Citation
Please cite this package using:
```{r}
citation("fungalgrowth")
```