Once you've run map.snps.to.genes on multiple GWAS, you can aggregate the gene-wise results into a single gene x trait matrix.
gwas_matrix_magma( magma_files, metric = c("ADJ_ZSTAT", "ZSTAT", "P"), drop_MHC = TRUE, save_path = NULL, mc.cores = 1, fillna = TRUE, agg_FUN = "mean" )
magma_files | Paths to genes.out files produced by map.snps.to.genes. |
---|---|
metric | Which metric to fill the matrix with
|
drop_MHC | Drop genes from the MHC (Major Histocompatibility Complex) region. |
save_path | Path to save results as RDS object. |
Sparse matrix