This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(readxl) | |
| a <- read_xlsx("~/Downloads/Letter to the Vice Chancellor 2021-11-10 (Responses)(1).xlsx") | |
| to_remove <- tolower(c("ana.baezaruiz@bristol.ac.uk", "Valerie.Aspin@bristol.ac.uk")) | |
| dat <- a %>% | |
| filter(! tolower(`Email Address`) %in% to_remove) %>% | |
| arrange(`School or department`, `Surname`) %>% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "Reverse MR Sims" | |
| output: html_notebook | |
| --- | |
| ```{r} | |
| library(simulateGP) | |
| library(TwoSampleMR) | |
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Model of control-only Huntington's disease analysis | |
| # If you have some CAG expansion cases who are non-symptomatic then what distinguishes them from non expansion individuals? | |
| # This script shows the analysis is akin to an interaction analysis | |
| library(dplyr) | |
| n <- 1000000 | |
| cag <- rpois(n, 2) | |
| mod <- rbinom(n, 2, 0.4) - 1 | |
| d <- rep(0, n) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CHUNKSIZE=250 | |
| NCHUNK=864 | |
| CHUNK=range(0,NCHUNK) | |
| rule all: | |
| input: | |
| "instrument_specificity_analysis.html" | |
| rule dl: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: Comparing survey answers before and after intervention | |
| author: Gibran Hemani | |
| --- | |
| ```{r} | |
| suppressMessages(suppressWarnings(suppressPackageStartupMessages({ | |
| library(knitr) | |
| library(tidyverse) | |
| }))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: Analysis of rs13107325 heterogeneity in BMI - osteoarthritis MR analysis | |
| author: Gibran Hemani | |
| date: "`r Sys.time()" | |
| --- | |
| ```{r} | |
| library(tryx) | |
| library(TwoSampleMR) | |
| library(ieugwasr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: Quick MR of fibronectin / cytokines / matrix metalloproteinases on osteoarthritis | |
| date: "`r Sys.time()" | |
| --- | |
| This paper presents a mathematical model linking osteoarthritis (OA) to a dynamic inflammation system involving cytokines and fibronectin https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5562782/. | |
| Quick look at whether genetic relationships associate: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(gwasglue) | |
| library(ieugwasr) | |
| library(tidyverse) | |
| library(susieR) | |
| library(glue) | |
| # DHA fine mapping | |
| temp <- associations("11:61200000-62100000", "met-d-DHA") | |
| ggplot(temp, aes(x=position, y=-log10(p))) + | |
| geom_point() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: Comparison of effect allele frequencies in TwoSampleMR | |
| author: Gibran Hemani | |
| date: "`r Sys.time()`" | |
| --- | |
| ```{r, echo=FALSE} | |
| library(knitr) | |
| opts_chunk$set(warning=FALSE, message=FALSE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(TwoSampleMR) | |
| library(ieugwasr) | |
| library(tidyverse) | |
| # Get harmonised data for exposure and outcome | |
| # e.g. BMI vs CHD | |
| dat <- make_dat(exposures="ieu-a-2", outcomes="ieu-a-7") | |
| # infer the AF for controls only for CHD | |
| # first get case control sizes |