run.pcor: Local partial genetic correlation analysis

View source: R/analysis_functions.R

run.pcorR Documentation

Local partial genetic correlation analysis

Description

Will perform a local partial genetic correlation between the first two phenotypes (phen1, phen2) conditioned on the rest (Z). Phenotype order is based on that within the locus object by default, but can be changed by passing a phenotype vector with the desired order to the 'phenos' argument.

Usage

run.pcor(
  locus,
  target,
  phenos = NULL,
  adap.thresh = c(1e-04, 1e-06),
  p.values = T,
  CIs = T,
  max.r2 = 0.95,
  param.lim = 1.25
)

Arguments

locus

Locus object created using the the process.locus function. Contains all the relevant parameters and processed sum-stats for the phenotypes of interest

target

The two target phenotypes of interest for which the partial correlation will be computed. All other phenotypes will be conditioned on.

phenos

Subset of phenotypes to analyse. If NULL, all phenotypes in the locus object will be analysed.

p.values

Set to F to suppress p-values

CIs

Set to F to suppress 95% confidence intervals

max.r2

Max r2 threshold for the regression of phen1~Z and phen2~Z. If any of these r2's are too high, the partial correlation becomes unstable, and analysis is therefore aborted.

param.lim

The +- threshold at which estimated parameters are considered to be too far out of bounds. If the estimated parameter exceeds this threshold, it is considered unreliable and will be set to NA.

adapt.thresh

The thresholds at which to increase the number of iterations for the p-value generation. Default number of iterations is 1e+4, but will be increased to 1e+5, and 1e+6 as p-values fall below the respective thresholds. If set to NULL, the maximum number of iterations is capped at the default (Note: this significantly speeds up the analysis, but results in poor accuracy for low p-values)

Value

Data frame with the columns:

  • phen1 / phen2 - target phenotypes

  • z - phenotype(s) which the genetic correlation between the target phenotypes were conditioned on

  • r2.phen1_z / r2.phen2_z - the proportion of genetic signal in target phenotypes explained by z. Note: if either of these exceed the threshold specified by the max.r2 argument, the analysis will be aborted (to prevent unstable estimates)

  • pcor - the partial correlation between phen1 and phen2 conditioned on z

  • ci.lower / ci.upper - 95% confidence intervals for the partial genetic correlation

  • p - simulation p-values for the partial genetic correlation


josefin-werme/LAVA documentation built on July 4, 2024, 8:11 p.m.