Skip to contents

A simple wrapper function for importing data from local files for use with the CAMERA class.

Methods


Method new()

Create a new dataset and initialise an R interface

Usage

CAMERA_local$new(
  metadata,
  ld_ref,
  plink_bin,
  mc.cores = 1,
  radius = 25000,
  pthresh = 5e-08,
  minmaf = 0.01
)

Arguments

metadata

Data frame with information about the data. One row per dataset. See details for info on columns

ld_ref

Data frame with two columns - pop = population (referencing the pop values in metadata), bfile = path to plink file for that reference

plink_bin

Location of executable plink (ver.1.90 is recommended)

radius

Genomic window size to extract SNPs

pthresh

P-value threshold for instrument inclusion

minmaf

Minimum allelel frequency per dataset

clump_pop

Reference population for clumping


Method standardise()

Usage

CAMERA_local$standardise(
  d,
  ea_col = "ea",
  oa_col = "oa",
  beta_col = "beta",
  eaf_col = "eaf",
  chr_col = "chr",
  pos_col = "pos",
  vid_col = "vid"
)


Method read_file()

Usage

CAMERA_local$read_file(m, minmaf = 0.01)


Method pool_tophits()

Usage

CAMERA_local$pool_tophits(
  rawdat,
  tophits,
  metadata,
  radius = 250000,
  pthresh = 5e-08,
  mc.cores = 10
)


Method organise_data()

Usage

CAMERA_local$organise_data(
  metadata = self$metadata,
  plink_bin = self$plink_bin,
  ld_ref = self$ld_ref,
  pthresh = self$pthresh,
  minmaf = self$minmaf,
  radius = self$radius,
  mc.cores = self$mc.cores
)


Method fixed_effects_meta_analysis_fast()

Usage

CAMERA_local$fixed_effects_meta_analysis_fast(beta_mat, se_mat)


Method organise()

Usage

CAMERA_local$organise()


Method clone()

The objects of this class are cloneable with this method.

Usage

CAMERA_local$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.