Skip to contents

Performs TWAS analysis using the provided weights matrix, GWAS summary statistics database, and LD matrix. It extracts the necessary GWAS summary statistics and LD matrix based on the specified variants and computes the z-score and p-value for each gene.

Usage

twas_analysis(
  weights_matrix,
  gwas_sumstats_db,
  LD_matrix,
  extract_variants_objs
)

Arguments

weights_matrix

A matrix containing weights for all methods.

gwas_sumstats_db

A data frame containing the GWAS summary statistics.

LD_matrix

A matrix representing linkage disequilibrium between variants.

extract_variants_objs

A vector of variant identifiers to extract from the GWAS and LD matrix.

Value

A list with TWAS z-scores and p-values across four methods for each gene.