Skip to content

Commit

Permalink
quarto week 11
Browse files Browse the repository at this point in the history
  • Loading branch information
3mmaRand committed Dec 3, 2023
1 parent bbc53b7 commit 002cc9a
Show file tree
Hide file tree
Showing 37 changed files with 5,580 additions and 1,066 deletions.
666 changes: 666 additions & 0 deletions _site/core/week-11/example.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 12 additions & 120 deletions _site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="generator" content="quarto-1.3.450">
<meta name="generator" content="quarto-1.2.269">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="author" content="Emma Rand">
<title>Data Analysis for Group Project - Data Analysis for the Group Research Project</title>
Expand All @@ -15,7 +15,7 @@
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 */
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
</style>
Expand Down Expand Up @@ -51,8 +51,7 @@
"search-more-matches-text": "more matches in this document",
"search-clear-button-title": "Clear",
"search-detached-cancel-button-title": "Cancel",
"search-submit-button-title": "Submit",
"search-label": "Search"
"search-submit-button-title": "Submit"
}
}</script><link rel="stylesheet" href="styles.css">
</head>
Expand All @@ -65,29 +64,25 @@
<span class="navbar-title">Data Analysis for Group Project</span>
</a>
</div>
<div id="quarto-search" class="" title="Search"></div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link active" href="./index.html" rel="" target="" aria-current="page">
<a class="nav-link active" href="./index.html" aria-current="page">
<span class="menu-text">Welcome!</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="./core/core.html" rel="" target="">
<a class="nav-link" href="./core/core.html">
<span class="menu-text">Core</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="./omics/omics.html" rel="" target="">
<a class="nav-link" href="./omics/omics.html">
<span class="menu-text">Omics</span></a>
</li>
</ul>
<div class="quarto-navbar-tools ms-auto">
<a href="https://twitter.com/er_13" rel="" title="Emma's Twitter" class="quarto-navigation-tool px-1" aria-label="Emma's Twitter"><i class="bi bi-twitter"></i></a>
<a href="https://github.com/3mmaRand/BIO00088H-data" rel="" title="BIO00088H-data GitHub" class="quarto-navigation-tool px-1" aria-label="BIO00088H-data GitHub"><i class="bi bi-github"></i></a>
</div>
<div id="quarto-search" class="" title="Search"></div>
</div> <!-- /navcollapse -->
</div> <!-- /container-fluid -->
</nav></header><!-- content --><div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
Expand Down Expand Up @@ -120,7 +115,7 @@ <h1 class="title">Data Analysis for the Group Research Project</h1>
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">30 September, 2023</p>
<p class="date">6 October, 2023</p>
</div>
</div>

Expand Down Expand Up @@ -248,23 +243,9 @@ <h1 class="title">Data Analysis for the Group Research Project</h1>
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;
target: function(trigger) {
return trigger.previousElementSibling;
}
});
clipboard.on('success', function(e) {
Expand Down Expand Up @@ -329,92 +310,6 @@ <h1 class="title">Data Analysis for the Group Research Project</h1>
return note.innerHTML;
});
}
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";
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;
};
// 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) {
Expand Down Expand Up @@ -453,12 +348,12 @@ <h1 class="title">Data Analysis for the Group Research Project</h1>
}
}
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var filterRegex = new RegExp("^(?:http:|https:)\/\/3mmarand\.github\.io\/BIO00088H-data");
var filterRegex = new RegExp(/^(?:http:|https:)\/\/3mmarand\.github\.io\/BIO00088H-data/);
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.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: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)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
Expand All @@ -471,9 +366,6 @@ <h1 class="title">Data Analysis for the Group Research Project</h1>
</div> <!-- /content -->
<footer class="footer"><div class="nav-footer">
<div class="nav-footer-left">Rand E (2023). Data Analysis for Group Project. <a href="https://3mmarand.github.io/BIO00088H-data/" class="uri">https://3mmarand.github.io/BIO00088H-data/</a>.</div>
<div class="nav-footer-center">
&nbsp;
</div>
<div class="nav-footer-right">
<ul class="footer-items list-unstyled">
<li class="nav-item compact">
Expand Down
7 changes: 7 additions & 0 deletions _site/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,5 +1760,12 @@
"title": "Workshop",
"section": "Visualise all the results with a volcano plot",
"text": "Visualise all the results with a volcano plot\ncolour the points if FDR < 0.05 and prog_hspc_results > 1\n\nlibrary(ggrepel)\n\n\nprog_hspc_results <- prog_hspc_results |> \n mutate(log10_FDR = -log10(FDR),\n sig = FDR < 0.05,\n bigfc = abs(summary.logFC) >= 2) \n\n\nvol <- prog_hspc_results |> \n ggplot(aes(x = summary.logFC, \n y = log10_FDR, \n colour = interaction(sig, bigfc))) +\n geom_point() +\n geom_hline(yintercept = -log10(0.05), \n linetype = \"dashed\") +\n geom_vline(xintercept = 1, \n linetype = \"dashed\") +\n geom_vline(xintercept = -1, \n linetype = \"dashed\") +\n scale_x_continuous(expand = c(0, 0)) +\n scale_y_continuous(expand = c(0, 0)) +\n scale_colour_manual(values = c(\"gray\",\n \"pink\",\n \"deeppink\")) +\n geom_text_repel(data = subset(prog_hspc_results, \n bigfc & sig),\n aes(label = external_gene_name),\n size = 3,\n max.overlaps = 50) +\n theme_classic() +\n theme(legend.position = \"none\")\n\n\nggsave(\"figures/prog-hspc-volcano.png\",\n plot = vol,\n height = 4.5, \n width = 4.5,\n units = \"in\",\n device = \"png\")"
},
{
"objectID": "core/week-11/example.html",
"href": "core/week-11/example.html",
"title": "Example",
"section": "",
"text": "Introduction\nA number of subspecies of the common chaffinch, Fringilla coelebs, have been described based principally on the differences in the pattern and colour of the adult male plumage. Two of groups of these subspecies are:\n\n“coelebs group” that occurs in Europe and Asia\n“canariensis group” that occurs on the Canary Islands\n\n\n\n\n\n\n\n\n\n\n(a) F. c. coelebs\n\n\n\n\n\n\n\n\n\n(b) F. c. palmae\n\n\n\n\n\n\nFigure 1: Adult male Fringilla coelebs of the coelebs group on the left (Andreas Trepte, CC BY-SA 2.5 https://creativecommons.org/licenses/by-sa/2.5, via Wikimedia Commons) and of the canariensis group on the right (H. Zell, CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0, via Wikimedia Commons).\n\n\nThis study aimed to determine whether there is a difference in the mass of the two subspecies.\nMethods\nWe randomly sampled 20 F. c. coelebs males and 20 F. c. palmae males and determined their mass with spring scales. Analysis was carried out with R version 4.3.1 and tidyverse (Wickham et al. 2019) packages\nResults\nCheck the assumptions: All t-tests assume the “residuals” are normally distributed and have homogeneity of variance.\nFirst use common sense: mass is a continuous and we would expect it to be normally distributed thus we would expect the residuals to be normally distributed\nSecond by plotting residuals:\nDiscussion\n\n\n\n\nReferences\n\nWickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the Tidyverse” 4: 1686. https://doi.org/10.21105/joss.01686."
}
]
Loading

0 comments on commit 002cc9a

Please sign in to comment.