-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.html
255 lines (235 loc) · 9.17 KB
/
README.html
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.2.267">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>readme</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
</style>
<script src="README_files/libs/clipboard/clipboard.min.js"></script>
<script src="README_files/libs/quarto-html/quarto.js"></script>
<script src="README_files/libs/quarto-html/popper.min.js"></script>
<script src="README_files/libs/quarto-html/tippy.umd.min.js"></script>
<script src="README_files/libs/quarto-html/anchor.min.js"></script>
<link href="README_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="README_files/libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="README_files/libs/bootstrap/bootstrap.min.js"></script>
<link href="README_files/libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="README_files/libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
</head>
<body class="fullcontent">
<div id="quarto-content" class="page-columns page-rows-contents page-layout-article">
<main class="content" id="quarto-document-content">
<section id="toxsummary" class="level1">
<h1>toxSummary</h1>
<section id="overview" class="level2">
<h2 class="anchored" data-anchor-id="overview">Overview</h2>
<p>Visualize and Summarize Nonclinical Study Results</p>
</section>
<section id="how-to-run-the-app" class="level2">
<h2 class="anchored" data-anchor-id="how-to-run-the-app">How to run the app</h2>
<p>Clone the repo and set repo as working directory. Open app.R file (or copy code given below) and run all the code.</p>
<pre><code>pkgload::load_all(".")
db_path <- "test_data/test_db.db"
study_list_path <- "test_data/IND_with_studies_2.csv"
toxSummary::toxSummary_app(
database_path = db_path,
studyid_file = study_list_path,
save_file_path = NULL
)</code></pre>
<p>This will open toxSummary app.<br>
The default/example database (in “test_data/test_db.db” directory) only contain few studies. To connect your database <code>pkgload::load_all(".") toxSummary::toxSummary_app( database_path = "path/of/your/database.db", studyid_file = "path/for/IND_studyid_mapping.csv", save_file_path = NULL )</code></p>
</section>
<section id="when-published-in-public-repo-github" class="level2">
<h2 class="anchored" data-anchor-id="when-published-in-public-repo-github">When published in public repo (GitHub)</h2>
<p>This can be install like a R package</p>
<pre><code># install devtools if already not installed
install.packages("devtools")
#install toxSummary package
devtools::install_github('phuse-org/toxSummary')</code></pre>
<p>then run</p>
<pre><code>toxSummary::toxSummary_app(
database_path = "path/of/your/database.db",
studyid_file = "path/for/IND_studyid_mapping.csv",
save_file_path = NULL
)</code></pre>
<p><code>database_path = "path/of/your/database.db"</code><br>
<code>studyid_file = "path/for/IND_studyid_mapping.csv"</code><br>
Both argument are mandatory when running the function from package.<br>
Package does not contain database. Database is too big for a package.</p>
</section>
<section id="deploy-the-app-wip" class="level2">
<h2 class="anchored" data-anchor-id="deploy-the-app-wip">Deploy the app (WIP)</h2>
<section id="from-cloned-repo" class="level3">
<h3 class="anchored" data-anchor-id="from-cloned-repo">from cloned repo:</h3>
<p>Deploying Shiny app as package is little different. There is not publish button when you open app.R file in RStudio.<br>
<strong>crate manifest.json file</strong> - shinyappsio<br>
<code>rsconnect::deployApp()</code> - rsconnect<br>
<code>rsconnect::deployApp()</code></p>
</section>
<section id="from-the-installed-package" class="level3">
<h3 class="anchored" data-anchor-id="from-the-installed-package">From the installed package</h3>
<p>app.R file not included in the package. first create app.R file in the working directory.<br>
Then copy the code from here and change the database and file paths.</p>
<pre><code> toxSummary::toxSummary_app(
database_path = "path/of/your/database.db",
studyid_file = "path/for/IND_studyid_mapping.csv",
save_file_path = NULL)</code></pre>
</section>
</section>
<section id="demo-app" class="level2">
<h2 class="anchored" data-anchor-id="demo-app">Demo App</h2>
<p>A demo app can be found here</p>
<p><a href="https://yousuf28.shinyapps.io/toxsummary">Demo Shiny App_updated</a></p>
<p>older version of the app<br>
<a href="https://phuse-org.shinyapps.io/toxSummary/">Demo Shiny App</a></p>
</section>
</section>
</main>
<!-- /main column -->
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
const toggleBodyColorMode = (bsSheetEl) => {
const mode = bsSheetEl.getAttribute("data-mode");
const bodyEl = window.document.querySelector("body");
if (mode === "dark") {
bodyEl.classList.add("quarto-dark");
bodyEl.classList.remove("quarto-light");
} else {
bodyEl.classList.add("quarto-light");
bodyEl.classList.remove("quarto-dark");
}
}
const toggleBodyColorPrimary = () => {
const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
if (bsSheetEl) {
toggleBodyColorMode(bsSheetEl);
}
}
toggleBodyColorPrimary();
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {
placement: 'right',
icon: icon
};
anchorJS.add('.anchored');
const clipboard = new window.ClipboardJS('.code-copy-button', {
target: function(trigger) {
return trigger.previousElementSibling;
}
});
clipboard.on('success', function(e) {
// button target
const button = e.trigger;
// don't keep focus
button.blur();
// flash "checked"
button.classList.add('code-copy-button-checked');
var currentTitle = button.getAttribute("title");
button.setAttribute("title", "Copied!");
let tooltip;
if (window.bootstrap) {
button.setAttribute("data-bs-toggle", "tooltip");
button.setAttribute("data-bs-placement", "left");
button.setAttribute("data-bs-title", "Copied!");
tooltip = new bootstrap.Tooltip(button,
{ trigger: "manual",
customClass: "code-copy-button-tooltip",
offset: [0, -8]});
tooltip.show();
}
setTimeout(function() {
if (tooltip) {
tooltip.hide();
button.removeAttribute("data-bs-title");
button.removeAttribute("data-bs-toggle");
button.removeAttribute("data-bs-placement");
}
button.setAttribute("title", currentTitle);
button.classList.remove('code-copy-button-checked');
}, 1000);
// clear code selection
e.clearSelection();
});
function tippyHover(el, contentFn) {
const config = {
allowHTML: true,
content: contentFn,
maxWidth: 500,
delay: 100,
arrow: false,
appendTo: function(el) {
return el.parentElement;
},
interactive: true,
interactiveBorder: 10,
theme: 'quarto',
placement: 'bottom-start'
};
window.tippy(el, config);
}
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
for (var i=0; i<noterefs.length; i++) {
const ref = noterefs[i];
tippyHover(ref, function() {
// use id or data attribute instead here
let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
});
}
const findCites = (el) => {
const parentEl = el.parentElement;
if (parentEl) {
const cites = parentEl.dataset.cites;
if (cites) {
return {
el,
cites: cites.split(' ')
};
} else {
return findCites(el.parentElement)
}
} else {
return undefined;
}
};
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
for (var i=0; i<bibliorefs.length; i++) {
const ref = bibliorefs[i];
const citeInfo = findCites(ref);
if (citeInfo) {
tippyHover(citeInfo.el, function() {
var popup = window.document.createElement('div');
citeInfo.cites.forEach(function(cite) {
var citeDiv = window.document.createElement('div');
citeDiv.classList.add('hanging-indent');
citeDiv.classList.add('csl-entry');
var biblioDiv = window.document.getElementById('ref-' + cite);
if (biblioDiv) {
citeDiv.innerHTML = biblioDiv.innerHTML;
}
popup.appendChild(citeDiv);
});
return popup.innerHTML;
});
}
}
});
</script>
</div> <!-- /content -->
</body></html>