Skip to contents

This function gets proxy SNPs for MR analyses when using local outcome data. It takes formatted exposure and outcome data from TwoSampleMR, searches for missing SNPs in the outcome, identifies which of these missing-SNPs are available in the provided reference panel, extracts all proxy-SNPs for the missing-SNPs from the reference panel, returns a data frame with the top proxy-SNP for each missing-SNP. You MUST have a local reference panel. Only works with rsID.

Usage

proxy_search(
  data_exposure,
  data_outcome,
  data_outcome_path,
  data_reference,
  data_reference_path,
  tag_r2 = 0.8,
  tag_kb = 5000,
  tag_nsnp = 5000,
  outcome_sep,
  outcome_phenotype,
  outcome_SNP,
  outcome_BETA,
  outcome_SE,
  outcome_P,
  outcome_EA,
  outcome_OA,
  outcome_EAF,
  outcome_N,
  outcome_ID,
  outcome_CHR,
  outcome_POS
)

Arguments

data_exposure

exposure data frame

data_outcome

outcome data frame

data_outcome_path

file path used for read_outcome_data()

data_reference

reference data; bim file

data_reference_path

file path for your downloaded reference panel

tag_r2

r2 for proxy SNP; from get_ld_proxies(); default = 0.8

tag_kb

window to look for proxy SNPs; from get_ld_proxies(); default = 5000

tag_nsnp

from get_ld_proxies(); default = 5000

outcome_sep

separator for your outcome GWAS

outcome_phenotype

phenotype column name of your GWAS

outcome_SNP

SNP column name of your GWAS

outcome_BETA

BETA column name of your GWAS

outcome_SE

SE column name of your GWAS

outcome_P

P column name of your GWAS

outcome_EA

EA column name of your GWAS

outcome_OA

OA column name of your GWAS

outcome_EAF

EAF column name of your GWAS

outcome_N

N column name of your GWAS

outcome_ID

ID column name of your GWAS

outcome_CHR

CHR column name of your GWAS

outcome_POS

POS column name of your GWAS

Value

a data frame