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 |
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
# on bc3 | |
# wget https://fluff.bris.ac.uk/fluff/u2/mk19726/Al7MuuePNzS7tMWliJGG6QznF/fev1_adjusted_only_for_sex_imputed.txt | |
# wget https://fluff.bris.ac.uk/fluff/u2/mk19726/0ar7Sekl4I3Xj4JyatEf_wznc/fvc_adjusted_only_for_sex_imputed.txt | |
# wget https://fluff.bris.ac.uk/fluff/u4/mk19726/pUNC547Sala4I5Y1V_G9Bwzna/obstructive_ratio_spirometry_imputed.txt | |
# FEV1: | |
# sample size 353315 |
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(GwasDataImport) | |
library(data.table) | |
library(ieugwasr) | |
library(dplyr) | |
# Download the Howard et al 2019 MDD GWAS from https://datashare.ed.ac.uk/handle/10283/3203 | |
a <- data.table::fread("https://datashare.ed.ac.uk/bitstream/handle/10283/3203/PGC_UKB_depression_genome-wide.txt?sequence=3&isAllowed=y") | |
# It doesn't have chr/pos, so let's look them up on OpenGWAS (a bit slow!) |
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: Survival bias in sex association with dementia | |
author: Gibran Hemani | |
date: `r Sys.time()` | |
--- | |
```{r} | |
library(dplyr) | |
library(tidyr) | |
library(ggplot2) |