rms2: Reverse 2-sample MR analysis

Description Public fields Methods

Description

This analysis is a wrapper around MR and colocalisation functions for systematically searching OpenGWAS for mediating pathways from genotype to trait

Public fields

igd_id

The OpenGWAS dataset to analyse as the outcome GWAS

info

Meta data for igd_id

gwashits

Data from of GWAS hits

rsid_scan

List of results of PheWAS search - one item for each GWAS hit

coloc_data

Data used for colocalisation analysis - list of lists (rsid x candidate trait)

coloc_result

Results from colocalisation analysis - list of data frames, one data frame for each region analysed

candidate_instruments

List of instrument datasets for each candidate

candidate_instruments_outcome

Dataframe of instrument-outcome associations

mr_scan

Results from MR analysis - list of data frames with one data frame for each region

mv_dat

Data and results from mvmr

Methods

Public methods


Method new()

Initialise the rms2 class for a particular outcome GWAS

Usage
rms2$new(igd_id)
Arguments
igd_id

The OpenGWAS ID to use


Method extract_gwashits()

Extract GWAS hits for igd_id

Usage
rms2$extract_gwashits(
  igd_id = self$igd_id,
  pval = 5e-08,
  kb = 10000,
  r2 = 0.001,
  pop = "EUR"
)
Arguments
igd_id

Default=self$igd_id

pval

Significance threshold for detecting GWAS hit default=5e-8

kb

Clumping parameter default=10000

r2

Clumping parameter default=0.001

pop

1000 genome super population to use for clumping default='EUR'


Method scan_rsid()

Search OpenGWAS for associations with a particular GWAS hit

Usage
rms2$scan_rsid(rsid, pval = 5e-08, idlist = NULL, check_population = TRUE)
Arguments
rsid

RSID

pval

Significance threshold for candidate traits default=5e-8

idlist

Which traits to search. When NULL (default) will search all available traits

check_population

Restrict candidate traits to the same population as the igd_id. Default=TRUE


Method colocalise_rsid()

Perform colocalisation between outcome trait and a candidate trait for a particular locus

Usage
rms2$colocalise_rsid(rsid, trait_id, radius = 50000)
Arguments
rsid

RSID

trait_id

trait_id

radius

Radius around which to perform analysis default=50000


Method plot_coloc()

Plot region for a colocalisation analysis

Usage
rms2$plot_coloc(rsid, trait_id)
Arguments
rsid

rsid

trait_id

trait_id


Method coloc_scan()

Perform colocalisation systematically for all detected candidate traits for a given region

Usage
rms2$coloc_scan(rsid, radius = 50000)
Arguments
rsid

rsid i.e. one of the outcome GWAS hits

radius

Radius around which to perform analysis default=50000


Method mr()

Perform MR analysis of all candidate traits for a particular rsid

Usage
rms2$mr(
  rsid,
  steiger_filtering = TRUE,
  exclude_rsid_region = TRUE,
  radius = 250000,
  mrmethod = "mr_ivw"
)
Arguments
rsid

GWAS hit from which candidate traits are obtained

steiger_filtering

Whether to perform steiger filtering default=TRUE

exclude_rsid_region

Whether to exclude the known GWAS hit default=TRUE

radius

Excluded region radius default=250000

mrmethod

MR method default="mr_ivw"


Method mvmr()

Perform multivariable MR for all or some of the candidate traits related to a particular region

Usage
rms2$mvmr(rsid, traitlist = NULL)
Arguments
rsid

RSID from which candidate traits are obtained

traitlist

List of traits to use. Default (NULL) is to use all, but important to scrutinise and manually exclude those which appear to be synonymous with the outcome


Method mvmr_lasso()

This function will take the output from mvmr, perform feature selection from the analysed traits using MVMR-LASSO, and then re-estimate the MVMR associations with only the retained traits

Usage
rms2$mvmr_lasso(rsid)
Arguments
rsid

Region from which MVMR analysis has been performed


Method clone()

The objects of this class are cloneable with this method.

Usage
rms2$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


explodecomputer/rms2 documentation built on Dec. 20, 2021, 7:39 a.m.