Skip to contents

A simple wrapper function. Using a summary set, identify set of instruments for the traits, and peform SEM MR to test the association across the population.

Methods


Method import()

Migrate the results from a previous CAMERA

Usage

CAMERA$import(x)

Arguments

x

R6 Environment created for CAMERA. Default = x


Method assign()

Usage

CAMERA$assign(...)


Method import_from_local()

Usage

CAMERA$import_from_local(
  instrument_raw,
  instrument_outcome,
  instrument_regions,
  instrument_outcome_regions,
  exposure_ids,
  outcome_ids,
  pops,
  ...
)


Method new()

Create a new dataset and initialise an R interface

Usage

CAMERA$new(
  exposure_ids = NULL,
  outcome_ids = NULL,
  pops = NULL,
  bfiles = NULL,
  plink = NULL,
  radius = NULL,
  clump_pop = NULL,
  x = NULL
)

Arguments

exposure_ids

Exposures IDs obtained from IEU GWAS database (https://gwas.mrcieu.ac.uk/) for each population

outcome_ids

Outcome IDs obtained from IEU GWAS database (https://gwas.mrcieu.ac.uk/) for each population

pops

Ancestry information for each population (i.e. AFR, AMR, EUR, EAS, SAS)

bfiles

Locations of LD reference files for each population (Download from: http://fileserve.mrcieu.ac.uk/ld/1kg.v3.tgz)

plink

Location of executable plink (ver.1.90 is recommended)

radius

Genomic window size to extract SNPs

clump_pop

Reference population for clumping

x

Import data where available


Method instrument_heterogeneity()

Usage

CAMERA$instrument_heterogeneity(
  instrument = self$instrument_raw,
  alpha = "bonferroni",
  method = "ivw",
  outlier_removal = FALSE
)


Method estimate_instrument_specificity()

Usage

CAMERA$estimate_instrument_specificity(
  instrument,
  alpha = "bonferroni",
  winnerscurse = FALSE
)


Method replication_evaluation()

Usage

CAMERA$replication_evaluation(
  instrument = self$instrument_raw,
  ld = self$ld_matrices
)


Method check_phenotypes()

Usage

CAMERA$check_phenotypes(ids = self$exposure_ids)


Method cross_estimate()

Usage

CAMERA$cross_estimate(dat = self$harmonised_dat)


Method plot_cross_estimate()

Usage

CAMERA$plot_cross_estimate(est = self$mrres, qj_alpha = 0.05)


Method extract_instruments()

Usage

CAMERA$extract_instruments(exposure_ids = self$exposure_ids, ...)


Method extract_instrument_regions()

Usage

CAMERA$extract_instrument_regions(
  radius = self$radius,
  instrument_raw = self$instrument_raw,
  exposure_ids = self$exposure_ids
)


Method scan_regional_instruments()

Usage

CAMERA$scan_regional_instruments(
  instrument_raw = self$instrument_raw,
  instrument_regions = self$instrument_regions
)


Method plot_regional_instruments_maxz()

Usage

CAMERA$plot_regional_instruments_maxz(
  instrument_region_zscores = self$instrument_region_zscores,
  instruments = self$instrument_raw,
  region = 1:min(10, nrow(instruments)),
  comparison = FALSE
)


Method regional_ld_matrices()

Usage

CAMERA$regional_ld_matrices(
  instrument_regions = self$instrument_regions,
  bfiles = self$bfiles,
  pops = self$pops,
  plink = self$plink
)


Method susie_finemap_regions()

Usage

CAMERA$susie_finemap_regions(
  dat = self$instrument_regions,
  ld = self$ld_matrices
)


Method paintor_finemap_regions()

Usage

CAMERA$paintor_finemap_regions(
  region = self$instrument_regions,
  ld = self$ld_matrices,
  PAINTOR = "PAINTOR",
  workdir = tempdir()
)


Method MsCAVIAR_finemap_regions()

Usage

CAMERA$MsCAVIAR_finemap_regions(
  region = self$instrument_regions,
  ld = self$ld_matrices,
  MsCAVIAR = "MsCAVIAR",
  workdir = tempdir()
)


Method fema_regional_instruments()

Usage

CAMERA$fema_regional_instruments(
  method = "fema",
  instrument_regions = self$instrument_regions,
  instrument_raw = self$instrument_raw,
  n = self$exposure_metadata$sample_size
)


Method plot_regional_instruments()

Usage

CAMERA$plot_regional_instruments(
  region,
  instrument_regions = self$instrument_regions,
  meta_analysis_regions = self$instrument_fema_regions
)


Method get_metadata()

Usage

CAMERA$get_metadata(
  exposure_ids = self$exposure_ids,
  outcome_ids = self$outcome_ids
)


Method estimate_instrument_heterogeneity_per_variant()

Usage

CAMERA$estimate_instrument_heterogeneity_per_variant(dat = self$harmonised_dat)


Method mrgxe()

Usage

CAMERA$mrgxe(
  dat = self$harmonised_dat,
  variant_list = subset(self$instrument_heterogeneity_per_variant, Qfdr < 0.05)$SNP,
  nboot = 100
)


Method mrgxe_plot()

Usage

CAMERA$mrgxe_plot(mrgxe_res = self$mrgxe_res)


Method mrgxe_plot_variant()

Usage

CAMERA$mrgxe_plot_variant(
  variant = self$mrgxe_res %>% dplyr::filter(p.adjust(a_pval, "fdr") < 0.05) %>% {
  
      .$SNP
 },
  dat = self$harmonised_dat
)


Method make_outcome_data()

Usage

CAMERA$make_outcome_data(exp = self$instrument_raw, p_exp = 0.05/nrow(exp))


Method make_outcome_local()

Usage

CAMERA$make_outcome_local(
  exp = self$instrument_raw,
  out = self$instrument_outcome_regions,
  p_exp = 0.05/nreow(exp)
)


Method harmonise()

Usage

CAMERA$harmonise(exp = self$instrument_raw, out = self$instrument_outcome)


Method set_summary()

Usage

CAMERA$set_summary()


Method pleiotropy()

Usage

CAMERA$pleiotropy(harmonised_dat = self$harmonised_dat, mrres = self$mrres)


Method plot_pleiotropy()

Usage

CAMERA$plot_pleiotropy(dat = self$pleiotropy_outliers)


Method plot_pleiotropy_heterogeneity()

Usage

CAMERA$plot_pleiotropy_heterogeneity(
  dat = self$pleiotropy_Q_outliers,
  pthresh = 0.05
)


Method perform_basic_sem()

Usage

CAMERA$perform_basic_sem(harmonised_dat = self$harmonised_dat_sem)


Method runsem()

Usage

CAMERA$runsem(model, data, modname)


Method standardise_data()

Usage

CAMERA$standardise_data(
  dat = self$instrument_raw,
  standardise_unit = FALSE,
  standardise_scale = FALSE,
  scaling_method = "simple_mode"
)


Method clone()

The objects of this class are cloneable with this method.

Usage

CAMERA$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.