Skip to contents

This function performs a multi-condition TWAS joint test using the GBJ method. It assumes that the input genotype matrix (X) is standardized.

Usage

twas_joint_z(weights, z, R = NULL, X = NULL)

Arguments

weights

A matrix of weights, where each column corresponds to a different condition.

z

A vector of GWAS z-scores.

R

An optional correlation matrix. If not provided, it will be calculated from the genotype matrix X.

X

An optional genotype matrix. If R is not provided, X must be supplied to calculate the correlation matrix.

Value

A list containing the following elements:

  • Z: A matrix of TWAS z-scores and p-values for each condition.

  • GBJ: The result of the GBJ test.