lhc_mr: Main trait pair analysis using LHC-MR

View source: R/lhc_mr.R

lhc_mrR Documentation

Main trait pair analysis using LHC-MR

Description

Main trait pair analysis using LHC-MR

Usage

lhc_mr(
  SP_list,
  trait.names,
  partition = NA,
  account = NA,
  param = "comp",
  paral_method = "rslurm",
  nCores = NA,
  nBlock = 200,
  M = 1e+07
)

Arguments

SP_list

List resulting from calculate_SP. Contains the filtered dataset (by every 'SNP_filter'th SNP), the starting points to be used in the pair trait optimisation, the traits' intercepts, the traits' polygenicity if nStep = 2, as well as some extra parameters like the cross-trait intercept and bidirectional causal effect estimated by IVW

trait.names

Vector containing the trait names in the order they were used in merge_sumstats(): Exposure, Outcome

partition

String indicating the partition name to be used for the "rslurm" parallelisation - equivalent to '-p, –partition' in SLURM commands

account

String indicating the account name to be used for the "rslurm" parallelisation - equivalent to '-A, –account' in SLURM commands

param

String indicating which model the likelihood function will be optimised with, either "comp" by default or "U" for a no-confounder model

paral_method

String indicating which method to parallelise the optimisation over the number of sets of starting points. "rslurm" will submit the calculation to a SLURM cluster using a 'Slurm' workload manager, "lapply" will parallelise the optimisation using 'mclapply' over a set number of cores but will go sequentially over the sets of starting points and thus take more time.

nCores

Numerical value indicating number of cores to be used in 'mclapply' to parallelise the analysis. If not set (default value = NA), then it will be calculated as 2/3 of the available cores

nBlock

Numerical value indicating the number of blocks to create from the block jackknife analysis, where at each iteration one block is left out and the optimisation is ran again for a single starting point to obtain eventually 'nBlock' estimates and calculate the SE of the parameter estimates

M

Numerical value indicating the number of SNPs used to calculate the LD reported in the LD file (for genotyped SNPs). Default value = 1e7

Value

Prints out a summary of the results


LizaDarrous/lhcMR documentation built on March 24, 2024, 10:28 p.m.