View on GitHub

apex

Toolkit for QTL mapping and meta-analysis.

APEX: linear mixed model preprocessing guide

This page describes linear mixed model preprocessing using APEX. Once installed, you can quickly get started by running ./apex lmm --help.

Overview

cis-xQTL analysis in APEX uses either a) ordinary least squares (OLS) for unrelated samples or b) a linear mixed model (LMM) to account for familial relatedness or technical and biological variation. For the former, we use a sparse genetic relatedness matrix (GRM), and for the latter, we use a low-rank random effect matrix. ./apex lmm expedites LMM analysis for modes cis and trans by precomputing and storing a) LMM null models and trait residuals and b) spline terms for LMM genotypic variances. Note that this preprocessing step is optional; these steps can also be performed internally using modes cis and trans; however, preprocessing can substantially reduce computation time, particularly for trans analysis.

Table of Contents
  1. Precomputing LMM null models and trait residuals
  2. Precomputing LMM genotypic variances
  3. Command line options

Return to APEX main page.

Precomputing LMM null models and trait residuals

Example command:
./apex lmm --rankNormal --fit-null --save-resid --bcf {bcf} --bed {trait-file} --cov {covariate-file} --grm {grm} --prefix {out-name}

This command will rank-normalize traits, estimate LMM null models and residuals, and save variance component estimates and trait residuals for later use in modes cis and trans.

Precomputing LMM genotypic variances

Example command:
./apex lmm --write-gvar --bcf {bcf} --bed {trait-file} --cov {covariate-file} --grm {grm} --prefix {out-name}

This command will calculate and store interpolation points for LMM genotype residual variances to expedite later LMM association analysis in modes cis and trans.

Command line arguments

A partial list of options is given below. Please run ./apex lmm --help to see a complete list of command line flags and options.