Adjust the GWAS Z-statistic.

adjust_zstat(
  dat,
  drop_MHC = TRUE,
  method = "bonferroni",
  model = NULL,
  log_vars = c("NSNPS", "NPARAM", "GENELEN"),
  formula = ZSTAT ~ NSNPS + logNSNPS + NPARAM + logNPARAM + GENELEN + logGENELEN,
  verbose = TRUE,
  ...
)

Arguments

dat

data.table produced by map_snps2genes_txdb.

drop_MHC

Drop genes from the MHC (Major Histocompatibility Complex) region.

method

correction method, a character string. Can be abbreviated.

model

Statistical model to use. Defaults to lm.

log_vars

Variables to perform natural log transformation on first. Only run on variables available in dat.

formula

Formula to use in model.

...

Additional arguments passed to model.

Value

dat with the new column "ADJ_ZSTAT".

Details

Used when you want to directly analyse the gene-level Z-scores corrected for gene length, etc.