This function performs a multi-condition TWAS joint test using the GBJ method. It assumes that the input genotype matrix (X) is standardized.
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.