From f53061adedfee5d2c695c1ed4c89114e7d7d20b8 Mon Sep 17 00:00:00 2001 From: Emma Rand Date: Thu, 5 Oct 2023 19:12:31 +0100 Subject: [PATCH] add core 2 workshop --- _site/core/core.html | 232 +- _site/core/week-2/data/1cq2.pdb | 3177 +++++ .../data/Y101_Y102_Y201_Y202_Y101-5.csv | 1699 +++ _site/core/week-2/data/control_merged.tif | Bin 0 -> 1261484 bytes _site/core/week-2/data/tf_lthsc.csv | 444 + _site/core/week-2/data/xlaevis_counts_S30.csv | 11894 ++++++++++++++++ _site/core/week-2/images/JennyBryan.jpg | Bin 0 -> 24506 bytes _site/core/week-2/overview.html | 248 +- _site/core/week-2/study_after_workshop.html | 336 +- _site/core/week-2/study_before_workshop.html | 780 +- _site/core/week-2/workshop.html | 459 +- .../figure-html/unnamed-chunk-3-1.png | Bin 0 -> 194971 bytes .../week-3/images/fastaq_file_format.png | Bin _site/omics/week-3/study_before_workshop.html | 1479 +- _site/search.json | 565 +- _site/site_libs/bootstrap/bootstrap.min.css | 10 +- .../font-awesome/LICENSE.txt | 34 + .../font-awesome/css/all.css | 5 + .../font-awesome/css/brands.css | 5 + .../font-awesome/css/fontawesome.css | 5 + .../font-awesome/css/regular.css | 5 + .../font-awesome/css/solid.css | 5 + .../font-awesome/css/svg-with-js.css | 5 + .../font-awesome/css/v4-shims.css | 2170 +++ .../font-awesome/css/v4-shims.min.css | 5 + .../font-awesome/webfonts/fa-brands-400.eot | Bin 0 -> 115052 bytes .../font-awesome/webfonts/fa-brands-400.svg | 1127 ++ .../font-awesome/webfonts/fa-brands-400.ttf | Bin 0 -> 114816 bytes .../font-awesome/webfonts/fa-brands-400.woff | Bin 0 -> 73920 bytes .../font-awesome/webfonts/fa-regular-400.eot | Bin 0 -> 40744 bytes .../font-awesome/webfonts/fa-regular-400.svg | 467 + .../font-awesome/webfonts/fa-regular-400.ttf | Bin 0 -> 40516 bytes .../font-awesome/webfonts/fa-regular-400.woff | Bin 0 -> 18212 bytes .../webfonts/fa-regular-400.woff2 | Bin 0 -> 14952 bytes .../font-awesome/webfonts/fa-solid-900.eot | Bin 0 -> 160768 bytes .../font-awesome/webfonts/fa-solid-900.svg | 2231 +++ .../font-awesome/webfonts/fa-solid-900.ttf | Bin 0 -> 160548 bytes .../font-awesome/webfonts/fa-solid-900.woff | Bin 0 -> 76632 bytes .../font-awesome/webfonts/fa-solid-900.woff2 | Bin 0 -> 59572 bytes .../reveal-chalkboard/img/blackboard.png | Bin 0 -> 32733 bytes .../img/boardmarker-black.png | Bin 0 -> 2142 bytes .../img/boardmarker-blue.png | Bin 0 -> 2127 bytes .../img/boardmarker-green.png | Bin 0 -> 2106 bytes .../img/boardmarker-orange.png | Bin 0 -> 2240 bytes .../img/boardmarker-purple.png | Bin 0 -> 2044 bytes .../reveal-chalkboard/img/boardmarker-red.png | Bin 0 -> 2119 bytes .../reveal-chalkboard/img/chalk-blue.png | Bin 0 -> 5150 bytes .../reveal-chalkboard/img/chalk-green.png | Bin 0 -> 4801 bytes .../reveal-chalkboard/img/chalk-orange.png | Bin 0 -> 5010 bytes .../reveal-chalkboard/img/chalk-purple.png | Bin 0 -> 5250 bytes .../reveal-chalkboard/img/chalk-red.png | Bin 0 -> 4786 bytes .../reveal-chalkboard/img/chalk-white.png | Bin 0 -> 5199 bytes .../reveal-chalkboard/img/chalk-yellow.png | Bin 0 -> 5097 bytes .../plugin/reveal-chalkboard/plugin.js | 1985 +++ .../plugin/reveal-chalkboard/plugin.yml | 7 + .../plugin/reveal-chalkboard/style.css | 44 + .../reveal-highlightword/highlightword.js | 81 + .../site_libs/twitter-widget-0.0.1/widgets.js | 8 + _site/styles.css | 1 + core/week-2/chalkboard.json | 1 - core/week-2/data/1cq2.pdb | 3177 +++++ .../data/Y101_Y102_Y201_Y202_Y101-5.csv | 1699 +++ core/week-2/data/control_merged.tif | Bin 0 -> 1261484 bytes core/week-2/data/tf_lthsc.csv | 444 + core/week-2/data/trna_expr.csv | 1181 ++ core/week-2/data/xlaevis_counts_S30.csv | 11894 ++++++++++++++++ core/week-2/images/fastaq_file_format.png | Bin 0 -> 49333 bytes core/week-2/workshop.qmd | 238 +- login-key-nerc-metagenomics-instance-emma.pem | 27 + omics/week-3/images/fastaq_file_format.png | Bin 0 -> 49333 bytes omics/week-3/study_before_workshop.qmd | 2 +- renv.lock | 108 +- renv/activate.R | 69 +- test.R | 34 + 74 files changed, 47257 insertions(+), 1130 deletions(-) create mode 100644 _site/core/week-2/data/1cq2.pdb create mode 100644 _site/core/week-2/data/Y101_Y102_Y201_Y202_Y101-5.csv create mode 100644 _site/core/week-2/data/control_merged.tif create mode 100644 _site/core/week-2/data/tf_lthsc.csv create mode 100644 _site/core/week-2/data/xlaevis_counts_S30.csv create mode 100644 _site/core/week-2/images/JennyBryan.jpg create mode 100644 _site/core/week-2/workshop_files/figure-html/unnamed-chunk-3-1.png rename omics/week-3/images/fasta_file_format_l2.png => _site/omics/week-3/images/fastaq_file_format.png (100%) create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/LICENSE.txt create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/all.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/brands.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/fontawesome.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/regular.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/solid.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/svg-with-js.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/v4-shims.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/v4-shims.min.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-brands-400.eot create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-brands-400.svg create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-brands-400.ttf create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-brands-400.woff create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-regular-400.eot create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-regular-400.svg create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-regular-400.ttf create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-regular-400.woff create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-regular-400.woff2 create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-solid-900.eot create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-solid-900.svg create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-solid-900.ttf create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-solid-900.woff create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/webfonts/fa-solid-900.woff2 create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/blackboard.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/boardmarker-black.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/boardmarker-blue.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/boardmarker-green.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/boardmarker-orange.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/boardmarker-purple.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/boardmarker-red.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/chalk-blue.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/chalk-green.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/chalk-orange.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/chalk-purple.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/chalk-red.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/chalk-white.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/img/chalk-yellow.png create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/plugin.js create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/plugin.yml create mode 100644 _site/site_libs/revealjs/plugin/reveal-chalkboard/style.css create mode 100644 _site/site_libs/revealjs/plugin/reveal-highlightword/highlightword.js create mode 100644 _site/site_libs/twitter-widget-0.0.1/widgets.js delete mode 100644 core/week-2/chalkboard.json create mode 100644 core/week-2/data/1cq2.pdb create mode 100644 core/week-2/data/Y101_Y102_Y201_Y202_Y101-5.csv create mode 100644 core/week-2/data/control_merged.tif create mode 100644 core/week-2/data/tf_lthsc.csv create mode 100644 core/week-2/data/trna_expr.csv create mode 100644 core/week-2/data/xlaevis_counts_S30.csv create mode 100644 core/week-2/images/fastaq_file_format.png create mode 100644 login-key-nerc-metagenomics-instance-emma.pem create mode 100644 omics/week-3/images/fastaq_file_format.png create mode 100644 test.R diff --git a/_site/core/core.html b/_site/core/core.html index 1ef3cd4..66a96e4 100644 --- a/_site/core/core.html +++ b/_site/core/core.html @@ -2,7 +2,7 @@ - + @@ -47,6 +47,12 @@ "panel-placement": "end", "type": "overlay", "limit": 20, + "keyboard-shortcut": [ + "f", + "/", + "s" + ], + "show-item-context": false, "language": { "search-no-results-text": "No results", "search-matching-documents-text": "matching documents", @@ -71,7 +77,7 @@
@@ -247,7 +253,7 @@

On this page

  • Content
  • @@ -269,7 +275,7 @@

    Core Data Analysis

    Published
    -

    28 September, 2023

    +

    3 October, 2023

    @@ -277,27 +283,21 @@

    Core Data Analysis

    + +

    Content

    There are three workshops taken by everyone on BIO00088H and BIO00070M. These are in weeks 1, 2 and 6. The first two cover some useful workflow tips and how to organise your analyses effectively so they are reproducible but you will also have the chance to revise material from stage 1 and 2.

    Good organisation is important because you will want to be able to set work aside for holidays and assessment periods and then restart easily. You will also be assessed on the organisation, reproducibility and transparency of your work.

    Week 1 Core 1 Organising reproducible data analyses

    -

    This week you will revise some essential concepts for scientific computing: file system organisation, file types, working directories and paths. The workshop will cover a rationale for working reproducibly, project oriented workflow, naming things and documenting your work. We will also examine some file types and the concept of tidy data.

    +

    This week you will revise some essential concepts for scientific computing: file system organisation, file types, working directories and paths. The workshop will cover a rationale for working reproducibly, project oriented workflow, naming things and documenting your work.

    -
    -

    Week 2 Core 2 Workflow tips

    - - - - - - - - - +
    +

    Week 2 Core 2 File types, workflow tips and other tools

    +

    This week we will consider File types, workflow tips and other tools. The independent study (~20 mins) reiterates the value of RStudio projects and shows you how you create them with usethis. You will also learn how to recognise and write cool 😎 code, not 😩 ugly code and code algorithmically. In the workshop we will examine some common biological data formats and discover some awesome short cuts to help you write cool 😎 code. You will also get a brief introduction to the command line and Google Colab.

    @@ -308,7 +308,6 @@

    Week - @@ -400,10 +399,9 @@

    Week // clear code selection e.clearSelection(); }); - function tippyHover(el, contentFn) { + function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) { const config = { allowHTML: true, - content: contentFn, maxWidth: 500, delay: 100, arrow: false, @@ -413,8 +411,17 @@

    Week interactive: true, interactiveBorder: 10, theme: 'quarto', - placement: 'bottom-start' + 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"]'); @@ -428,6 +435,128 @@

    Week const note = window.document.getElementById(id); return note.innerHTML; }); + } + 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) + const typesetMath = (el) => { + if (window.MathJax) { + // MathJax Typeset + window.MathJax.typeset([el]); + } else if (window.katex) { + // KaTeX Render + var mathElements = el.getElementsByClassName("math"); + var macros = []; + for (var i = 0; i < mathElements.length; i++) { + var texText = mathElements[i].firstChild; + if (mathElements[i].tagName == "SPAN") { + window.katex.render(texText.data, mathElements[i], { + displayMode: mathElements[i].classList.contains('display'), + throwOnError: false, + macros: macros, + fleqn: false + }); + } + } + } + } + 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) { + for (let i = 0; i < 2; i++) { + container.appendChild(note.children[i].cloneNode(true)); + } + typesetMath(container); + return container.innerHTML + } else { + 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(); + } + typesetMath(note); + return note.innerHTML; + } + } + for (var i=0; i 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) => { @@ -470,6 +599,7 @@

    Week } 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"); @@ -495,6 +625,32 @@

    Week }); 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) { @@ -553,12 +709,13 @@

    Week } } var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); + var mailtoRegex = new RegExp(/^mailto:/); var filterRegex = new RegExp("^(?:http:|https:)\/\/3mmarand\.github\.io\/BIO00088H-data"); var isInternal = (href) => { - return filterRegex.test(href) || localhostRegex.test(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)'); + 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; iWeek