-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.Rmd
257 lines (203 loc) · 8.3 KB
/
index.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
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
248
249
250
251
252
253
254
255
256
257
---
# *============================================================================*
# UNIVERSITY OF MELBOURNE RMARKDOWN THESIS
# *============================================================================*
# +----------------------------------------------------------------------------+
# This bookdown template can be used to create a thesis for the University of
# Melbourne.
#
# This document defines all the metadata associated with the thesis in a YAML
# (YAML Ain't Markup Language) header. Your text should be placed in other
# RMarkdown documents (usually one per chapter). Edit the `_bookdown.yml` file
# to change the order etc. of the other files. See
# https://bookdown.org/yihui/bookdown/ for more details on how to use bookdown.
# +----------------------------------------------------------------------------+
# +----------------------------------------------------------------------------+
# Changes:
#
# 2018-10-11 (Luke Zappia)
# * Create first draft RMarkdown template file
# +----------------------------------------------------------------------------+
# *============================================================================*
# TITLE PAGE
# *============================================================================*
# +-----Title------------------------------------------------------------------+
title: "Tools and techniques for single-cell RNA sequencing data"
# +-----Author-----------------------------------------------------------------+
author: "Luke Zappia"
letters: "B.Sc, M.Sc"
orcid: "0000-0001-7744-8565"
# +-----Degree-----------------------------------------------------------------+
degree: "Doctor of Philosophy"
# +-----Submission date--------------------------------------------------------+
# By default these are set based on when the document is built but that they
# also be manually controlled.
# +----------------------------------------------------------------------------+
submissionmonth: "`r format(Sys.Date(), '%B')`"
submissionyear: "`r format(Sys.Date(), '%Y')`"
# +-----Institute--------------------------------------------------------------+
# Whatever is in the `department` field is placed first with the `university`
# below it. If you are associated with multiple departments/institutes you
# might need to adjust the format or consider how to include your information.
# +----------------------------------------------------------------------------+
department: "School of Biosciences"
university: "The University of Melbourne"
# +-----Statement--------------------------------------------------------------+
statement: |
Submitted in Total Fulfillment of the Requirements of the Degree of Doctor of
Philosophy
# *============================================================================*
# FRONT MATTER
#
# Other sections that come after the title page but before the main text.
#
# By default these are pulled from other files (for PDF output) but they can
# also be included directly here. Setting any of these sections to `FALSE` will
# remove them from the final document.
# *============================================================================*
# +-----Abstract---------------------------------------------------------------+
abstract: |
`r if(knitr:::is_latex_output()) paste(readLines("0-frontmatter/01-abstract.Rmd"), collapse = "\n ")`
# +-----Declaration------------------------------------------------------------+
declaration: |
`r if(knitr:::is_latex_output()) paste(readLines("0-frontmatter/02-declaration.Rmd"), collapse = "\n ")`
# +-----Preface----------------------------------------------------------------+
preface: |
`r if(knitr:::is_latex_output()) paste(readLines("0-frontmatter/03-preface.Rmd"), collapse = "\n ")`
# +-----Acknowledgements-------------------------------------------------------+
acknowledgements: |
`r if(knitr:::is_latex_output()) paste(readLines("0-frontmatter/04-acknowledgements.Rmd"), collapse = "\n ")`
# +-----List of tables---------------------------------------------------------+
# Should only be included if you have at least 10 tables
# +----------------------------------------------------------------------------+
lot: false
# +-----List of figures--------------------------------------------------------+
# Should only be included if you have at least 10 figures
# +----------------------------------------------------------------------------+
lof: true
# +-----List of copyright------------------------------------------------------+
# List of all third party copyright material included in the thesis and whether
# permissions have been obtained to include this content in the open access
# version of the thesis.
# +----------------------------------------------------------------------------+
copyrightlist: |
`r if(knitr:::is_latex_output()) paste(readLines("0-frontmatter/05-copyrightlist.Rmd"), collapse = "\n ")`
# *============================================================================*
# CITATIONS
# *============================================================================*
# +-----Bibliography-----------------------------------------------------------+
# Export your bibliography database as a bibtex file and refer to it here.
# +----------------------------------------------------------------------------+
bibliography:
- "bib/references.bib"
- "bib/packages.bib"
- "bib/analysis-references.bib"
- "bib/analysis-packages.bib"
# +-----Citation style---------------------------------------------------------+
# To change your citation style download a Citation Style Language file from
# https://www.zotero.org/styles and refer to it to change the appearance of
# your citations. See https://citationstyles.org/ for more details.
# +----------------------------------------------------------------------------+
csl: "style/my-brackets-style.csl"
# *============================================================================*
# OUTPUT FORMATS
#
# These options control the various output formats. You may be able to control
# some things but editing these, other things will require editing the template
# files or the underlying functions.
# *============================================================================*
knit: "bookdown::render_book"
site: "bookdown::bookdown_site"
output:
bookdown::pdf_book:
template: "style/template.tex"
toc: true
toc_depth: 3
keep_tex: TRUE
pandoc_args: [
"--wrap", "none",
"--top-level-division", "chapter"
]
unimelbdown::thesis_gitbook: default
unimelbdown::thesis_word:
reference_docx: "style/template.docx"
toc: true
toc_depth: 3
fig_caption: true
unimelbdown::thesis_epub: default
---
```{r knitr-options, include = FALSE}
options(knitr.graphics.auto_pdf = TRUE)
knitr::opts_chunk$set(
echo = FALSE,
warning = FALSE,
message = FALSE,
error = FALSE,
cache = FALSE,
fig.ext = "png",
fig.path = "figures/",
fig.align = "center",
out.width = "80%"
)
```
```{r libraries}
# File paths
library("here")
# Plotting
library("ggplot2")
library("cowplot")
library("RColorBrewer")
# Clustering trees
library("clustree")
# JSON
library("jsonlite")
# Strings
library("stringr")
# File IO
library("readr")
# Presentation
library("knitr")
# Manipulation
library("dplyr")
library("tidyr")
```
```{r source}
source("R/tools_plots.R")
source("R/analytics_plots.R")
source("R/utils.R")
```
```{r doctype}
tex <- TRUE
docx <- FALSE
html <- FALSE
if (!knitr:::is_latex_output()) {
tex <- FALSE
if (knitr:::is_html_output()) {
html <- TRUE
} else {
docx <- TRUE
}
}
```
```{r palette}
pal <- c(pink = "#EC008C", # Pink
blue = "#00ADEF", # Blue
green = "#8DC63F", # Green
teal = "#00B7C6", # Teal
orange = "#F47920", # Orange
purple = "#7A52C7", # Purple
grey = "#999999") # Grey
phase_pal <- c(brewer.pal(5, "Set1"), "#999999")
```
```{r load-tools}
tools_path <- here("data/tools-table.json")
tools <- read_json(tools_path, simplifyVector = TRUE) %>%
select(-Refs) %>%
mutate(Added = as.Date(Added),
Updated = as.Date(Updated))
tools_date <- "1 August 2019"
n_tools <- nrow(tools)
n_tools_new <- n_tools - 232
n_tools_floor <- floor(n_tools / 10) * 10
```
`r if(html) '# Front matter {-}'`