-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpanelapp.Rmd
85 lines (70 loc) · 2.61 KB
/
panelapp.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
---
title: 'PanRank - PanelApp Australia'
css: styles.css
---
<div class="data-container">
<div id="description">
This page contains **PanRank** candidate gene rankings based on gene panels from [PanelApp Australia](https://panelapp.agha.umccr.org/). [PanelApp](https://panelapp.agha.umccr.org/) is a crowdsourcing tool to allow gene panels to be shared, downloaded, viewed and evaluated by the Scientific Community. PanRank scores are between 0 and 1 and represent the predicted probability that a gene is disease-causing with the specified mode of inheritance. The "Known Inheritance" column indicates the known mode of inheritance used to train the model.
Choose the PanelApp panel and gene subset below. By default, genes are
sorted by decreasing PanRank Dominant score, and only genes not
yet associated with the selected phenotype ("novel" genes) are shown.
Hover over gene names for a description as well as links to external resources.
</div>
<div id="roc-plot" style="width:265px;height:275px;"></div>
</div>
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
library(tidyverse)
make_select_script <- function(named_files, label) {
str_c(
'<script>',
'function makeSelect() {',
str_c('return \'<label for="file-select">', label, ':</label>\' +'),
'\'<select id="file-select" class="custom-select">\' +',
str_c('\'<option value="', named_files, '">', names(named_files), '</option> \' +', collapse = '\n'),
'\'</select>\';',
'}',
'</script>',
sep = '\n'
)
}
make_doc_ready_script <- function(fixedUrl, initUrl) {
str_c(
'<script>',
'$(document).ready(function() {',
str_c('const fixedUrl = "', fixedUrl, '";'),
str_c('const initUrl = "', initUrl, '";'),
'loadData(fixedUrl, initUrl);',
'});',
'</script>',
sep = '\n'
)
}
```
```{r, results='asis'}
paa_names <- read_tsv('data/paa_names.tsv') %>% with(setNames(name, id))
files <-
list.files('data', pattern = '.csv.gz$', full.names = T) %>%
keep(str_detect, 'PAA_') %>%
discard(str_detect, '.roc.') %>%
discard(str_detect, "fixed.csv.gz") %>%
setNames(., str_remove(basename(.), '.csv.gz$'))
names(files) <- paa_names[names(files)]
cat(
read_file(
'template.html'
),
make_select_script(
named_files = files,
label = 'Panel'
)
# make_doc_ready_script(
# fixedUrl = "data/fixed.csv.gz",
# initUrl = files[1]
# )
)
```
---
PanRank is developed by [Jacob E. Munro](https://orcid.org/0000-0002-2751-0989), [Mark F.
Bennett](https://orcid.org/0000-0002-3561-6804) and [Melanie
Bahlo](https://orcid.org/0000-0001-5132-0774)