-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram.html
More file actions
676 lines (643 loc) · 34.9 KB
/
program.html
File metadata and controls
676 lines (643 loc) · 34.9 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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
<!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.4.555">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>program</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 -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
</style>
<script src="site_libs/quarto-nav/quarto-nav.js"></script>
<script src="site_libs/clipboard/clipboard.min.js"></script>
<script src="site_libs/quarto-search/autocomplete.umd.js"></script>
<script src="site_libs/quarto-search/fuse.min.js"></script>
<script src="site_libs/quarto-search/quarto-search.js"></script>
<meta name="quarto:offset" content="./">
<link href="./images/logo.png" rel="icon" type="image/png">
<script src="site_libs/quarto-html/quarto.js"></script>
<script src="site_libs/quarto-html/popper.min.js"></script>
<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="site_libs/quarto-html/anchor.min.js"></script>
<link href="site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="site_libs/bootstrap/bootstrap.min.js"></script>
<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "sidebar",
"copy-button": false,
"collapse-after": 3,
"panel-placement": "start",
"type": "textbox",
"limit": 50,
"keyboard-shortcut": [
"f",
"/",
"s"
],
"show-item-context": false,
"language": {
"search-no-results-text": "No results",
"search-matching-documents-text": "matching documents",
"search-copy-link-title": "Copy link to search",
"search-hide-matches-text": "Hide additional matches",
"search-more-match-text": "more match in this document",
"search-more-matches-text": "more matches in this document",
"search-clear-button-title": "Clear",
"search-text-placeholder": "",
"search-detached-cancel-button-title": "Cancel",
"search-submit-button-title": "Submit",
"search-label": "Search"
}
}</script>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="quarto-search-results"></div>
<!-- content -->
<div id="quarto-content" class="quarto-container page-layout-custom">
<!-- sidebar -->
<!-- margin-sidebar -->
<!-- main -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg==" crossorigin="anonymous" referrerpolicy="no-referrer">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://getbootstrap.com/docs/5.2/assets/css/docs.css" rel="stylesheet">
<link href="https://unpkg.com/boxicons@2.1.1/css/boxicons.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cssslider.com/sliders/demo-16/engine1/style.css">
<link rel="stylesheet" href="http://cssslider.com/sliders/demo-16/engine1/ie.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script type="text/javascript" src="http://cssslider.com/sliders/demo-16/engine1/ie.js"></script>
<script type="text/javascript" src="https://cssslider.com/sliders/demo-16/engine1/gestures.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
<script src="https://unpkg.com/tippy.js@6.3.3/dist/tippy-bundle.umd.min.js"></script>
<script src="https://unpkg.com/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
<script src="https://unpkg.com/tippy.js@6.3.3/dist/tippy-bundle.umd.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/bwva/HTML-SpinnerElem/src/spinnerComponent.js"></script>
<div class="flex items-center justify-center w-full"><!--<div class="center"></div>--><nav class="navbar navbar-expand fixed-top py-md-0" id="navbarcolor">
<div class="container-fluid">
<a class="navbar-brand" href="#"><img src="./images/logo.png">
</a>
<!-- <button class="navbar-toggler p-4" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span>
</button>-->
<!-- <div class="collapse navbar-collapse" id="navbarSupportedContent">
--> <ul class="navbar-nav mx-auto"><li class="nav-item active"><a class="nav-link" href="./index.html">Home</a></li><li class="nav-item"><a class="nav-link" href="./instrument.html">Molecular BioLab</a></li><li class="nav-item"><a class="nav-link" href="./program.html">Computational Biology</a></li><li class="nav-item"><a class="nav-link" href="https://hprovax.github.io/DAiR2024.github.io/">Workshops</a></li><li class="nav-item"><a class="nav-link" href="./teach.html">Teaching</a></li><li class="nav-item"><a class="nav-link" href="./publication.html">Publication</a></li><li class="nav-item"><a class="nav-link" href="./about.html">About</a></li><!--<li class="nav-item"><a class="nav-link" href="contact.qmd">Contact</a></li>-->
</ul>
<!-- <form class="form-inline"><div class="form-group"><input class="form-control" type="search" placeholder="Search" aria-label="Search"><button class="btn btn-light" type="submit" style=" justify-content: center;
">Submit</button></div>
</form>-->
<!--<input class=".checkbox_humb" type=".checkbox">-->
<!--<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div> -->
<!--</div>--></div>
</nav><div class="blog-featured-image"><div class="my_pic_background"><div class="my_pic"><img src="images/itsme.jpeg" alt="Hamed Abdollahi"></div><div class="info my_pic_text">
<h1>Hamed Abdollahi</h1>
<h2>Molecular Biologist</h2>
<h3 id="card_subhead_I">Genomics Postdoctoral Fellow</h3>
<h3 id="card_subhead_II">DVM, PhD</h3>
</div><div class="my_pic_social"><div class="social-icons"><a href="mailto:hprovax@gmail.com" class="social-icon">
<i class="fa-solid fa-envelopes-bulk"></i>
</a>
<!--2nd-->
<a href="mailto:HA25@mailbox.sc.edu" class="social-icon ">
<i class="fa-sharp fa-solid fa-building-columns"></i>
</a>
<!--3nd-->
<a href="https://www.linkedin.com/in/hamed-abdollahi-15117079" class="social-icon">
<i class="fa-brands fa-linkedin"></i>
</a>
<!--4rd-->
<a href="https://github.com/HProVax" class="social-icon">
<i class="fa fa-github"></i>
</a>
<!--5th-->
<a href="https://scholar.google.com/citations?user=lXf0_H0AAAAJ&hl=en" class="social-icon">
<i class="fa-brands fa-google-scholar"></i>
</a>
<!--6th-->
<a href="https://orcid.org/0000-0002-2202-2193" class="social-icon">
<i class="fa-brands fa-orcid"></i>
</a>
<!--7th-->
<a href="https://maps.app.goo.gl/yTz8M8XeHsyMa3xk6" class="social-icon">
<i class="fa-solid fa-earth-americas"></i>
</a></div></div></div></div><div class="wrapper_inst"><wca-section-heading class="section-headline"><h2>Confidently, I Can Help Solve Your Lab’s Most Critical Challenges!</h2></wca-section-heading><div class="iso-certification_II" id="iso_II"><p>Welcome to the forefront of molecular biology innovation. As an experienced molecular biologist, I'm here to assist you through the complexities of laboratory research and help you overcome your most pressing challenges.</p></div><div class="row">
<div class="col-md-12">
<div class="page-content-html">
<p>With a powerful blend of programming expertise and extensive wet lab experience in genomics and proteomics, I am uniquely positioned to bridge the gap between laboratory science and computational analysis. My postdoctoral journey, building upon a robust foundation from my Ph.D., has propelled me into emerging scientific areas, particularly machine learning. Over the past three years as a genomics postdoctoral fellow at the College of Computer Science and Engineering at the University of South Carolina, I have significantly enhanced my programming skills, enabling me to analyze high-throughput data in genomics, proteomics, and protein structure with exceptional precision.
This experience has equipped me with advanced skills tailored specifically for research in genomics data analysis, encompassing everything from sequence analysis to network construction. My expertise extends to handling gene expression and gene methylation data, as well as exploring protein structure and the interactions of macromolecules—all critical components in the development of vaccines and pharmaceutical therapies. This multidisciplinary approach allows me to contribute to cutting-edge advancements in medical science, making me an invaluable asset in the pursuit of innovative solutions for vaccine and drug development.<br>
</p><p style="text-align:center"><a href="https://www.linux.org/pages/download/"><img src="images/Tux.svg.png" title="Linux" alt="Linux" width="400" height="417" loading="lazy"></a> <a href="https://www.r-project.org/"><img src="images/Rlogo.png" title="Rlogo.png" alt="Service" width="400" height="417" loading="lazy"></a> <a href="https://posit.co/download/rstudio-desktop/"><img src="images/RStudio.svg" title="RStudio.svg" alt="RStudio" width="400" height="417" loading="lazy"></a> <a href="https://www.bioconductor.org/"><img src="images/bioconductor_logo_cmyk.png" title="bioconductor_logo_cmyk" alt="bioconductor_logo_cmyk" width="750" height="417" loading="lazy"></a> <a href="https://www.python.org/"><img src="images/python.svg" title="Python" alt="python" width="400" height="417" loading="lazy"></a> <a href="https://biopython.org/"><img src="images/biopython_logo_s.png" title="Biopython" alt="biopython" width="400" height="417" loading="lazy"></a> <br><br>
Proficiently scripting within text-based environments ND using R and Python—two of the most prominent programming languages in the field—has enabled me to delve into the cutting-edge realms of artificial intelligence and machine learning. My expertise extends to leveraging the extensive libraries available in these languages in ways that align with biological research. This includes understanding complex biological systems and conducting detailed network analyses of proteins and genes, as well as their interactions.
Utilizing powerful tools such as Cytoscape for network analysis, alongside structural utilities like PyMOL and VMD, I am developing a comprehensive package that bridges the gap between biology and computational analysis. This package, which will soon be enhanced with GROMACS, underscores my commitment to integrating advanced computational techniques with biological research, driving forward innovative solutions in the field.
<br>
<a href="https://cytoscape.org/"><img src="images/cytoscape_logo_512.png" title="Network Analysis" alt="cytoscape" width="400" height="417" loading="lazy"></a> <a href="https://www.pymol.org/"><img src="images/PyMOL_logo.svg.png" title="PyMOL" alt="PyMOL" width="400" height="417" loading="lazy"></a> <a href="https://www.ks.uiuc.edu/Research/vmd/"><img src="images/vmd_logo_left.gif" title="Molecular Dynamics" alt="Struct Biology" width="800" height="417" loading="lazy"></a> <a href="https://www.gromacs.org/"><img src="images/gmx_logo_blue.png" title="Molecular Dynamics" alt="" width="800" height="417" loading="lazy"></a> <br>
In this rapidly evolving field, I have led five machine learning projects, starting with decision trees in Scikit-learn and advancing to sophisticated neural networks using PyTorch. My multidisciplinary approach, combining advanced programming, machine learning, and a deep understanding of biological systems, makes me an ideal candidate for driving innovations in vaccine and drug discovery. I am committed to pushing the boundaries of science and technology to contribute meaningfully to the development of life-saving medical advancements.<br>
<a href="https://pytorch.org/"><img src="images/Pytorch_logo.png" title="MachinLearning" alt="AI" width="900" height="417" loading="lazy"></a> <a href="https://scikit-learn.org/stable/"><img src="images/Scikitlogo.png" title="MachinLearning" alt="AI" width="900" height="417" loading="lazy"></a></p>
<p></p>
<!--item 1-->
<div class="row" style="padding-bottom:20px; ">
<div class="col-sm-3" style="margin-top:20px;width:50%;height:50%;"><img class="img-responsive" src="images/Primer.png" width="1254" height="954" loading="lazy" alt="Sequencing Data Analysis"></div>
<div class="col-sm-9"><h3><a href="">Primer Design</a></h3><p>With a deep understanding of PCR lab techniques and real-world sample analysis, paired with advanced programming skills, I can assist in designing custom assays and conducting phylogenetic analysis. My expertise allows me to support the creation of innovative products, services, and experiences that unlock new growth platforms and deliver significant business value.<em></em></p></div></div>
<!--item 2-->
<div class="row" style="padding-bottom:20px; ">
<div class="col-sm-3" style="margin-top:20px;width:50%;height:50%;"><img class="img-responsive" src="images/hires-miseq-right.jpg" width="1254" height="954" loading="lazy" alt="Sequencing Data Analysis"></div>
<div class="col-sm-9"><h3><a href="">Sequencing Data Analysis and Phylogeny
</a></h3><p>My extensive wet lab experience in sequencing has provided me with a profound understanding of sequencing data. When combined with my programming expertise, I am well-equipped to handle any type of sequencing data, perform precise alignments, conduct rigorous quality control checks, and prepare the data for advanced analysis. This unique skill set allows me to seamlessly integrate raw data into meaningful insights, driving research and innovation forward.<em></em></p></div></div>
<!--item 3-->
<div class="row" style="padding-bottom:20px; ">
<div class="col-sm-3" style="margin-top:20px;width:50%;height:50%;"><img class="img-responsive" src="images/DESeq2.png" width="754" height="754" loading="lazy" alt="Sequencing Data Analysis"></div>
<div class="col-sm-9"><h3><a href="">Gene Expression Data Analysis
</a></h3><p>My extensive wet lab experience in sequencing has given me a deep understanding of sequencing data. Combined with my programming skills, I am well-equipped to delve into any type of sequencing data, perform alignments, and conduct thorough quality control checks and prepare them for furthur advance<em>.</em></p></div></div>
<!--item 4-->
<div class="row" style="padding-bottom:20px; "><br>
<div class="col-sm-3" style="margin-top:20px;width:50%;height:50%;"><img class="img-responsive" src="images/pdb-logo.png" width="1054" height="754" loading="lazy" alt="Sequencing Data Analysis"></div>
<div class="col-sm-9"><h3><a href="">Computational Structural Biology</a></h3><p>Understanding the intricate structures of biomolecules, such as proteins, nucleic acids, and their complexes, requires the power of programming languages to unravel the complexities hidden within macromolecules. Leveraging state-of-the-art computational techniques, I have developed an all-in-one pipeline that covers every stage, from gene and construct design to the final determination of molecular structures.
My extensive background in structural biology, encompassing techniques such as X-ray crystallography and NMR spectroscopy, allows me to support and enhance research efforts in this field. Over the years, I have enriched my experience by solving the structures of various protein targets, contributing valuable insights into their function and interactions.<em></em></p></div></div>
<!--item 1-->
<div class="row" style="padding-bottom:20px; ">
<div class="col-sm-3" style="margin-top:20px;width:50%;height:50%;"><img class="img-responsive" src="images/Cytoscape_3.png" width="1254" height="569" loading="lazy" alt="Metabolomics Services"></div><div class="col-sm-9"><h3><a href="./services/metabolomics-service.htm">Cytoscape and Network Analysis</a></h3><p>Network analysis has become an essential approach for tackling complex, large-scale datasets in bioinformatics. Cytoscape, a widely used open-source software platform, is specifically designed for visualizing molecular interaction networks and biological pathways. This powerful tool not only allows for the visualization of intricate networks but also supports the integration of diverse data types, including annotations, gene expression profiles, and other state data. By providing a comprehensive view of biological systems, Cytoscape enhances our ability to understand and analyze the complexities of molecular interactions and their implications in various biological contexts.</p></div></div><hr></div></div></div>
<link href="incl/libs/validation/validationEngine.jquery.css" rel="stylesheet" type="text/css">
<script src="incl/libs/validation/jquery.validationEngine.js" type="text/javascript"></script>
<script src="incl/libs/validation/jquery.validationengine-en.js?nv=11032022_1225" type="text/javascript"></script>
<script type="text/javascript">
$(function () { //fileform
$('#side-inquiry-form').validationEngine('attach', { promptPosition: "topLeft" });
$('#side-inquiry-form [name=vcode]').bind('input propertychange', function () { $.$common.inquiryValidCodeFunc(this); });
});
</script>
</div>
</div>
</div>
<script>
function TypeWriting({ target, callback, speed, delay }) {
const originalHTML = target.innerHTML;
let visibleText = originalHTML.replace(/<[^>]+>/g, ''); // Extract visible text by removing HTML tags
let index = 0;
target.innerHTML = ''; // Clear existing content
function type() {
if (index < visibleText.length) {
// Find the next visible character
let char = visibleText.charAt(index);
target.innerHTML += char;
index++;
setTimeout(type, speed);
} else {
// Once typing is complete, restore the original HTML
target.innerHTML = originalHTML;
if (callback) {
setTimeout(callback, delay);
}
}
}
type();
}
function startTypewriting(id, speed, delay, isFirstRound = false) {
const element = document.getElementById(id);
if (element) {
TypeWriting({
target: element,
callback: function() {
console.log(`${id} typewriting finished`);
setTimeout(() => startTypewriting(id, speed, delay, true), 500); // Adjust the delay as needed
},
speed: speed,
delay: delay
});
}
}
document.addEventListener('DOMContentLoaded', () => {
startTypewriting('terminalprog', 10, 5000000); // Start typewriting on page load
});
startTypewriting(); // Ensure the function is called to start the typing effect
</script>
<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 isCodeAnnotation = (el) => {
for (const clz of el.classList) {
if (clz.startsWith('code-annotation-')) {
return true;
}
}
return false;
}
const clipboard = new window.ClipboardJS('.code-copy-button', {
text: function(trigger) {
const codeEl = trigger.previousElementSibling.cloneNode(true);
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
});
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();
});
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp('/' + window.location.host + '/');
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
maxWidth: 500,
delay: 100,
arrow: false,
appendTo: function(el) {
return el.parentElement;
},
interactive: true,
interactiveBorder: 10,
theme: 'quarto',
placement: 'bottom-start',
};
if (contentFn) {
config.content = contentFn;
}
if (onTriggerFn) {
config.onTrigger = onTriggerFn;
}
if (onUntriggerFn) {
config.onUntrigger = onUntriggerFn;
}
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);
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
const processXRef = (id, note) => {
// Strip column container classes
const stripColumnClz = (el) => {
el.classList.remove("page-full", "page-columns");
if (el.children) {
for (const child of el.children) {
stripColumnClz(child);
}
}
}
stripColumnClz(note)
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
if (note.children && note.children.length > 2) {
container.appendChild(note.children[0].cloneNode(true));
for (let i = 1; i < note.children.length; i++) {
const child = note.children[i];
if (child.tagName === "P" && child.innerText === "") {
continue;
} else {
container.appendChild(child.cloneNode(true));
break;
}
}
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(container);
}
return container.innerHTML
} else {
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
return note.innerHTML;
}
} else {
// Remove any anchor links if they are present
const anchorLink = note.querySelector('a.anchorjs-link');
if (anchorLink) {
anchorLink.remove();
}
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
// TODO in 1.5, we should make sure this works without a callout special case
if (note.classList.contains("callout")) {
return note.outerHTML;
} else {
return note.innerHTML;
}
}
}
for (var i=0; i<xrefs.length; i++) {
const xref = xrefs[i];
tippyHover(xref, undefined, function(instance) {
instance.disable();
let url = xref.getAttribute('href');
let hash = undefined;
if (url.startsWith('#')) {
hash = url;
} else {
try { hash = new URL(url).hash; } catch {}
}
if (hash) {
const id = hash.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note !== null) {
try {
const html = processXRef(id, note.cloneNode(true));
instance.setContent(html);
} finally {
instance.enable();
instance.show();
}
} else {
// See if we can fetch this
fetch(url.split('#')[0])
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.getElementById(id);
if (note !== null) {
const html = processXRef(id, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
} else {
// See if we can fetch a full url (with no hash to target)
// This is a special case and we should probably do some content thinning / targeting
fetch(url)
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.querySelector('main.content');
if (note !== null) {
// This should only happen for chapter cross references
// (since there is no id in the URL)
// remove the first header
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
note.children[0].remove();
}
const html = processXRef(null, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
}, function(instance) {
});
}
let selectedAnnoteEl;
const selectorForAnnotation = ( cell, annotation) => {
let cellAttr = 'data-code-cell="' + cell + '"';
let lineAttr = 'data-code-annotation="' + annotation + '"';
const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
return selector;
}
const selectCodeLines = (annoteEl) => {
const doc = window.document;
const targetCell = annoteEl.getAttribute("data-target-cell");
const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
const lines = annoteSpan.getAttribute("data-code-lines").split(",");
const lineIds = lines.map((line) => {
return targetCell + "-" + line;
})
let top = null;
let height = null;
let parent = null;
if (lineIds.length > 0) {
//compute the position of the single el (top and bottom and make a div)
const el = window.document.getElementById(lineIds[0]);
top = el.offsetTop;
height = el.offsetHeight;
parent = el.parentElement.parentElement;
if (lineIds.length > 1) {
const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
const bottom = lastEl.offsetTop + lastEl.offsetHeight;
height = bottom - top;
}
if (top !== null && height !== null && parent !== null) {
// cook up a div (if necessary) and position it
let div = window.document.getElementById("code-annotation-line-highlight");
if (div === null) {
div = window.document.createElement("div");
div.setAttribute("id", "code-annotation-line-highlight");
div.style.position = 'absolute';
parent.appendChild(div);
}
div.style.top = top - 2 + "px";
div.style.height = height + 4 + "px";
div.style.left = 0;
let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
if (gutterDiv === null) {
gutterDiv = window.document.createElement("div");
gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
gutterDiv.style.position = 'absolute';
const codeCell = window.document.getElementById(targetCell);
const gutter = codeCell.querySelector('.code-annotation-gutter');
gutter.appendChild(gutterDiv);
}
gutterDiv.style.top = top - 2 + "px";
gutterDiv.style.height = height + 4 + "px";
}
selectedAnnoteEl = annoteEl;
}
};
const unselectCodeLines = () => {
const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
elementsIds.forEach((elId) => {
const div = window.document.getElementById(elId);
if (div) {
div.remove();
}
});
selectedAnnoteEl = undefined;
};
// Handle positioning of the toggle
window.addEventListener(
"resize",
throttle(() => {
elRect = undefined;
if (selectedAnnoteEl) {
selectCodeLines(selectedAnnoteEl);
}
}, 10)
);
function throttle(fn, ms) {
let throttle = false;
let timer;
return (...args) => {
if(!throttle) { // first call gets through
fn.apply(this, args);
throttle = true;
} else { // all the others get throttled
if(timer) clearTimeout(timer); // cancel #2
timer = setTimeout(() => {
fn.apply(this, args);
timer = throttle = false;
}, ms);
}
};
}
// Attach click handler to the DT
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
for (const annoteDlNode of annoteDls) {
annoteDlNode.addEventListener('click', (event) => {
const clickedEl = event.target;
if (clickedEl !== selectedAnnoteEl) {
unselectCodeLines();
const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
if (activeEl) {
activeEl.classList.remove('code-annotation-active');
}
selectCodeLines(clickedEl);
clickedEl.classList.add('code-annotation-active');
} else {
// Unselect the line
unselectCodeLines();
clickedEl.classList.remove('code-annotation-active');
}
});
}
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>
<!-- /content -->
</body></html>