A simple wrapper function. Using a summary set, find outliers in the MR analysis between the pair of trais. Find other 'candidate traits' associated with those outliers. Perform MR of each of those candidate traits with the original exposure and outcome

tryx.scan(
  dat,
  outliers = "RadialMR",
  outlier_correction = "none",
  outlier_threshold = ifelse(outlier_correction == "none", 0.05/nrow(dat), 0.05),
  use_proxies = FALSE,
  search_correction = "none",
  search_threshold = ifelse(search_correction == "none", 5e-08, 0.05),
  id_list = "default",
  include_outliers = FALSE,
  mr_method = "mr_ivw"
)

Arguments

dat

Output from harmonise_data. Note - only the first id.exposure - id.outcome pair will be used.

outliers

Default is to use the RadialMR package to identify IVW outliers. Alternatively can providen an array of SNP names that are present in dat$SNP to use as outliers.

outlier_correction

Defualt = "none", but can select from ("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none").

outlier_threshold

If outlier_correction = "none" then the p-value threshold for detecting outliers is by default 0.05.

use_proxies

Whether to use proxies when looking up associations. FALSE by default for speed.

search_correction

Default = "none", but can select from ("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none").

search_threshold

If search_correction = "none" then the p-value threshold for detecting an association between an outlier and a candidate trait is by default 5e-8. Otherwise it is 0.05.

id_list

The list of trait IDs to search through for candidate associations. The default is the high priority traits in available_outcomes().

include_outliers

When performing MR of candidate traits against exposures or outcomes, whether to include the original outlier SNP. Default is FALSE.

mr_method

Method to use for candidate trait - exposure/outcome analysis. Default is mr_ivw. Can also provide basic MR methods e.g. mr_weighted_mode, mr_weighted_median etc. Also possible to use "strategy1" which performs IVW in the first instance, but then weighted mode for associations with high heterogeneity.

Value

List dat Cleaned dat input radialmr Results from RadialMR analysis outliers List of outliers used id_list List of GWAS IDs used search Result from search of outliers against GWAS IDs candidate_instruments Instruments for candidate traits candidate_outcome Extracted instrument SNPs from outcome candidate_outcome_dat Harmonised candidate - outcome dataset candidate_outcome_mr MR analysis of candidates against outcome candidate_exposure Extracted instrument SNPs from exposure candidate_exposure_dat Harmonised candidate - exposure dataset candidate_exposure_mr MR analysis of candidates against exposure