File Instruments.csv
was converted from its Instruments.xlsx
and can be read with
Ins <- read.csv("Instruments.csv"),Phenotype %in% c("ABO","LIFR"))
and or directly
from awk -FS="," 'NR==1||$1~/ABO/||$1~/LIFR/' Instruments.csv > Ins.csv
.
source("pqtlMR.R")
Ins <- read.csv("Ins.csv")
ids <- c("ieu-a-7","ebi-a-GCST007432")
pqtlMR(Ins,ids)
The original script by Jie Zheng
library("readxl")
Ins <- data <- read_excel("Instruments.xlsx",1)
ids <- scan("outcome.id.txt",what="")
handles three files
This offers possibility to simplify two-sample MR,
abc <- function(a=1,b=2,c=3) list(sum=a+b+c,prod=a*b*c)
test <- function(x,y=x$sum,z=x$prod,u=y+z) u
test(abc())
but unfortunately the scheme does not always work.
These can be seen from utils.R
and pqtlMR.Rd and run_TwoSampleMR.Rd
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.