A simple wrapper function for importing data from local files for use with the CAMERA class.
Public fields
metadataData frame with information about the data. One row per dataset. See details for info on columns
ld_refData frame with two columns - pop = population (referencing the pop values in metadata), bfile = path to plink file for that reference
mc.coresThe number of processor cores to use
plink_binLocation of executable plink (version 1.90 is recommended)
minmafMinimum allele frequency per dataset
pthreshP-value threshold for instrument inclusion
instrument_rawA data frame of pooled instruments across all ancestries, that has been extracted from each ancestry for the exposure traits
instrument_outcomeInstruments in
instrument_rawextracted from the outcome datasetsinstrument_regionsNamed list of data frames of length number of unique instruments in
instrument_raw. Names of each item are the instruments. Each item is a list of regional extracts around the instrument from each population exposure study.instrument_outcome_regionsAs per
instrument_regionsbut for the outcome datasets.
Methods
CAMERA_local$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
metadataData frame with information about the data. One row per dataset. See details for info on columns
ld_refData frame with two columns - pop = population (referencing the pop values in metadata), bfile = path to plink file for that reference
plink_binLocation of executable plink (version 1.90 is recommended)
mc.coresNumber of cores to use
radiusGenomic window size to extract SNPs
radiusDefault 250000
pthreshP-value threshold for instrument inclusion
minmafMinimum allele frequency per dataset
CAMERA_local$standardise()
Standardise the allele coding
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"
)Arguments
ddata.frame
ea_colColumn name for effect allele
oa_colColumn name for other allele
beta_colColumn name containing beta coefficients
eaf_colColumn name containing allele frequency for effect allele
chr_colColumn name containing chromosome
pos_colColumn name containing position
vid_colColumn name containing variant ID
CAMERA_local$pool_tophits()
Pool the top hits
Usage
CAMERA_local$pool_tophits(
rawdat,
tophits,
metadata,
radius = 250000,
pthresh = 5e-08,
mc.cores = 10
)Arguments
rawdatThe raw data
tophitsThe top hits
metadataData frame with information about the data. One row per dataset. See details for info on columns
radiusGenomic window size to extract SNPs
radiusDefault 250000
pthreshP-value threshold for instrument inclusion
mc.coresNumber of cores to use
CAMERA_local$organise_data()
A function to organise the 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
)Arguments
metadataData frame with information about the data. One row per dataset. See details for info on columns
plink_binLocation of executable plink (version 1.90 is recommended)
ld_refData frame with two columns - pop = population (referencing the pop values in metadata), bfile = path to plink file for that reference
pthreshP-value threshold for instrument inclusion
minmafMinimum allele frequency per dataset
radiusGenomic window size to extract SNPs
radiusDefault 250000
mc.coresNumber of cores to use