This process should take 15-20 minutes.
There is a file called Genomics Ubuntu VM.ova
in the C:\temp
folder. Double click it, it will open up VirtualBox and ask if you want to Import the Virtual Appliance. Click Import
.
load("z_score_matrix.RData") | |
nom <- colnames(z_score_matrix) | |
nom <- do.call(rbind, strsplit(nom, split="\\|")) | |
colnames(z_score_matrix) <- nom[,1] | |
R <- cor(z_score_matrix, use="pair")^2 | |
findrelsubreddit <- function(cursubs,curops,numret=20, mat=R) { | |
curvec = 0 |
Your computer's main operating system is Windows, but it has a 'virtual machine' running Linux Ubuntu.
What is a virtual machine? This is basically a simulation of a computer. The software 'VirtualBox' can simulate different operating systems. We're using a virtual machine to provide a Linux environment in which to perform the work required for this unit.
What is Linux Ubuntu? Linux is a basic operating system, but you can add various configurations or collections of software to give it different behaviours etc. These are then released as 'distributions'. There are many different Linux distributions, but Ubuntu is the most popular due to its relative similarity to Windows.
This guide will show you how to log on to the Linux virtual machine.
#!/bin/bash | |
set -e | |
# Create shortcut to documents | |
echo "Creating shortcut to Documents" | |
cd /mnt/c/Users | |
un=`ls -dl */ | awk '{ print $9 }' | sed "s@/@@g" | grep -v Default | grep -v Public | grep -v defaultuser0 | head -n 1` |
n <- 1000 | |
nsim <- 100 | |
res1 <- rep(0, nsim) | |
res2 <- rep(0, nsim) | |
res3 <- rep(0, nsim) | |
for(i in 1:nsim) | |
{ |
--- | |
title: Converting Z scores to betas and log(OR) | |
author: Gibran Hemani, Philip Haycock | |
date: 22/11/2017 | |
output: html_document | |
--- | |
Use this formula to convert any effects and SE to the standardised scale: | |
```{r, echo=FALSE} |
# no confounder | |
run <- function(nsnp, nid, ueff, nsim, prop) | |
{ | |
g <- matrix(rbinom(nsnp * nid, 2, 0.5), nid, nsnp) | |
vg <- apply(g, 2, var) | |
conf <- rnorm(nid) | |
res1 <- array(0, nsim) | |
res2 <- array(0, nsim) |
--- | |
title: The mystery of Nick's unpaired socks | |
Authors: The Balfour Road consortium | |
--- | |
## Introduction | |
Nick has only 16 socks and none of them form a pair. There are several mechanisms that could give rise to his predicament. The most likely follows a scenario approximating the following. | |
Nick buys a pair of socks, and after some period of time, he loses one of the socks. Nick then buys another pair of socks, and eventually loses one of those too. And so on. If the time to loss of a single sock is Poissonly distributed with $\lambda$ time to event, then the expected amount of time taken to reach a situation with $n$ unpaired socks is simply $n\lambda$. |
https://www.bris.ac.uk/integrative-epidemiology/intranet/training/
In an epidemiological context, whether stated explicitly or not, we typically are referring to a counterfactual condition. A counterfactual condition is where we suppose that the outcome would not have happened in an alternate reality where all things were identical except for the exposure.
For example, if an individual had body mass index = 23 instead of body mass index = 27, but all else was identical, what would the impact be on their bone mineral density?
library(dplyr) | |
library(MeSH.db) | |
k <- keys(MeSH.db, keytype = "MESHID") | |
select(MeSH.db, keys = k[1:10], columns = c("MESHID", "MESHTERM"), keytype = "MESHID") | |
LEU <- select(MeSH.db, keys = "Leukemia", columns = c("MESHID", "MESHTERM", "CATEGORY", "SYNONYM"), keytype = "MESHTERM") | |
library("MeSH.AOR.db") |